Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Change Stereotype display programmatically
Change Stereotype display programmatically [message #1108136] Fri, 13 September 2013 11:43 Go to next message
Han G is currently offline Han GFriend
Messages: 11
Registered: August 2013
Junior Member
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 18:26 Go to previous message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
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


Camille Letavernier
Previous Topic:Compare of Notation file
Next Topic:extending requirement diagram in SysML
Goto Forum:
  


Current Time: Fri Apr 26 15:52:24 GMT 2024

Powered by FUDForum. Page generated in 0.02919 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top