Home » Modeling » Papyrus » Class Diagrams get messed up?
Class Diagrams get messed up? [message #1716073] |
Mon, 30 November 2015 21:50  |
Eclipse User |
|
|
|
When I create a class diagram with Papyrus, then save, close, and reopen the diagram, it gets messed up. Association and generalizations lines that were neatly lined-up get offset from each other. It's even worse when I share diagrams with team members by exporting and emailing the project. The exchanged diagrams started out looking pretty good but end up looking terrible.
I'm using Papyrus UML 1.1.2015091641440 on Eclipse 4.5.1 Mars. I had the same problem with the previous Luna-based version. Now I've reached a sufficient level of annoyance to complain about it.
|
|
|
Re: Class Diagrams get messed up? [message #1716087 is a reply to message #1716073] |
Tue, 01 December 2015 03:54   |
Eclipse User |
|
|
|
Hi Mark,
I've never experienced this kind of issue in "simple" diagrams (Such as Class diagram) in Papyrus. The layout in this diagram is simple enough so that it doesn't randomly change after reopening
I see a few things that might break layout when exchanging diagrams with someone else. However, I don't see any reason (and never actually experienced it) why it would changed by being reopened on the same platform.
Here are a few leads about what might change the layout of a diagram:
- Different fonts. When exchanging from Windows to Linux, the set of available fonts might be different. Different fonts mean different sizes, and different sizes might mean different layout
- Different CSS Theme. Since the CSS Theme is user-specific (workspace-specific actually), it may be different when sharing a model. If the CSS Theme only changes colors, then everything's fine, but CSS might also change sizes (font size, border/line size, etc.), which might affect layout
- Changing the semantic (*.uml) model while the diagrams are closed. If the length of a specific label changes (because an element has been renamed), this will most likely affect the layout
- DPI: This affects the size of the font, so this could also affect the layout
But if you're not changing anything to the model or the platform, then simply reopening shouldn't change anything. I know we've had a bug on the first Mars version where some specific elements in specific diagrams didn't get their position saved properly, but that didn't happen in the Class Diagram, and it didn't affect all elements.
So if you have any lead on what might cause these changes, it would be interesting to know.
BTW, we've started to experiment a new component to improve layout stability. On the Mars version, it is only a beta (And available as an extra component), but we plan to make it stable and available by default for the next version (Neon).
HTH,
Camille
|
|
| | | |
Re: Class Diagrams get messed up? [message #1807135 is a reply to message #1807134] |
Thu, 23 May 2019 07:50   |
Eclipse User |
|
|
|
Hi Oliver,
It's probably a problem somewhere between Papyrus and GMF. I believe GMF supports scalable units, based on the DPI level, but Papyrus always uses pixels (So texts are scaled, but figures aren't, causing layout inconsistencies)
In Papyrus, we provided a workaround to optionally use a fixed label height (In Pixels), to improve diagram layout stability: https://bugs.eclipse.org/bugs/show_bug.cgi?id=535519
You could apply this workaround with a CSS Stylesheet containing this rule:
* {
labelHeight: 16 /* Pixels */;
}
labelWidth is also supported, but text length varies more than text height; so it's not really usable in practice (If the value is too high, scrollbars may appear; if it's too low the text will be truncated)
With this rule, the text will be truncated when necessary, instead of expanding the figure, which should result in more stable layouts across platforms/screens.
Regards,
Camile
|
|
| |
Goto Forum:
Current Time: Wed Jul 23 14:09:25 EDT 2025
Powered by FUDForum. Page generated in 0.30843 seconds
|