Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Opening an external editor from a Editor Descriptor(WorkbenchPage.openEditorFromDescriptor(...) is internal)
Opening an external editor from a Editor Descriptor [message #502482] Tue, 08 December 2009 13:50
Johnny Mongiat is currently offline Johnny MongiatFriend
Messages: 7
Registered: December 2009
Junior Member

How can you open an external editor using a preselected EditorDescriptor? I'm trying to mimic the functionality that is supplied by the OpenWithMenu class (org.eclipse.ui.actions) which uses the following call:

((WorkbenchPage) page).openEditorFromDescriptor(new FileEditorInput(file), editor, true, null);

to open the given file using the user's external editor selection. The problem is that WorkbenchPage is an internal class, so it should be discouraged from referencing it from 3rd party client code (i.e. goes against eclipse best practices). However, I don't see anything in the public API that allows you to do this (I've tried the various openEditor(...) methods in the IWorkbenchPage, and IDE classes - but they just don't work like the afore-mentionned openEditorFromDescriptor(...) method).

Any thoughts?

Previous Topic:How to remove the default "project"/"example"/"other" item from the ne
Next Topic:KeyAdapter processing in RAP ?
Goto Forum:

Current Time: Wed Apr 25 22:21:36 GMT 2018

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

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