Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter name codemining: Selection on double-click off by one character #10

Open
derBluemel opened this issue Mar 27, 2018 · 3 comments

Comments

@derBluemel
Copy link

When I double-click on a parameter name or the parameter itself, the selection is set incorrectly.
It seems that the parameter name codemining is overlapping with the parameter itself by one character:

bug

I also changed the background color with an org.eclipse.swt.custom.LineBackgroundListener for the attached screenshot.

@angelozerr
Copy link
Owner

@derBluemel yes indeed today we have managed like this. Inlined content annotation takes place with GlyphMetrics width. But the use of GlyphMetrics replace the character so we must redraw it.

To fix this issue, we must improve OS TextLayout. See my current experimentation with windows https://bugs.eclipse.org/bugs/show_bug.cgi?id=531769

@derBluemel
Copy link
Author

@angelozerr
OK! Thanks for your feedback. Doesn't seem to be an easy fix then... :(

On a side note: Why is the inlined annotation not affected by the LineBackgroundListener?

@angelozerr
Copy link
Owner

On a side note: Why is the inlined annotation not affected by the LineBackgroundListener?

It's perhaps because LineBackgroundListener is called when a line is drawn and the draw of inlined annotation is called in the AnnotationPainter (not in the same place). Never played with it but I thing it's one reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants