Extending/Specializing [message #516734] |
Wed, 24 February 2010 17:41  |
Eclipse User |
|
|
|
I have an EMF model that includes a "Node" that contains an interface, "Activity". I do not need to expose this interface in the UI, but I do need to create an object behind the scenes that implements it.
I would like to have several palette tools that create this same kind of Node element, but have them configured differently (including creation of an implementer of "Activity") depending on which palette tool was used to create it. I would like to contribute these palette tools.
I have tried going through the steps in the tutorials on Extensible Type Registry and Configuring and Extending the Diagram Palette. I am using a Specialized Type (of my Node).
However, my elements could not be added to the diagram. After some frustration, I finally found that the generated diagram code does not allow elements not generated to be added to the diagram. One thing I found was that the generated SemanticEditPolicy of the model representing the diagram expects particular element types when building the CreateCommand.
What all (and how) do I need to modify to allow the use of a Specialized Type in the generated code? Am I trying to solve my problem with the wrong method?
It appears that all the extending examples use Logic which does not appear to be generated. Is that true?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07810 seconds