How to make marker annotations in Eclipse extend to the whole width of the editor?
up vote
0
down vote
favorite
I'm writing a plugin for the Eclipse IDE that adds a custom marker annotation to highlight portions of the code. Currently, I use textStylePreferenceValue="BOX" in the org.eclipse.ui.editors.markerAnnotationSpecification and get a changed background color that ends at the line-break for each line. That introduces a lot of visual noise, and I would like to have the color to extend to the whole width of the editor. How can I achieve this?
If this is not possible at the moment, what would be the next steps to add this functionality to the platform?
This is what I have:
This is what I want:
eclipse eclipse-plugin eclipse-rcp
add a comment |
up vote
0
down vote
favorite
I'm writing a plugin for the Eclipse IDE that adds a custom marker annotation to highlight portions of the code. Currently, I use textStylePreferenceValue="BOX" in the org.eclipse.ui.editors.markerAnnotationSpecification and get a changed background color that ends at the line-break for each line. That introduces a lot of visual noise, and I would like to have the color to extend to the whole width of the editor. How can I achieve this?
If this is not possible at the moment, what would be the next steps to add this functionality to the platform?
This is what I have:
This is what I want:
eclipse eclipse-plugin eclipse-rcp
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm writing a plugin for the Eclipse IDE that adds a custom marker annotation to highlight portions of the code. Currently, I use textStylePreferenceValue="BOX" in the org.eclipse.ui.editors.markerAnnotationSpecification and get a changed background color that ends at the line-break for each line. That introduces a lot of visual noise, and I would like to have the color to extend to the whole width of the editor. How can I achieve this?
If this is not possible at the moment, what would be the next steps to add this functionality to the platform?
This is what I have:
This is what I want:
eclipse eclipse-plugin eclipse-rcp
I'm writing a plugin for the Eclipse IDE that adds a custom marker annotation to highlight portions of the code. Currently, I use textStylePreferenceValue="BOX" in the org.eclipse.ui.editors.markerAnnotationSpecification and get a changed background color that ends at the line-break for each line. That introduces a lot of visual noise, and I would like to have the color to extend to the whole width of the editor. How can I achieve this?
If this is not possible at the moment, what would be the next steps to add this functionality to the platform?
This is what I have:
This is what I want:
eclipse eclipse-plugin eclipse-rcp
eclipse eclipse-plugin eclipse-rcp
asked Nov 4 at 12:08
Tobias B.
234
234
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
After researching further, it seems that this is not possible at the moment, at least not easily. The relevant Eclipse sub-project seems to be "platform.text" (https://github.com/eclipse/eclipse.platform.text/). The possible textStylePreferenceValues are defined in the class "org.eclipse.ui.texteditor.AnnotationPreference", and how to paint them is defined in the class "org.eclipse.jface.text.source.AnnotationPainter".
A low level solution could be to use a LineBackgroundListener together with the StyledText object of the editor.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
After researching further, it seems that this is not possible at the moment, at least not easily. The relevant Eclipse sub-project seems to be "platform.text" (https://github.com/eclipse/eclipse.platform.text/). The possible textStylePreferenceValues are defined in the class "org.eclipse.ui.texteditor.AnnotationPreference", and how to paint them is defined in the class "org.eclipse.jface.text.source.AnnotationPainter".
A low level solution could be to use a LineBackgroundListener together with the StyledText object of the editor.
add a comment |
up vote
0
down vote
After researching further, it seems that this is not possible at the moment, at least not easily. The relevant Eclipse sub-project seems to be "platform.text" (https://github.com/eclipse/eclipse.platform.text/). The possible textStylePreferenceValues are defined in the class "org.eclipse.ui.texteditor.AnnotationPreference", and how to paint them is defined in the class "org.eclipse.jface.text.source.AnnotationPainter".
A low level solution could be to use a LineBackgroundListener together with the StyledText object of the editor.
add a comment |
up vote
0
down vote
up vote
0
down vote
After researching further, it seems that this is not possible at the moment, at least not easily. The relevant Eclipse sub-project seems to be "platform.text" (https://github.com/eclipse/eclipse.platform.text/). The possible textStylePreferenceValues are defined in the class "org.eclipse.ui.texteditor.AnnotationPreference", and how to paint them is defined in the class "org.eclipse.jface.text.source.AnnotationPainter".
A low level solution could be to use a LineBackgroundListener together with the StyledText object of the editor.
After researching further, it seems that this is not possible at the moment, at least not easily. The relevant Eclipse sub-project seems to be "platform.text" (https://github.com/eclipse/eclipse.platform.text/). The possible textStylePreferenceValues are defined in the class "org.eclipse.ui.texteditor.AnnotationPreference", and how to paint them is defined in the class "org.eclipse.jface.text.source.AnnotationPainter".
A low level solution could be to use a LineBackgroundListener together with the StyledText object of the editor.
edited 2 days ago
answered 2 days ago
Tobias B.
234
234
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53140659%2fhow-to-make-marker-annotations-in-eclipse-extend-to-the-whole-width-of-the-edito%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password