Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Annotations
Annotations [message #334347] Wed, 04 February 2009 11:03 Go to next message
Eclipse UserFriend
Originally posted by: franklin.in.tum.de

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3316593816_101560
Content-type: multipart/alternative;
boundary="B_3316593816_69896"


--B_3316593816_69896
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: 8bit

Hi,


I'm currently integrating a clone detection tool(
http://conqat.cs.tum.edu/index.php/ConQAT) into Eclipse. One of the features
I am working on, is to display a clone region in the Java Editor. For this
purpose I've started knocking around with Annotations. So far, I've managed
to create an Annotation and add it to the Annotation Model (see screenshot,
it's the blue and red bar).
My Annotation class extends Annotation and implements
IAnnotationPresentation. I then use the paint method, to paint the two
vertical bars. So far, so good. Now, I want the user to be able to click on
the Annotation and get a Context Menu (not a Context Menu for the vertical
ruler as a whole, but just for the seleted annotation). This where I got
stuck. I tried setting up a Vertical Ruler Listener, but that didn
Re: Annotations [message #334367 is a reply to message #334347] Thu, 05 February 2009 08:11 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Jason Franklin wrote:
> Hi,
>
>
> I'm currently integrating a clone detection tool(
> http://conqat.cs.tum.edu/index.php/ConQAT)
> <http://conqat.cs.tum.edu/index.php/ConQAT%29> into Eclipse. One of
> the features I am working on, is to display a clone region in the Java
> Editor. For this purpose I've started knocking around with
> Annotations. So far, I've managed to create an Annotation and add it
> to the Annotation Model (see screenshot, it's the blue and red bar).
> My Annotation class extends Annotation and implements
> IAnnotationPresentation. I then use the paint method, to paint the two
> vertical bars. So far, so good. Now, I want the user to be able to
> click on the Annotation and get a Context Menu (not a Context Menu for
> the vertical ruler as a whole, but just for the seleted annotation).
> This where I got stuck.
Take a look at the org.eclipse.ui.editorActions extension point.

Dani
> I tried setting up a Vertical Ruler Listener, but that didn’t work:
>
> IVerticalRulerInfo service = (IVerticalRulerInfo)
> editor.getAdapter(IVerticalRulerInfo.class); if(service == null)
> System.out.println("Service is null"); if(service instanceof
> IVerticalRulerInfoExtension){ System.out.println("The service is
> active"); ((IVerticalRulerInfoExtension)
> service).addVerticalRulerListener(new RulerListener());
> I’ve been googeling the last two days and searching news groups, but I
> can’t seem to find anything I can use. If anybody can at least give me
> a hint in the right direction, I would be very thankful.
>
> Regards,
>
> Jason Franklin
Previous Topic:Using plug-in registry remotely
Next Topic:Ganymede "Help Contents" generating Error 500
Goto Forum:
  


Current Time: Fri Nov 08 22:13:19 GMT 2024

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

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

Back to the top