Skip to main content



      Home
Home » Newcomers » Newcomers » Text highlighting in custom editor
Text highlighting in custom editor [message #198408] Thu, 08 March 2007 04:48 Go to next message
Eclipse UserFriend
Originally posted by: boutter.ps.uni-sb.de

Hi folks,

I'm new to the group and I hope the question isn't arising every other day.

I've built my custom editor for a simulation language. Now when
simulating the code from the editor in a separate View, I want to
highlight the relevant parts of the code in the editor when selecting
something in the View.

The problem is I don't know how to do the highlight part (e.g. put some
color under the text or something like this, very similar to the mark
occurences feature of Eclipse). It seems that it can be done with
Annotations, but I didn't find anything on how to do it.

If someone could help me or point me to an article or a tutorial how to
do this I would be very thankful.

Regards,
Chris
Re: Text highlighting in custom editor [message #199032 is a reply to message #198408] Mon, 12 March 2007 10:10 Go to previous message
Eclipse UserFriend
Christophe Boutter wrote:

>Hi folks,
>
>I'm new to the group and I hope the question isn't arising every other day.
>
>I've built my custom editor for a simulation language. Now when
>simulating the code from the editor in a separate View, I want to
>highlight the relevant parts of the code in the editor when selecting
>something in the View.
>
>The problem is I don't know how to do the highlight part (e.g. put some
>color under the text or something like this, very similar to the mark
>occurences feature of Eclipse). It seems that it can be done with
>Annotations, but I didn't find anything on how to do it.
>
>
You need to register your annotation type using the
'org.eclipse.ui.editors.markerAnnotationSpecification' extension point.
Then you can simply add/remove the annotations from the annotation model
at will.

Dani

>If someone could help me or point me to an article or a tutorial how to
>do this I would be very thankful.
>
>Regards,
>Chris
>
>
Previous Topic:How to create BIRT report by taking data from object
Next Topic:provide values in "org.eclipse.ui.prefs"
Goto Forum:
  


Current Time: Sat May 10 06:13:50 EDT 2025

Powered by FUDForum. Page generated in 0.08290 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top