Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Control styles based on common property
Control styles based on common property [message #1839341] Fri, 19 March 2021 12:15 Go to next message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Hi,

I know I can control the style based on a UML or stereotype property of the object to which the style is applicable.

e.g.
Class[isAbstract=true]

Can the style be controlled by a property of another element than the style is applied to?

e.g.
Class[Model::PackageA::ClassC::isAbstract=true]
Re: Control styles based on common property [message #1839342 is a reply to message #1839341] Fri, 19 March 2021 12:22 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi Patrik,

It is not possible to write complex selectors with CSS (i.e. model or properties navigation is not supported). The only alternative is to write custom properties, using one of the (internal) extension points in Papyrus. See https://www.eclipse.org/forums/index.php/t/1107156/

But this needs to be done when defining the language; it can't be done on a per-model basis.
HTH,
Camille


Camille Letavernier
Re: Control styles based on common property [message #1839369 is a reply to message #1839342] Fri, 19 March 2021 14:41 Go to previous messageGo to next message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Hi Camille,

Hope all is well.

What if I update update the a stereotype property programmatically, will the 'styles framework' listen for such changes and update the style application accordingly?

/Patrik
Re: Control styles based on common property [message #1839371 is a reply to message #1839369] Fri, 19 March 2021 14:46 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

Yes, CSS are reapplied after each model change; so this should work (I think :) ).

Camille


Camille Letavernier
Re: Control styles based on common property [message #1839372 is a reply to message #1839371] Fri, 19 March 2021 14:52 Go to previous messageGo to next message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Great! I'll give it a try
Re: Control styles based on common property [message #1839475 is a reply to message #1839372] Mon, 22 March 2021 10:23 Go to previous message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Works great! Thanks
Previous Topic:Problems on first encounter with Papyrus 2021-03
Next Topic:Papyrus not working with SymML 1.6 plugin
Goto Forum:
  


Current Time: Sat Apr 27 02:51:08 GMT 2024

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

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

Back to the top