Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Adapt shape appearance based on complex constraints
Adapt shape appearance based on complex constraints [message #1750155] Fri, 16 December 2016 14:08 Go to next message
Andreas Pleuss is currently offline Andreas PleussFriend
Messages: 18
Registered: June 2015
Junior Member

I would like to change the color of a CallBehaviorAction in an ActivityDiagram depending on whether its called behavior (CallBehaviorAction.behavior) has a specific stereotype applied. For instance, all activites stereotyped as "SpecialActivity" are colored in red and, hence, a CallBehaviorAction calling a "SpecialActivity" should be colored in red as well.

I know that coloring can be handled by CSS but I suppose there is no CSS selector supported for such complex conditions (i.e., stereotype of a referenced element), is there? Otherwise, could anyone give me a hint what would be a good way how to achieve this programmatically?

Many thanks for your help,
Re: Adapt shape appearance based on complex constraints [message #1751374 is a reply to message #1750155] Mon, 09 January 2017 13:42 Go to previous message
Benoit Maggi is currently offline Benoit MaggiFriend
Messages: 129
Registered: March 2013
Location: Bordeaux, France
Senior Member
Hi Andreas,

I believe that it's indeed impossible with a papyrus css selector.

:Warning: , there is no clean-official way to achieve what you want, but here is one way

We managed to achieve a similar goal in SysML 1.4 by branching a custom css engine.
You may find the sources here and in the the afferent plugin.xml

The main goal is to add a rule in this file (sadly we had to extends many other files)

For example deprecated
public static final String DEPRECATED = "deprecated"; //$NON-NLS-1$
     and the related code 

we can call
[deprecated=true] {
	lineColor: orange;

in the css file.

Previous Topic:Custom Palette for Sequence Diagram Editor
Next Topic:Programmatically get a list of registered profiles...
Goto Forum:

Current Time: Wed Jan 29 13:43:15 GMT 2020

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

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

Back to the top