Skip to main content



      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 07:59 Go to next message
Eclipse UserFriend
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 09:40 Go to previous message
Eclipse UserFriend
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: Sun May 11 23:25:14 EDT 2025

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

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

Back to the top