Community
Participate
Working Groups
Build Identifier: Version: 3.7.0 Build id: I20110613-1736 I came across this bug when selecting a line of code and hitting tab in a custom editor, at which point all color formatting disappeared. My PartitionScanner makes different decisions based on the previous partitions, so in it I ask for partitions in the document. In FastPartitioner.initialize it calls clearPositionCache() before it asks the scanner for tokens. This function is called from computePartitioning(), which then proceeds to calculate partitions based on Position[] category=getPositions() which is set to return the cache if not null or the document positions if null. Since my Scanner was asking for partitions in computing the tokens, it was setting the cache to an empty array, nullifying the purpose of clearing the cache in the first place. Then when it called getPosititions it returned the empty cache array and thus returned the entire document as one large partition. I ended up subclassing off FastPartitioner and overriding initialize, clearing the cache AFTER the tokens are generated. This fixed the issue. Reproducible: Always Steps to Reproduce: 1. Have a PartitionScanner that calls document.getPartition 2. Have some sort of presentationreconciler attached to the document 3. Select a line of text and hit tab, which causes the whole document to be repartitioned.
Please either provide a test case or steps that allow to reproduce it in the Eclipse SDK.
Please reopen after attaching the requested details.