Annotation Model Usage [message #501250] |
Tue, 01 December 2009 16:27 |
Ric Wright Messages: 70 Registered: July 2009 |
Member |
|
|
I have created an XML editor by extending the TextEditor (it's part of a
multipane FormEditor like PDE). I use SAX to parse the XML, which returns
errors to my error-handler. I then create a series of markers and get a
list of errors in the problem pane as well as markers on the ruler. All
fine. I wanted to add an AnnotationHover to show me the errors when I hover
over the ruler-marker. Easy enough, I implement IAnnotationHover and it all
works.
But when getHoverInfo is called I am passed the SourceViewerConfig. From
that I can get the AnnotationModel but it is empty - naturally since I
haven't added anything to it. Now, I am sure I can figure out a reasonably
clean way to add the errors as Annotations to the AnnotationModel, but it
seems a little clumsy. I will then have the errors stored in two places: in
the map with the Markers and in the list of Annotations. This seems a
little redundant.
Is this really the right way to do this? Spelunking around the docs doesn't
seem to suggest anything one way or the other. Any guidance would be
appreciated.
TIA, Ric
|
|
|
Powered by
FUDForum. Page generated in 0.25803 seconds