Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Adding annotation model to default text editor
Adding annotation model to default text editor [message #603135] Tue, 10 November 2009 12:42
Mekk Elek is currently offline Mekk ElekFriend
Messages: 3
Registered: November 2009
Junior Member
Hi,

this drives me crazy. My goal is to write a plugin that highlights words at the cursor in any file (i.e. plain text files too, not just Java or C++). To achieve this, I would like add an annotation model to the default text editor, without creating my own editor. I spent several days to find solutions without success. Here are my questions:

- how can I add my own custom annotation model to a TextEditor instance ? I would try to use IAnnotationModelExtension, but it is not clear at all what 'piggybacking of annotations' mean. I know what piggybacking means, I just don't see the high level picture here: who are the main players ? My guess would be that I can associate more than one annotation model with a document. Is this correct ?

- what is the right hook point to add and remove custom annotation models to documents (at runtime) ? So if a document is opened, I get a call so that I can set my annotation model on the document.

- when I ask for the annotation model of a text document, I get null. How come ? Without a model, I can't use the IAnnotationModelExtension methods. Or should I check if the annotation model is null, then I can add my own model ? I can't find any method doing so either.

Thanks for any help,
McHalls
Previous Topic:Adding annotation model to default text editor
Next Topic:problem triggering checkstyle jar
Goto Forum:
  


Current Time: Thu Aug 13 09:51:29 GMT 2020

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

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

Back to the top