Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » "implements/overrides" annotation line number
"implements/overrides" annotation line number [message #250393] Sat, 29 December 2007 13:50 Go to next message
Ganea George is currently offline Ganea GeorgeFriend
Messages: 23
Registered: July 2009
Junior Member
Hello,
I need to find out programmatically where are the annotations which
are represented as a little green triangle (the ones that tell the user
that the method is overriding another method). Does anyone know what
exactly are those triangles, how does Eclipse create them and if their
line number is accessible to a plugin developer ?
Thank you very much,
George
Re: "implements/overrides" annotation line number [message #250490 is a reply to message #250393] Mon, 07 January 2008 16:49 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
George Ganea wrote:

> Hello,
> I need to find out programmatically where are the annotations which
> are represented as a little green triangle (the ones that tell the user
> that the method is overriding another method). Does anyone know what
> exactly are those triangles,

They tell you that the method overrides/implements another method.

> how does Eclipse create them

See org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorMana ger.

> and if their
> line number is accessible to a plugin developer ?

If you have the annotation at hand you can call
org.eclipse.jface.text.source.IAnnotationModel.getPosition(A nnotation)
to get the position. From there you can get the line number using
org.eclipse.jface.text.IDocument.getLineOfOffset(int).

Dani

> Thank you very much,
> George
>
Previous Topic:JDT refactor detele my extra files
Next Topic:AST for other languages
Goto Forum:
  


Current Time: Thu Dec 26 20:46:12 GMT 2024

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

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

Back to the top