[EuGENia] Component type/instance diagrams editor [message #1232019] |
Thu, 16 January 2014 02:22 |
Ramón Jiménez Messages: 3 Registered: January 2014 |
Junior Member |
|
|
Apologies in advance if this post is too long.
I'm trying to create an editor similar to the one shown in this example:
http://www.eclipse.org/epsilon/doc/articles/eugenia-affixed-nodes/
However, I need to allow users to explicitly specify component *types*, including which ports each type defines, and then use these types to instantiate components, and explicitly allow visual connections among ports of said components.
To put this another way: imagine you have an UML editor, and you create classes via a class diagram. Now imagine that you want to make a sequence or collaboration diagram, but instead of showing objects as generic boxes (with a "type" attribute letting you select each object's class from a drop-down), you'd like to have each object drawn with the specific attributes and containment references specified for its corresponding class in the class diagram. (No real-life UML tool that I know of allows this, nor is this needed for UML, but I do need it for what I'm trying to accomplish.)
I have thought of three ways to do it, and neither is particularly satisfactory:
1) Model components explicitly, and model component types implicitly or not at all. This is very similar to the model in the link I posted above: have users define a component, attach relevant ports, and if more than one component of a given type is needed, right-click and choose "Duplicate". This, however, does not provide explicit component type modeling, nor does it allow proper component type reuse across diagrams/models
2) Model component types and generate an editor for them. Create a model with all desired component types. Transform that model into an EMFatic/ECore specification where concrete component types become first-level classifiers and generate an editor from there. Preliminary tests suggest that said editors' object palette won't render components with their associated ports
3) Use EWL to create a wizard that will allow users to create a component instance, specify its type via a property, and then by running the wizard automatically create ports attached to the component instance as per its type's specification. This is rather cumbersome from the user point of view, as the user expects to simply drag components into the diagram and be able to "plug" into the components' ports immediately (having previously specified ports when modeling the component type)
It would not be a problem to have separate diagrams for types and instances; on the contrary, it is actually desirable.
Is it possible to achieve this using EuGENia? Or am I running into an EMF/GMF limitation?
Thanks in advance,
Ramón
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03368 seconds