Skip to main content



      Home
Home » Eclipse Projects » GEF » RCP and GEF: Cannot open editor
RCP and GEF: Cannot open editor [message #162321] Mon, 20 December 2004 19:11 Go to next message
Eclipse UserFriend
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)
Re: RCP and GEF: Cannot open editor [message #162367 is a reply to message #162321] Tue, 21 December 2004 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick_edgar._no.spam.please_.ca.ibm.com

> Plugin com.spherion.ap.smeg, extension org.eclipse.ui.editors
> Required attribute 'icon' not defined

This indicates that the workbench skipped your editor extension because
it's missing an icon attribute. Add this attribute, with the value
being a plug-in relative path to a 16x16 .gif file, and try again.

It also looks like you're including the org.eclipse.ui.ide and
org.eclipse.ui.editors plug-ins, which are not designed for reuse in RCP
apps.
See
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-ui-home/rcp/faq.html#idePlugin

Nick
Re: RCP and GEF: Cannot open editor [message #162419 is a reply to message #162367] Tue, 21 December 2004 17:03 Go to previous messageGo to next message
Eclipse UserFriend
Nick Edgar wrote:
> > Plugin com.spherion.ap.smeg, extension org.eclipse.ui.editors
> > Required attribute 'icon' not defined
>
> This indicates that the workbench skipped your editor extension because
> it's missing an icon attribute. Add this attribute, with the value
> being a plug-in relative path to a 16x16 .gif file, and try again.
>
> It also looks like you're including the org.eclipse.ui.ide and
> org.eclipse.ui.editors plug-ins, which are not designed for reuse in RCP
> apps.
> See
> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-ui-home/rcp/faq.html#idePlugin
>
>
> Nick

Thanks Nick. It works now. I just don't understand why the plugin.xml
editor doesn't tell me to add an icon if it is required. But I'm happy
as the editor can be opened.

Christian
Re: RCP and GEF: Cannot open editor [message #162428 is a reply to message #162419] Tue, 21 December 2004 18:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Not to mention, why is it required. Do all applications display the
editor's icon?

"Christian Hauser" <c.hauser@active.ch> wrote in message
news:cqa6j2$fca$1@www.eclipse.org...
> Nick Edgar wrote:
> > > Plugin com.spherion.ap.smeg, extension org.eclipse.ui.editors
> > > Required attribute 'icon' not defined
> >
> > This indicates that the workbench skipped your editor extension because
> > it's missing an icon attribute. Add this attribute, with the value
> > being a plug-in relative path to a 16x16 .gif file, and try again.
> >
> > It also looks like you're including the org.eclipse.ui.ide and
> > org.eclipse.ui.editors plug-ins, which are not designed for reuse in RCP
> > apps.
> > See
> >
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-ui-home/rcp/faq.html#idePlugin
> >
> >
> > Nick
>
> Thanks Nick. It works now. I just don't understand why the plugin.xml
> editor doesn't tell me to add an icon if it is required. But I'm happy
> as the editor can be opened.
>
> Christian
Re: RCP and GEF: Cannot open editor [message #162618 is a reply to message #162419] Wed, 22 December 2004 16:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick_edgar._no.spam.please_.ca.ibm.com

The workbench could be made more lenient here. The icon attribute is
not marked as required in the schema because there are other
configurations (e.g. external editors) where the icon doesn't make sense.

Please file a bug report against Platform UI for this, if you care.

Nick

Christian Hauser wrote:
> Nick Edgar wrote:
>
>> > Plugin com.spherion.ap.smeg, extension org.eclipse.ui.editors
>> > Required attribute 'icon' not defined
>>
>> This indicates that the workbench skipped your editor extension
>> because it's missing an icon attribute. Add this attribute, with the
>> value being a plug-in relative path to a 16x16 .gif file, and try again.
>>
>> It also looks like you're including the org.eclipse.ui.ide and
>> org.eclipse.ui.editors plug-ins, which are not designed for reuse in
>> RCP apps.
>> See
>> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-ui-home/rcp/faq.html#idePlugin
>>
>>
>> Nick
>
>
> Thanks Nick. It works now. I just don't understand why the plugin.xml
> editor doesn't tell me to add an icon if it is required. But I'm happy
> as the editor can be opened.
>
> Christian
Eclipse Executable Jar File not working [message #164479 is a reply to message #162321] Tue, 18 January 2005 15:53 Go to previous message
Eclipse UserFriend
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
Previous Topic:SchemaEditor question : how to generate RCP
Next Topic:GEF Shapes example : connections don't stick to moving figure
Goto Forum:
  


Current Time: Fri Jul 18 19:44:06 EDT 2025

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

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

Back to the top