[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Proxy for org.eclipse.ui.editors extension point?

I'm not explicitly opening the editor, but instead it's opened by the Workbench via filename+extension configuration within the extension point.

I think what you're suggestiong is:
- Create an extension point for each version of the editor with a unique editor id
- When the file is opened, get and evaluate project property
- Based on property, explicitly open one of the editors via org.eclipse.ui.ide.IDE.openEditor(IWorkbenchPage page, IFile input, String editorId)


If so, how is the above process initiated when a user double-clicks on the assigned filename+extension?




Daniel Megert wrote:
C Wall wrote:

Thanks Daniel.  Could you explain further?

I didn't see that the org.eclipse.ui.editors extension point had
qualification mechanisms such as enablement, visibility, or filters.
How would I qualify each editor?

Yes, there's no such filtering/enablement. I only meant to give both editors different IDs.



My original thinking was that I set the org.eclipse.ui.editors class to a proxy which queries the project property and instaniates the appropriate MultiPageEditorPart.

You could use the property to identify the desired editor(ID) and then use that ID to open the desired editor. Which API do you currently use to open the editor?


Dani


-Chris


Daniel Megert wrote:

Trey Anastasio wrote:

Hi. I have two versions of an editor. Each editor resides in a separate bundle. Based on a project property, I'd like to load one editor or the other.

Any suggestions?


Give each editor a different editor ID and let the property define the editor ID.

Dani


Thanks.

-Chris