Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF diagram editor - class not found
GMF diagram editor - class not found [message #214173] Thu, 25 December 2008 15:39 Go to next message
Eclipse UserFriend
Hello

I'm creating a GMF diagram editor based on existing xsd schema file. I've
created a EMF model editor from that XSD to test model's correctness and
it suits my needs and works ok.

However when I'm trying to create files with a generated GMF diagram
editor I'm getting errors like:
Class 'environment' not found (platform:/resource/...)

and a stacktracke like this:

!ENTRY org.eclipse.ui 4 0 2008-12-25 21:33:06.008
!MESSAGE Unable to create editor ID
org.comit.diagram.environment.diagram.part.EnvironmentDiagra mEditorID:
org.eclipse.core.runtime.CoreException: ERROR
!STACK 1
org.eclipse.core.runtime.CoreException: ERROR
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.createPartControl(DiagramDocumentEditor. java:1458)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
at
org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(Ed itorAreaHelper.java:263)
at
org.eclipse.ui.internal.EditorManager.setVisibleEditor(Edito rManager.java:1410)
at
org.eclipse.ui.internal.EditorManager$5.runWithException(Edi torManager.java:944)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3378)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3036)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
at
org.eclipse.ui.internal.Workbench$27.runWithException(Workbe nch.java:1361)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3378)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3036)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2293)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
!SUBENTRY 1 org.eclipse.gmf.runtime.diagram.ui.resources.editor 4 1
2008-12-25 21:33:06.011
!MESSAGE ERROR

The 'environment' is the element of the XSD file. I the file is needed I
can paste it here.

My .gmfgen file has some errors. They say that:
Top level node 'Containment Feature' must be available in the diagram
'Domain Element' or its super-class

But from what I've been reading on the list, it can be ignored - is it
correct?

The editor isn't properly initiated and I don't know what is going on.
Re: GMF diagram editor - class not found [message #214188 is a reply to message #214173] Fri, 26 December 2008 07:39 Go to previous messageGo to next message
Eclipse UserFriend
I've found the solution for this. It was discussed on the group:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg06953.html

However I still would like to know what to do with that "Containment
feature" error that I mentioned.

According to this: http://wiki.eclipse.org/index.php/GMF_Tutorial
the containment features are set right for my model but I'm getting the
error messages. Moreover the GMF editor doesn't allow to add child objects
with accordance to the EMF model.

I have a canvas represented by container object (called
EnvironmentDiagram), I can have multiple Environments in the EnvDiagram,
and each Environment can contain an Object. I can place Environments but
not objects.

Both Environments and Objects are Top Node References and their
containment features are set accordingly, object has a containment feature
to link to environment.objects[] and environment has a containmnet feature
to link to EnvironmentDiagra.environments[].

Any help with that?

Marcin
Re: GMF diagram editor - class not found [message #214307 is a reply to message #214188] Tue, 30 December 2008 09:44 Go to previous messageGo to next message
Eclipse UserFriend
Hello Marcin,

> However I still would like to know what to do with that "Containment
> feature" error that I mentioned.
Looks like this feature was not set correctly.. Can you please check that
containment feature referenced by TopNodeReference is available in a domain
model element referenced by CanvasMapping.

-----------------
Alex Shatalin
Re: GMF diagram editor - class not found [message #214421 is a reply to message #214307] Fri, 02 January 2009 04:10 Go to previous messageGo to next message
Eclipse UserFriend
Alex Shatalin wrote:

> Looks like this feature was not set correctly.. Can you please check that
> containment feature referenced by TopNodeReference is available in a domain
> model element referenced by CanvasMapping.

Yes it is referenced. The generated mapping looked like what I've
described.

So like this:

Top Node Ref (object A)
Top node Ref (object b)
top node Ref (object c)
etc.

It worked after I changed the mapping to look like this:

top Node Reference (object A)
child Reference (object B)
child Reference (object c)
child Reference (object d)
etc.

The emf model editor worked well with the defined model so what happened
with the generated gmf definition? Is it possible to get a hierarchical
behavior of objects from mapping generated in the style of the first
example (all nodes as top node refs)?

Bye
Marcin
Re: GMF diagram editor - class not found [message #214538 is a reply to message #214421] Mon, 05 January 2009 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Hello Marcin,

If you have to represent all nodes (including child-) in your model as top-level
diagram elements then you can do it, but you should leave “containment feature”
field of corresponding Top Node Ref (representing child elements in terms
of your model) empty in this case. If you’d like to have a connection pointing
from parent element to its children visible on the diagram then you can create
corresponding LinkMappings pointing to the corresponding containment feature
as a LinkMetaFeature.

-----------------
Alex Shatalin
Re: GMF diagram editor - class not found [message #214713 is a reply to message #214538] Wed, 07 January 2009 14:27 Go to previous message
Eclipse UserFriend
Alex Shatalin wrote:

Hello

> If you have to represent all nodes (including child-) in your model as
top-level
> diagram elements then you can do it, but you should leave “containment
feature”

No, I don't want this. I want a structure I described. So I suppose that
creation of guided mapping introduces the mentioned errors.

That's ok, I can work around it by myself. I just thought the generated
file is ok for my requirements except some small changes.

Bye
Marcin
Previous Topic:Drag and drop from diagram to a view
Next Topic:What is the procedure to extend the editor gmfgen?
Goto Forum:
  


Current Time: Thu May 15 16:12:57 EDT 2025

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

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

Back to the top