Home » Eclipse Projects » Rich Client Platform (RCP) » Antoher "unable to open editor, unknown ID" problem
Antoher "unable to open editor, unknown ID" problem [message #441892] |
Sat, 07 January 2006 20:38 |
Eclipse User |
|
|
|
Originally posted by: psentosa.yahoo.com
Hi...
sorry for posting an old problem again, but I coulnd't find any working solution for my problem in the threads... so please give me some advice if you have..
I'm trying to develop a GUI based on RCP. Right know I'd like to create an editor, which pops up, when an item of the tree viewer is selected by choosing a menu entry.
But I can't get the editor working, cause I got the PartInitException: Unable to open editor, unknown editor ID.
The steps I've made so far are as follows:
- creating the editor class, which is subclass of EditorPart (TestEditor)
- creating the editor input class, which implements IEditorInput (TestEditorInput)
- specify the action class(TestAction), to supply the menu entry on the GUI, which also calls the function
page.openEditor(input,TestEditor.ID)
This ID is defined in the editor class as follows:
public static String ID = "test.editor.testEditor"
and also defined in the plugin.xml for an editor extension.
Below I paste the failure report I got, when I tried to choose the menu
Can someone please help me? I'm quite desperate..:-(
Thank you very much in advance
Regards
Paul
org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID: test.testEditor
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:630)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2381)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2316)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2308)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2294)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2289)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2274)
at test.action.TestAction.run(TestAction.java:93)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:492 )
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:530)
at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:480)
at org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:392)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3285)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2905)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1762)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:397)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at test.core.TestApplication.run(TestApplication.java:19)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:379)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91979789.html
|
|
|
Re: Antoher "unable to open editor, unknown ID" problem [message #441893 is a reply to message #441892] |
Sat, 07 January 2006 20:48 |
James Leotta Messages: 202 Registered: July 2009 |
Senior Member |
|
|
Paul, did you create the testEditorActionBarContributor which implements
IActionBarContributor - because you need to.
Paul Sentosa wrote:
> Hi...
>
> sorry for posting an old problem again, but I coulnd't find any working solution for my problem in the threads... so please give me some advice if you have..
>
> I'm trying to develop a GUI based on RCP. Right know I'd like to create an editor, which pops up, when an item of the tree viewer is selected by choosing a menu entry.
> But I can't get the editor working, cause I got the PartInitException: Unable to open editor, unknown editor ID.
> The steps I've made so far are as follows:
> - creating the editor class, which is subclass of EditorPart (TestEditor)
> - creating the editor input class, which implements IEditorInput (TestEditorInput)
> - specify the action class(TestAction), to supply the menu entry on the GUI, which also calls the function
>
> page.openEditor(input,TestEditor.ID)
>
> This ID is defined in the editor class as follows:
> public static String ID = "test.editor.testEditor"
>
> and also defined in the plugin.xml for an editor extension.
>
> Below I paste the failure report I got, when I tried to choose the menu
>
> Can someone please help me? I'm quite desperate..:-(
>
> Thank you very much in advance
>
> Regards
> Paul
>
> org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID: test.testEditor
> at org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:630)
> at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2381)
> at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2316)
> at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2308)
> at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2294)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2289)
> at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2274)
> at test.action.TestAction.run(TestAction.java:93)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:492 )
> at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:530)
> at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:480)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:392)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3285)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2905)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1762)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:397)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at test.core.TestApplication.run(TestApplication.java:19)
> at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:109)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:379)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
> --
> View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91979789.html
|
|
|
Re: Antoher "unable to open editor, unknown ID" problem [message #441896 is a reply to message #441893] |
Sat, 07 January 2006 21:32 |
Eclipse User |
|
|
|
Originally posted by: psentosa.yahoo.com
Hi James...thanks for the reply..
I didn't create any ActionBarContributor bcs I don't what it is for...
I read a book about RCP, showing examples how to create an editor. This examples shows only these 3 classes I mentioned before.
Moreover, I've just tried to follow your suggestion, but I got directly following message for implementing IActionBarContributor:
Discouraged access: The type IActionBarContributor is not accessible due to restriction on required
library C:\eclipse\plugins\org.eclipse.ui.workbench_3.2.0.I20051214- 1200.jar
Sorry for bothering you...but could you please explain more, what I can do with it?
Thanks before..
Best Regards
ps
--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91979872.html
|
|
|
Re: Antoher "unable to open editor, unknown ID" problem [message #441897 is a reply to message #441892] |
Sun, 08 January 2006 01:31 |
Haris Peco Messages: 1072 Registered: July 2009 |
Senior Member |
|
|
you define ID 'test.editor.testEditor', and try open ID test.testEditor
(i think)
Paul Sentosa wrote:
> Hi...
>
> sorry for posting an old problem again, but I coulnd't find any working
> solution for my problem in the threads... so please give me some advice if
> you have..
>
> I'm trying to develop a GUI based on RCP. Right know I'd like to create an
> editor, which pops up, when an item of the tree viewer is selected by
> choosing a menu entry. But I can't get the editor working, cause I got the
> PartInitException: Unable to open editor, unknown editor ID. The steps
> I've made so far are as follows: - creating the editor class, which is
> subclass of EditorPart (TestEditor) - creating the editor input class,
> which implements IEditorInput (TestEditorInput) - specify the action
> class(TestAction), to supply the menu entry on the GUI, which also calls
> the function
>
> page.openEditor(input,TestEditor.ID)
>
> This ID is defined in the editor class as follows:
> public static String ID = "test.editor.testEditor"
>
> and also defined in the plugin.xml for an editor extension.
>
> Below I paste the failure report I got, when I tried to choose the menu
>
> Can someone please help me? I'm quite desperate..:-(
>
> Thank you very much in advance
>
> Regards
> Paul
>
> org.eclipse.ui.PartInitException: Unable to open editor, unknown editor
> ID: test.testEditor at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:630)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2381)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2316)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2308)
> at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2294) at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69) at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2289)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2274)
> at test.action.TestAction.run(TestAction.java:93) at
> org.eclipse.jface.action.Action.runWithEvent(Action.java:492 ) at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:530)
> at
> org.eclipse.jface.action.ActionContributionItem.access$
(ActionContributionItem.java:480)
> at
>
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:392)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66) at
> org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914) at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3285) at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2905) at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1762) at
> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726) at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:397)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143) at
> test.core.TestApplication.run(TestApplication.java:19) at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:109)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:379)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585) at
> org.eclipse.core.launcher.Main.invokeFramework(Main.java:338 ) at
> org.eclipse.core.launcher.Main.basicRun(Main.java:282) at
> org.eclipse.core.launcher.Main.run(Main.java:977) at
> org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
> --
> View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91979789.html
|
|
| | | | |
Re: Antoher "unable to open editor, unknown ID" problem [message #441909 is a reply to message #441900] |
Sun, 08 January 2006 09:48 |
Eclipse User |
|
|
|
Originally posted by: psentosa.yahoo.com
Hi...
the example of HYPERBOLA is exactly the example from the book I meant before...and I followed the steps as stated in it, but I couldn't get it working..unfortunately the book didn't mention anything about such case..
From the error report I got, I tried to follow up the first line, which is:
<b>PartInitException</b>:Unable to open editor, unknown editor ID: net.sf.bibxmleditor.ui.modifyEditor
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:630)
....
From the class EditorManager line 630 are following codes to see:
IEditorRegistry reg = getEditorRegistry();
EditorDescriptor desc = (EditorDescriptor) <b>reg.findEditor(editorId);</b>
<b>if (desc == null)</b> {
throw new PartInitException(
NLS.bind(WorkbenchMessages.EditorManager_unknownEditorIDMess age,editorId ));
}
I suppose that the EditorRegistry couldn' find the editor. Do you have any idea, what this could mean, and how I can solve this problem?
Thanks in advance
ps
--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91979921.html
|
|
|
Re: Antoher "unable to open editor, unknown ID" problem [message #441915 is a reply to message #441909] |
Sun, 08 January 2006 14:49 |
Haris Peco Messages: 1072 Registered: July 2009 |
Senior Member |
|
|
Paul,
your error
org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID:
test.testEditor
tell that you try open unknown editor ID - you have defined another ID
or your definition (editors extension point) is invalid
check double your extension point
Paul Sentosa wrote:
> Hi...
>
> the example of HYPERBOLA is exactly the example from the book I meant
> before...and I followed the steps as stated in it, but I couldn't get it
> working..unfortunately the book didn't mention anything about such case..
>
> From the error report I got, I tried to follow up the first line, which
> is:
>
> <b>PartInitException</b>:Unable to open editor, unknown editor ID:
> net.sf.bibxmleditor.ui.modifyEditor at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:630)
> ...
>
> From the class EditorManager line 630 are following codes to see:
>
> IEditorRegistry reg = getEditorRegistry();
> EditorDescriptor desc = (EditorDescriptor)
> <b>reg.findEditor(editorId);</b> <b>if (desc == null)</b> {
> throw new PartInitException(
>
NLS.bind(WorkbenchMessages.EditorManager_unknownEditorIDMess age,editorId
> ));
> }
>
> I suppose that the EditorRegistry couldn' find the editor. Do you have any
> idea, what this could mean, and how I can solve this problem? Thanks in
> advance
>
> ps
>
>
> --
> View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91979921.html
|
|
| | | | |
Re: Antoher "unable to open editor, unknown ID" problem [message #441929 is a reply to message #441928] |
Mon, 09 January 2006 00:11 |
Eclipse User |
|
|
|
Originally posted by: psentosa.yahoo.com
The plugin with editor extension is for sure included, bcs I still have some other extension in there, and they are all recognized. It isn't commented as well.
Do you know something about the Editor Registry? Because the part of codes that causes this problem is this one:
IEditorRegistry reg = getEditorRegistry();
EditorDescriptor desc = (EditorDescriptor) reg.findEditor(editorId);
if (desc == null) {
throw new PartInitException(
NLS.bind(WorkbenchMessages.EditorManager_unknownEditorIDMess age,editorId ));
}
--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91980004.html
|
|
| |
Re: Antoher "unable to open editor, unknown ID" problem [message #441942 is a reply to message #441892] |
Mon, 09 January 2006 09:16 |
Eclipse User |
|
|
|
Originally posted by: alexander.nikiforov.freesurf.ch
Have you specified the 'icon' attribute in the plugin extension editor for your editor? It may sound strange, but the icon attribute is required if you supply your own class in the 'class' attribute to implement the IEditorPart interface.
Well, the icon itself does not need to exist, but the 'icon' attribute's field must not be empty. Without the icon defined, your editor never gets into the editor registry when the plugin extensions are read, so an attempt later to retrieve this editor by its id fails, even though the editor ID is correct.
--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91980066.html
|
|
| | | | | | | |
Goto Forum:
Current Time: Wed Jan 15 12:03:30 GMT 2025
Powered by FUDForum. Page generated in 0.12257 seconds
|