Change Stereotype display programmatically [message #1108136] |
Fri, 13 September 2013 07:43  |
Eclipse User |
|
|
|
Hi,
I am trying to change the "Stereotype display" property in the "Appearance" tab of the Properties-View from "Text" to "Icon" programmatically.
I've found that you can change other properties such as the Routing-Style via
CompositeCommand compositeCommand = new CompositeCommand("label");
SetRequest request = new SetRequest(edge.getNotationView(), NotationPackage.eINSTANCE.getRoutingStyle_Routing(), Routing.RECTILINEAR_LITERAL);
SetValueCommand cmd = new SetValueCommand(request);
compositeCommand .add(cmd);
But I cannot find any entries for the stereotype part in the NotationPackage. Is there another interface which offers this or do I have to use a different approach?
Thanks for your help,
Han
|
|
|
Re: Change Stereotype display programmatically [message #1108348 is a reply to message #1108136] |
Fri, 13 September 2013 14:26  |
Eclipse User |
|
|
|
Hi,
The GMF Notation package handles generic graphical concepts. UML-specific concepts are handled with EAnnotations.
You should try the following:
- Create a model with a Stereotyped element
- Display the stereotype manually
- Save and look at the *.notation file, compare to the initial version to see the difference (New EAnnotation)
Then you can either re-create this EAnnotation programmatically, or find the Papyrus command which creates it (Most likely in the oep.uml.diagram.* plug-ins, probably oep.uml.diagram.common)
Regards,
Camille
|
|
|
Powered by
FUDForum. Page generated in 0.03686 seconds