Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » [CSS] Filter on fields of type
[CSS] Filter on fields of type [message #1724523] Wed, 24 February 2016 11:24 Go to next message
Johan Van Noten is currently offline Johan Van NotenFriend
Messages: 87
Registered: July 2009
Member
Suppose I have a profile "Status" with a stereotype property isResolved:Boolean.
If I want to color an "unresolved" Port orange, I can apply the Status stereotype to that Port and define the following CSS rule.

Port[appliedStereotypes~="Status"][isResolved=false] {
	fillColor : orange;
}


This works fine.

It is unclear how to support deeper nesting.
Suppose I want to color a Port in case its Type has a Status Unresolved.
As far as I know, there is no way to implement this indirection, is there?

One can extend the known CSS fields of Port e.g. typeIsUnresolved.
This only works for a profile deployed through a bundle (in order for the bundle to also register the correct extensions).
It is not supported in the typical scenario where a dynamic profile is directly applied from the workspace itself.

Is there a way to do this anyway?
(Toy example in attachment)
Re: [CSS] Filter on fields of type [message #1724527 is a reply to message #1724523] Wed, 24 February 2016 11:55 Go to previous message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi Johan,

This is indeed not supported. The CSS grammar doesn't provide enough flexibility to implement this without breaking the specification. We might be able to implement that with e.g. OCL Queries, stored in a separate Query model and referenced from the Stylesheet. This would allow dynamic customization for advanced scenarios, but CSS itself is not sufficient

Regards,
Camille


Camille Letavernier
Previous Topic:How to open the editor on given element in given diagram ?
Next Topic:How to use Complete OCL files with Papyrus?
Goto Forum:
  


Current Time: Fri Jul 10 07:32:14 GMT 2020

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

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

Back to the top