RCP and GEF: Cannot open editor [message #162321] |
Mon, 20 December 2004 19:11  |
Eclipse User |
|
|
|
Hi,
I'm trying to learn both RCP and GEF. Peter Mayne posted a nice GEF
plugin some time ago to the GEF newsgroup and now I'm trying to create a
RCP application of it.
He defined that files ending ".smeg" open the GEF editor. However, I'd
like to open the editor within the postWindowOpen method of the
WorkbenchAdvisor class and I don't want a persisted model. I'd like to
provide the model when starting the application.
Here's the postWindowOpen method of the WorchbenchAdvisor class:
public void postWindowOpen(IWorkbenchWindowConfigurer configurer) {
super.postWindowOpen(configurer);
SmegEditorInput input = new SmegEditorInput();
input.setModelRoot(new SmegDiagramModel());
String editorId = "com.spherion.ap.smeg.editors.SmegEditor";
IWorkbenchPage page = configurer.getWindow().getActivePage();
try {
page.openEditor(input, editorId, true);
} catch (PartInitException e) {
e.printStackTrace();
}
}
But I always get a PartInitException (Unable to open editor, unknown
editor ID: com.spherion.ap.smeg.editors.SmegEditor) as can be seen at
the end of this posting.
The editor should be known, though:
plugin.xml:
<extension
point="org.eclipse.ui.editors">
<editor
class="com.spherion.ap.smeg.editors.SmegEditor"
default="true"
name="Smeg Editor"
id="com.spherion.ap.smeg.editors.SmegEditor"/>
</extension>
I'd be very happy if someone could enlighten me on what I'm doing wrong.
I've been trying to get this running for more than 2 days now and cannot
find a solution.
Thanks in advance for any hint on what I'm missing.
Christian
Output when running the RCP app:
--------------------------------
Invalid Menu Extension (Path is invalid): org.eclipse.update.ui.updateMenu
Invalid Menu Extension (Path is invalid):
org.eclipse.update.ui.configManager
Invalid Menu Extension (Path is invalid): org.eclipse.update.ui.newUpdates
Invalid Menu Extension (Path is invalid):
org.eclipse.ui.actions.showKeyAssistHandler
Plugin com.spherion.ap.smeg, extension org.eclipse.ui.editors
Required attribute 'icon' not defined
org.eclipse.ui.PartInitException: Unable to open editor, unknown editor
ID: com.spherion.ap.smeg.editors.SmegEditor
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:630)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2207)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2139)
at org.eclipse.ui.internal.WorkbenchPage.access$5(WorkbenchPage .java:2131)
at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.ja va:2117)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2112)
at
com.spherion.ap.smeg.SmegWorkbenchAdvisor.postWindowOpen(Sme gWorkbenchAdvisor.java:36)
at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow .java:586)
at
org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Wo rkbench.java:587)
at
org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:1170)
at
org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow(WorkbenchConfigurer.java:178)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:665)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:886)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1516)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:285)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:144)
at com.spherion.ap.smeg.SmegApplication.run(SmegApplication.jav a:18)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:220)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:710)
at org.eclipse.core.launcher.Main.main(Main.java:694)
|
|
|
|
|
|
|
Eclipse Executable Jar File not working [message #164479 is a reply to message #162321] |
Tue, 18 January 2005 15:53  |
Eclipse User |
|
|
|
Originally posted by: sfrierdich.custom-mfg-eng.com
HI
I creates an executable jar file for my application. When I click on the
file I get the same error everytime that the main could not be found.
The main class is pointed when created the jar file. Anyone have any
suggestions
Steve
|
|
|
Powered by
FUDForum. Page generated in 0.05144 seconds