[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.helpwanted] Re: PartInitException
|
1. This is not the group for such questions - see eclipse.platform.rcp.
2. Check that the standalone version has all the plugins that are needed by
your application. Check that your plugin that contains the editor is
activated.
"mattcom" <strubbe@xxxxxxxxxxxx> wrote in message
news:81f1f42063b8ddb6253febb5d7d379a8$1@xxxxxxxxxxxxxxxxxx
> Hello !
>
> I have developed an Eclipse product (containing a GEF editor).
> When running this product from inside the Eclipse IDE, there are no
> problems opening the editor (on any PC). Also, when I run my application
> as a standalone package on my PC, everything works fine...
>
> But when I run my application as a standalone package on any other PC, a
> PartInitException is caught when the editor is opened.
>
> Here's the code to open the editor:
>
> IWorkbench wb = PlatformUI.getWorkbench();
> IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
> IWorkbenchPage page = win.getActivePage();
> IEditorInput input = new MyEditorInput();
>
> if (page != null)
> {
> try
> {
> page.openEditor(
> input,
> "myEditorID",
> true);
> } catch (PartInitException e1)
> {
> //AN EXCEPTION IS CAUGHT HERE,
> //but only when my product is run //as a standalone application on another
> PC than mine !
> // e1.getMessage() = "Unable to open editor, unknown // editor ID:
> myEditorID"
> } }
>
> How can I solve this problem ?
> Thanks in advance for any help !
>
>