| Summary: | Stylesheets: Compartment[type="compartment_shape_display"] showTitle:false; does not work | ||
|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Toni Siljamäki <toni.siljamaki> |
| Component: | Others | Assignee: | Project Inbox <mdt-papyrus-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cletavernier, papyrus-bugs |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
"showTitle" is the title of the compartment; not the "name" of the Component. See "Right click > Show/Hide Compartment > Check "show title" to see what "showTitle" does. The title cannot be edited. Labels (Element name) are currently not supported by CSS (See bug 417396 for this specific enhancement request) Ahhh... I tried until my eyes turned red to get rid of the <<component>>-with-name compartment for a component, but could not achieve that. Especially the <<component>> was a bit annoying, because I could not find any Appearance property to disable it. At the same time I was also struggling with Bug 419325, and could not achieve anything with that either. I found some commented-out code in e.g. the UMLViewProvider.java file, and then, I guess, I got into the wrong track late in night. If I Right click > Show/Hide Compartment I cannot find the compartment containing the <<component> and name for a component. Instead of closing this bug it could be retitled to explain what I really was after, which is to disable/hide the <<component>>-with-name compartment for a component, which currently is not possible. > Instead of closing this bug it could be retitled to explain what I really > was after, which is to disable/hide the <<component>>-with-name compartment > for a component, which currently is not possible. This is already covered by Bug 417396 I can mark it as duplicate instead of invalid, but there's no point to have both bugs opened for the same thing. (Actually, I just noticed that Bug 417396 doesn't cover this use case, but it is really similar. I'll add a comment for that). *** This bug has been marked as a duplicate of bug 417396 *** Thanks. :) |
Compartment[type="compartment_shape_display"] { visible: true; /* THE showTitle DOESN'T DO ANYTHING */ showTitle:false; } The reason why it doesn't work seem to be the following in org.eclipse.papyrus.uml.diagram.component.providers.UMLViewProvider.java: if(hasTitle) { TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle(); ts.setShowTitle(true); rv.getStyles().add(ts); } As soon as the modelled component has a title at least one character long the title gets displayed. One can easily test this by creatig a new component and remove the characters in the title, which disappears when the last character is deleted and appears again if one character is entered.