Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCreating metamodel object instances without graphical view
https://www.eclipse.org/forums/index.php/mv/msg/489907/1066764/#msg_1066764
during my work on a GMF application I encountered a problem that I would like to resolve. What I need to do is:
Assume I have 2 node categories
- block
- box
and 1 connection that I can add between blocks:
- connection
that i can draw on the editor, taking them from a palette.
What i would like to achieve is when I click on a connection an instance of another object (let's say called Book) already defined to be part of a block into the ecore metamodel, is added into the block definition of the semantic domain model.
Since this Book is not part of the palette, it doesn't have EditPart and even any EditPolicies, its class is only part of the Model Code package.
Please anyone can help me ??
any suggestion is really welcome.
Thanks,
Luca.]]>Luca Salemio2013-07-04T09:22:04-00:00Re: Creating metamodel object instances without graphical view
https://www.eclipse.org/forums/index.php/mv/msg/489907/1067284/#msg_1067284
please any suggestion on this topic ??
If I have to modify semantic model without drawing objects, can I use directly myFactory.eINSTANCE to create my element or i should use some other ways like:
Ralph]]>Ralph Gerbig2013-07-09T10:04:17-00:00Re: Creating metamodel object instances without graphical view
https://www.eclipse.org/forums/index.php/mv/msg/489907/1071215/#msg_1071215
I tried to understand more about unspecifiedtyperequest you suggest me, but i still don't get this way.
To be more clear: what i have is an object defined in my ecore metamodel and so it has its own EObject and EObjectImpl into my project directory.
I don't want that it has graphical description, so i didn't add it in the graphical and tooling gmf model then it has not EditPart and EditPolicies.
At the moment of instantiation of other objects i would like to also add this object to the underling editor metamodel but i don't know how to do that.
can you give me some advises ?
thank you very much again,
Luca.]]>Luca Salemio2013-07-19T15:21:38-00:00Re: Creating metamodel object instances without graphical view
https://www.eclipse.org/forums/index.php/mv/msg/489907/1072155/#msg_1072155
did you you try to use the Feature Sequenze Initializer and Reference New Element Spec of gmfmap? This allows you to create or setup model elements on model element creation. The easiest way I could imagine is to add both to the model elements that trigger the creation process when being instantiated. This prevents you from writing any code.