Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Annotation Hilighting
Annotation Hilighting [message #330496] Wed, 30 July 2008 07:49 Go to next message
Eclipse UserFriend
I'm trying to have my plugin insert annotations to a file based on data
external to the file/eclipse. The goal is that the line the annotation is
on will be hilighted. The trick in this is that I need to know the
position in the file where the hilighting must begin and end.

I see I can get this line start and end info with
ITextEditor.getDocumentProvider().getDocument(...).getLineIn formation(int
line). How do I get to the correct text editor object for the file, for
instance, when the file is first opened in the editor?
Re: Annotation Hilighting [message #330512 is a reply to message #330496] Wed, 30 July 2008 18:46 Go to previous message
Eclipse UserFriend
OK, I figured this one out. I made an extension point extending
IEditorActionDelegate, registered the desired editors with it in
plugin.xml. Then in the setActiveEditor method, which is passed
targetEditor:IEditorPart I call
targetEditor.getDocumentProvider().getDocument(editor.getEdi torInput()).getLineInformation(line).
Previous Topic:Re: Cut/copy/paste at the widget level
Next Topic:Building Update Site with platform specific fragments
Goto Forum:
  


Current Time: Mon Feb 10 23:52:16 GMT 2025

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

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

Back to the top