Community
Participate
Working Groups
When https://bugs.eclipse.org/bugs/show_bug.cgi?id=539618 will be merged, we will able to improve drastically draw of inlined header annotation by using StyleRange#marginTop Today draw of inlined header annotation uses GlyphMetrics#ascent but there are a lot of problem with this solution: * using Glyphmetrics remove the character where it is setted, that's line header annotation redraw this character which provides some problem (ex: selection of this character has not black foreground). * when line which have line header annototation below is selected, blue background is done for line text and line header annotation (although it should keep blank). * matching bracket square has a too big height (the line text height + line header annotation height) * same problem when mark occurences is done for method (in JDT Java Editor) * same problem with square height when refactor is done for method (in JDT Java Editor) -> https://github.com/angelozerr/jdt-codemining/issues/6
Created attachment 276049 [details] Demo with improve of draw of inlined annotation The gerrit patch https://git.eclipse.org/r/#/c/130151/ requires https://bugs.eclipse.org/bugs/show_bug.cgi?id=539618 You will see that code is more elegant and doesn't require to redraw of character. It fixes all issues with JDT mark occurences, square of refactoring, selection of line which set blue teh line header annotation, square of matching bracket, etc.
Angelo do you have a JFace snippet which reproduces this issue?
> Angelo do you have a JFace snippet which reproduces this issue? No. Problems that I reported comes from users feedback of JDT CodeMining. Write a JFace snippet is a big work I think, sorry -(
(In reply to Angelo ZERR from comment #3) > > Angelo do you have a JFace snippet which reproduces this issue? > > No. Problems that I reported comes from users feedback of JDT CodeMining. > Write a JFace snippet is a big work I think, sorry -( So this issue is only visible when using code mining in the IDE?
In other words, if you install JDT CodeMining, you will see all problems that I have listed in the issue. If you apply my patch, you will see thoses problems will gone.
(In reply to Angelo ZERR from comment #5) > In other words, if you install JDT CodeMining, you will see all problems > that I have listed in the issue. If you apply my patch, you will see thoses > problems will gone. Okay thanks, I'll take a look.
> So this issue is only visible when using code mining in the IDE? The uses cases is to have an editor which have several IPainter like mark occurrences, cursor line painter, etc which draws in the editor. It's not very symply to configure that with a simple snippet I think.
Gerrit change https://git.eclipse.org/r/130151 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=222b86399d8e37507e6b00f0c11ef2f8f0bd0c6b
Thanks Angelo!
Thanks Mickael!