Bug 472167 - [CSS] Shape customization only works very partially
Summary: [CSS] Shape customization only works very partially
Status: UNCONFIRMED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 436547 471105
Blocks:
  Show dependency tree
 
Reported: 2015-07-08 08:31 EDT by Klaas Gadeyne CLA
Modified: 2018-12-20 09:47 EST (History)
7 users (show)

See Also:


Attachments
Illustrates the problem with SysML 1.4 (42.88 KB, image/png)
2015-07-08 08:34 EDT, Klaas Gadeyne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaas Gadeyne CLA 2015-07-08 08:31:29 EDT
https://wiki.eclipse.org/Papyrus/Mars_Work_Description/NewFeature/Shape_customisation
describes new mars capabilities for Shape customization.  However, it turns out that most features only work for very specific situations, and these limitations seem to be completely undocumented?

Some examples:

1/ Port{ portPosition:"inside"; /*onLine, outside*/ } only works on a component diagram, but not on a Composite Structure diagram (and hence neither on a SysML IBD diagram)

2/ Class > Compartment{	lineLength:1; } works fine on UML class diagrams, but not for classes on the CS diagram, and only partially for Blocks on a SysML 1.4 BDD diagram
Comment 1 Klaas Gadeyne CLA 2015-07-08 08:34:33 EDT
Created attachment 255059 [details]
Illustrates the problem with SysML 1.4

Attachment illustrates the result of 

Class{
	textAlignment:"left";
	displayHeader:true;
	/* qualifiedNameDepth:full; */
}

Class > Compartment{
	lineLength:1;
}

To a SysML 1.4 BDD.  Note that the lineLength property is respected for some, but not all compartments
Comment 2 Sebastian Herzig CLA 2015-07-13 15:26:42 EDT
I can confirm this bug. Related to what was mentioned in bug 437186, the following also does not work (1.1.0.201507130504) (tested on UML class diagrams and SysML 1.1 BDDs):

Class[isAbstract=false] > Property[appliedStereotypes~="myStereotype"] {
	fontColor: #B20000;
	bold: true;
}

I.e., all properties to which the stereotype "myStereotype" is applied that are owned by non-abstract classes, the font color and boldness is to be adjusted.

A couple of other things don't seem to behave well either: e.g., when setting "displayTag" to "true" for Property, this enables the stereotype of a property to be visible when an element is dragged from the model explorer onto a diagram. However, none of the existing elements on the diagram are affected (even when turning "model synchronization" off and on again, or reopening diagrams) (is this even valid syntax? Defined for Shape and Connector only according to doc? But is Property a subtype of Shape?).
Comment 3 Camille Letavernier CLA 2015-07-15 10:21:16 EDT
> Class[isAbstract=false] > Property[appliedStereotypes~="myStereotype"] {

The property is not owned directly by the Class (Which is the meaning of >). There is an intermediate component

Using the following should work (For both structure compartments in StructureD and attributes compartment in ClassD):

Class[isAbstract=false] > Compartment > Property[appliedStereotypes~="myStereotype"] {
...
}
Comment 4 Klaas Gadeyne CLA 2015-09-17 06:21:56 EDT
Seems to be related to 436547, 471105

@Camille, as you might have seen.  In the original bug example there are no selectors applied, so I would guess that this is clearly not an example of syntax errors in the css file.