Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Hyperlinks? How do I add annotations to an editor?
Hyperlinks? How do I add annotations to an editor? [message #259903] Thu, 08 July 2004 18:16
Eclipse UserFriend
Originally posted by: dgreenfi.cs.umd.edu

I am trying to incorporate hyperlinked text in a text editor. Because I
want the hyperlinks to move as the text is edited, it seems like it makes
sense to use the annotation mechanism in the TextEditor.

I am trying to figure out how to programmaticaly add annotations to a text
file in an editor.

I also would need to control how the annotations appear - by changing the
color of the text and a straight underline.

I also need to be able to get the enclosing rectangle of the annotated
text so that I can handle mouseclicks.

The best I've been able to do so far is to use the DefaultRangeIndicator
subclass of Annotation, which only shows by highlighting the entire line
containing the annotation. It's not clear to me whether I should be
actually be creating a textmarker type of IMarker and then wrapping it in
a MarkerAnnotation. When I do this, the annotation does not show up at all.

Any advice on whether this is a good approach in general and on the
specifics of adding annotations and controlling their appearance and
behavior?

Thanks much,

David
Previous Topic:dependent Java projects and classpath problems...
Next Topic:Linking to eclipse welcome page
Goto Forum:
  


Current Time: Thu May 08 08:30:44 EDT 2025

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

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

Back to the top