This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
To be able to paint, or add a caret inside a tab character or behind EOL, we need a new Position.
Added ShiftPositions class to create and read ShiftPositions. The implementation ShiftPos is a position together with a shift of extra columns. This allows for positions behind line's last character (newline) or within a tab character. Please review the class on the editor_multi_caret branch[1]. Thanks! [1] - http://hg.netbeans.org/jet-main/file/391b2b3a41a2/editor.document/src/org/netbeans/api/editor/document/ShiftPositions.java
The change is currently accompanied by adding an extended version of HighlightsSequence interface called ShiftHighlightsSequence that supports shifts within characters for highlights sequences too i.e. a caret related layer(s) may e.g. color individual spaces within tab characters. http://hg.netbeans.org/jet-main/file/edb646598079/editor.lib2/src/org/netbeans/spi/editor/highlighting/ShiftHighlightsSequence.java I'm still not 100% satisfied with 'ShiftPositions' name - would not e.g. 'CharShiftPositions' or 'CharSplitPositions' or 'SplitPositions' be better??
We ask reviewers for fastrack review for these two classes. Thanks.
(In reply to Miloslav Metelka from comment #2) > I'm still not 100% satisfied with 'ShiftPositions' name - would not e.g. > 'CharShiftPositions' or 'CharSplitPositions' or 'SplitPositions' be better?? How about RelativePositions?
Thanks for the review.
So, you decided to keep ShiftPositions?
Vladimir, thanks for the RelativePositions. Ralph came with ComplexPositions name which I sort of like even more because the complex numbers are also composed of two components just like (offset,shift) in our case. Regarding ShiftPositions.getShift() the only better name that came to my mind so far was getSplitOffset() so in addition to Position.getOffset() there would be ComplexPositions.getSplitOffset() for getting an offset inside the splitted char. If there are no objections I would prepare and commit the rename. I assume that it's not necessary to do any extra review since it's just a naming change and not a functional change.
Integrated renaming of ShiftPositions to ComplexPositions and ShiftHighlightsSequence to SplitOffsetHighlightsSequence. Since there was no release with the original class names yet I treat the changes as compatible. http://hg.netbeans.org/jet-main/rev/d051b114c772
Integrated into 'main-silver', will be available in build *201605240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d051b114c772 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #257889 - Add support for positions inside tab characters or behind EOL - integrated renaming of ShiftPositions to ComplexPositions and ShiftHighlightsSequence to SplitOffsetHighlightsSequence.