Community
Participate
Working Groups
It is not possible to create a LineHeaderCodeMining above an empty line (a line without any visible character, just the line break). LineHeaderCodeMining is not visible. Especially if the last line of the document is an empty line. In this case a BadLocationException is thrown in AbstractDocument.addPosition. Guess it is due to the creation in LineHeaderCodeMining constructor which uses Positions.of(int, document, boolean). In the case of the last empty line it creates a Position with the offset of the last line and length = 1. This is after the end of the document. If this BadLocationException is thrown, it may be that other LineHeaderCodeMinings are not shown as well. Probably due to the BadLoacationException.
I have similar problem with Target Definition source editor (Bug 534758) For the content like " <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde version="3.8"?> <target name="some.target"> </target> " LineHeaderCodeMining with beforeLineNumber<2 disappers after change in editor Debugging shows that it goes more or less good till the CodeMiningLineContentAnnotation.redraw call
I just tested and that is now working, I suspect thanks to fixes for bug 539624