|
Re: How to use the Container Configuration in an ElementTypeSetConfiguration? [message #1736540 is a reply to message #1736521] |
Thu, 30 June 2016 09:21 |
Florian Noyrit Messages: 16 Registered: February 2016 Location: Grenoble, France |
Junior Member |
|
|
The Container Configuration is used to specify what ECore::EReference to use when multiple containing features are possible on the same metaclass.
For instance, when one want to create a UML::Behavior to a UML::State, there are three possible containing features: UML::State::entry, UML::State::exit, UML::State::doActivity. In this case, one could use the Container Configuration to force its ElementType to use one of this three. If not specified, the ElementType Framework will look for possible containing features and use the first it founds.
Therefore, this won't address your need. What you most probably need to do is to look at the rule-based elementtypes. You'll find usage of these in org.eclipse.papyrus.infra.types.tests\model\elementtypetest.elementtypesconfigurations.
Regarding the empty dialog, it is the expected behavior. Indeed, to populate this dialog, EMF seeks for all Ecore::EReference available in the ResourceSet. Therefore, if none is found (because the UML metamodel is not loaded) the dialog is empty. By defining the EReference manually in the elementtypeconfiguration model you indirectly added the UML metamodel to be loaded in the ResourceSet. Instead, you could just use the "Load Resource..." menu item available in the context menu when you right click in the editor.
HTH
|
|
|
|
Re: How to use the Container Configuration in an ElementTypeSetConfiguration? [message #1736921 is a reply to message #1736540] |
Mon, 04 July 2016 11:43 |
Patrik Nandorf Messages: 195 Registered: January 2013 Location: Sweden |
Senior Member |
|
|
Thanks Florian,
When I try to reach the Papyrus/Migration Guide/Neon it can't be reached anymore. I believe that one had info on the new element types, eg. rule based element types.
What is the difference between a Type Configuration (which I assume is a rule based type) and a Specialization Type Configuration? From what I can see from the editing of the model the Type Configuration is similar to a Specialization Type Configuration but can have rules. Are there other differences?
Regards
Patrik
florian noyrit wrote on Thu, 30 June 2016 11:21The Container Configuration is used to specify what ECore::EReference to use when multiple containing features are possible on the same metaclass.
For instance, when one want to create a UML::Behavior to a UML::State, there are three possible containing features: UML::State::entry, UML::State::exit, UML::State::doActivity. In this case, one could use the Container Configuration to force its ElementType to use one of this three. If not specified, the ElementType Framework will look for possible containing features and use the first it founds.
Therefore, this won't address your need. What you most probably need to do is to look at the rule-based elementtypes. You'll find usage of these in org.eclipse.papyrus.infra.types.tests\model\elementtypetest.elementtypesconfigurations.
Regarding the empty dialog, it is the expected behavior. Indeed, to populate this dialog, EMF seeks for all Ecore::EReference available in the ResourceSet. Therefore, if none is found (because the UML metamodel is not loaded) the dialog is empty. By defining the EReference manually in the elementtypeconfiguration model you indirectly added the UML metamodel to be loaded in the ResourceSet. Instead, you could just use the "Load Resource..." menu item available in the context menu when you right click in the editor.
HTH
|
|
|
Powered by
FUDForum. Page generated in 0.03445 seconds