Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Dynamically combining Ecore Models
Dynamically combining Ecore Models [message #146747] Thu, 16 August 2007 15:22
Gary Leask is currently offline Gary LeaskFriend
Messages: 28
Registered: July 2009
Junior Member
I have 2 ecore models that I need to combine dynamically in a graphical
editor produced by EMF-GMF-GEF

The first ecore model is used to build the graphic element for the diagram.
It provides the palette item and the visual icon on the canvas. I don't
want ot use the compartments and have to drag all the interior elements on
to the canvas. Below is a simple example, the real implementation can add
multiple interior elements.

The first ecore model for this consists of a

<stateElement> -- ecore Eclass
<processElement> - an EReference to and ecore Eclass
<xsdAny> -- an EFeatureMapEntry

The second Ecore Model is used to popualte the xsdAny Element.
It is not known what type of element this will be until it is added to the
canvas. The element may be from different namespaces

<stateElement> -- ecore Eclass
<processElement> - an EReference to and ecore Eclass
<ns1:collect> -- an EClass


<stateElement> -- ecore Eclass
<processElement> - an EReference to and ecore Eclass
<ns2:process> -- an EClass


I have tried to add the second ecore model to the .gmpmap as a child
reference but The containment feature is not owned by the Domain Meta
Model.
If I ignore the error the Diagram Updater is not generated correctly.

I have tried to add the second ecore model element at the part creation
time however the transaction is rolled back if I use the XXXImpl class
when it is created.

If I tried to add it when it is dropped on the canvas using the
XXXEditPart. I get a java.lang.IllegalStateException "Cannot modify
resource set without a write transaction". At this point The
diagramEditingDomain for the EditPart is null so I can't create a
SetCommand.

Where is the best place in the life cycle of the editor or the GMF
generation to create or define the content of my processElement.

I can send you code samples if this will help.
Previous Topic:Information: Changing the save behaviour of your editor
Next Topic:Custom CellEditor for Properties view
Goto Forum:
  


Current Time: Tue Oct 08 15:24:00 GMT 2024

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

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

Back to the top