Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Annotation Model Usage
Annotation Model Usage [message #501250] Tue, 01 December 2009 16:27
Ric Wright is currently offline Ric WrightFriend
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
Previous Topic:How do you group checked items in a menu subgroup?
Next Topic:TreeViewer with columns
Goto Forum:
  


Current Time: Thu Apr 25 16:40:18 GMT 2024

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

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

Back to the top