Adding annotation model to default text editor [message #603135] |
Tue, 10 November 2009 12:42 |
Mekk Elek 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
|
|
|
Powered by
FUDForum. Page generated in 0.03024 seconds