Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to apply Stereotype to org.eclipse.uml2.uml.State ??
How to apply Stereotype to org.eclipse.uml2.uml.State ?? [message #1730431] Mon, 25 April 2016 19:02 Go to next message
Da Mist is currently offline Da MistFriend
Messages: 9
Registered: November 2015
Junior Member
Hi,

I am trying to change the color of the uml state of a statemachine in papyrus.
I have access to the State. I got it using Region.getSubvertex(State name).
But I am not able to convert it to shapeImpl and apply the stereotype to it.
For applying sterotype is am using following code:

TransactionalEditingDomain ted = TransactionUtil.getEditingDomain(cssShapeImpl);
ted.getCommandStack().execute(new RecordingCommand(ted) {

@Override
protected void doExecute() {
cssShapeImpl.setFillColor(myNewColor);
}
});

I'll be very grateful if anyone can help me!
Re: How to apply Stereotype to org.eclipse.uml2.uml.State ?? [message #1730503 is a reply to message #1730431] Tue, 26 April 2016 12:04 Go to previous messageGo to next message
Mickael ADAM is currently offline Mickael ADAMFriend
Messages: 31
Registered: February 2014
Member
Hi,

Have you tried to use CSS to set the fill color value ?
Re: How to apply Stereotype to org.eclipse.uml2.uml.State ?? [message #1730567 is a reply to message #1730503] Tue, 26 April 2016 17:10 Go to previous message
Da Mist is currently offline Da MistFriend
Messages: 9
Registered: November 2015
Junior Member
Hi Mickael,

Thanks for your reply!
I am now able to cast the vertex to CSSShapeImpl and able to setFillColor using TransactionalEditingDomain.
It changes the color immediately. Smile

Thanks!
Previous Topic:Merging generalization lines when using multiple subclasses
Next Topic:paletteDefinition in Neon?
Goto Forum:
  


Current Time: Mon Jul 13 09:39:01 GMT 2020

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

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

Back to the top