Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Diagram layout(Using CSS to optimize diagram appearance)
Diagram layout [message #1694436] Tue, 05 May 2015 10:21 Go to next message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Hi
We would want to customize the default layout of (class) diagrams in a number of ways using preferrably CSS. Here are our needs:

1. Hiding the property black ball icon for association ends. Or by default assigning the association end as owned by the association. We note bugs having been reported for this, however they do not mention the option of controlling this via CSS, which would be an alternative approach.
2. Hiding the navigation arrows for bidirectional associations (which is a common practice for UML modelling and is listed as an alternative in the UML spec). We note bugs having been reported for this, however they do not mention the option of controlling this via CSS, which would be an alternative approach.
3. Making links "respect" name labels of classes shown in our diagrams. E.g. so that an association link will not cross the text of a class. We have already figured out how to size the .svg shapes to allow for a name label text below the class symbol - which works in most cases. However, when the label becomes long and the association lin is diagonally crossing the label (outside the .svg shape envelope) then the line will cross the text.
4. Suppressing the arrow in the upper right hand corner that indicates that an element represented is not a direct semantic child of the graphical container.
5. Assigning a default position to the <<use>> keyword on top of its usage line.
6. Showing stereotype icons for packages.
7. Enabling line breaks of name labels.

Regards,

Patrik
Re: Diagram layout [message #1694441 is a reply to message #1694436] Tue, 05 May 2015 11:22 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi Patrik,


Indeed, none of these use cases are currently supported. We're close to the 1.1.0 release now so I'm not sure we can do much about this, but here are a few comments:

1. That would be an interesting CSS property. Currently, you can hide *all* arrow decorations using CSS, but that includes both Member Ends balls *and* Navigability Arrows. You can however create a custom palette which will let the member ends be owned by the Association by default

2. Would be interesting as well but not supported right now. We barely allow anything regarding Connector Ends appearance. We also cannot write a CSS Selector to identify Associations owning all their ends, so it's not possible to rely on the source/target decorations property either

3. This would be a layout parameter. We currently consider Layouts to be outside the scope of Papyrus (We recommend relying on external tools such as Kieler Layout instead, which provide powerful layout algorithms). I'm not sure however how it would handle this case

4. That would be a simple CSS Property to add; this can probably be done for Mars

5. That's currently not possible, but maybe Bug 459454 would cover that (Currently scheduled for Mars SR1 in September)

6. There's work-in-progress for manipulating the Stereotype Display with CSS; currently scheduled for Mars. This might cover this use case

7. We've got several requests for this to be implemented, but it is not yet available (Except maybe for SVG labels; I think they do support this)

Regarding SVG Labels (Mentioned in 3. and 7.), we don't really promote this. Starting with Papyrus Mars, Floating Labels (constrained or not) should be preferred (They are now optionally available on all Nodes), but they don't support line-breaks yet.


Regards,
Camille


Camille Letavernier
Re: Diagram layout [message #1694443 is a reply to message #1694441] Tue, 05 May 2015 11:34 Go to previous messageGo to next message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Thanks for your prompt reponse Camille!

Referring to your answers below:
1. How do I hide *all* arrow decorations using CSS?
4. That would be wonderful.
6. That would be wonderful.

Thanks,

Patrik
Re: Diagram layout [message #1694450 is a reply to message #1694443] Tue, 05 May 2015 11:51 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi,

Quote:
1. How do I hide *all* arrow decorations using CSS?


The sourceDecoration and targetDecoration properties can be used:

Association {
	sourceDecoration: none;
	targetDecoration: none;
}


They support a single value ("none"), other cases are not supported yet

Regards,
Camille


Camille Letavernier
Re: Diagram layout [message #1694462 is a reply to message #1694450] Tue, 05 May 2015 12:59 Go to previous message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Thanks

How can I entirely hide the sterotype display for Packages using .css?

Patrik
Previous Topic:Modelling and interaction of mass flows
Next Topic:Convert data model created by Obeo UML designer to Papyrus
Goto Forum:
  


Current Time: Thu Aug 06 07:06:57 GMT 2020

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

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

Back to the top