Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Programatically finding selected editor's ID
Programatically finding selected editor's ID [message #464571] Fri, 09 March 2007 12:59 Go to next message
Delicia is currently offline DeliciaFriend
Messages: 41
Registered: July 2009
Member
I have multiple editors for a particular contentType, one being the default.
For the remaining I have a 'launcher' class. All the remaining editors use
very similar code, except for 1 argument.
So I want to use the same class for all editors instead of having multiple
classes.

How can I find out the editorID of the selected editor?
Based on that, I can execute the required code.

org.eclipse.ui.IEditorRegistry has a couple of methods to get the default
editor, all editors, etc.
I couldn't find a method to get the selected editor.

TIA!
Delicia.
Re: Programatically finding selected editor's ID [message #464599 is a reply to message #464571] Mon, 12 March 2007 13:40 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Delicia wrote:

>I have multiple editors for a particular contentType, one being the default.
>For the remaining I have a 'launcher' class. All the remaining editors use
>very similar code, except for 1 argument.
>So I want to use the same class for all editors instead of having multiple
>classes.
>
>How can I find out the editorID of the selected editor?
>Based on that, I can execute the required code.
>
>org.eclipse.ui.IEditorRegistry has a couple of methods to get the default
>editor, all editors, etc.
>I couldn't find a method to get the selected editor.
>
>
getEditorSite().getId()

Dani

>TIA!
>Delicia.
>
>
>
>
Previous Topic:DefaultLinkPresenter working strangely?
Next Topic:[CommonNavigator] Dependency on org.eclipse.ui.ide and others
Goto Forum:
  


Current Time: Tue Sep 17 05:37:59 GMT 2024

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

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

Back to the top