Bug 489280 - [CSS] Selector inheritance not implemented
Summary: [CSS] Selector inheritance not implemented
Status: UNCONFIRMED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.1.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-09 07:47 EST by Johan Van Noten CLA
Modified: 2016-03-16 05:14 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Van Noten CLA 2016-03-09 07:47:48 EST
https://wiki.eclipse.org/MDT/Papyrus/UserGuide/CSS#Stereotype_Display
states the following.

[quote]Limitation on selector inheritance: It is not possible to apply a style to all descendant of a given Metaclass. For example, a Behavior will not inherit styles from a Class, although a Behavior actually is a Class.
[/quote]

Use case:
* Define a stereotype that can apply to all NamedElements
* Color all Classes orange if they have that given stereotype attached.

For such a use case, you have to think about all metaclasses that potentially have the stereotype applied.
The workaround of using * as a selector doesn't work, because then you also color elements outside of the desired hierarchy (non-descendants of Class).
The workaround to define multiple stereotypes that only apply to a part of the desired metaclass inheritance tree is awkward.
Comment 1 Johan Van Noten CLA 2016-03-09 09:16:45 EST
Seems this was already discussed as a part of bug #384571 (comment 8)
Still valuable to track as a separate issue.

Camille's comment:
Metaclass inheritance (e.g. selecting abstract UML Metaclasses, such as "Element" or "StructuredClassifier") is still not supported (And requires changes in the CSS Engine, IIRC, which cannot be easily done in Papyrus yet)