Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Class Diagrams get messed up?
Class Diagrams get messed up? [message #1716073] Tue, 01 December 2015 02:50 Go to next message
Mark Linehan is currently offline Mark LinehanFriend
Messages: 9
Registered: July 2014
Junior Member
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.


Mark
Re: Class Diagrams get messed up? [message #1716087 is a reply to message #1716073] Tue, 01 December 2015 08:54 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
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


Camille Letavernier
Re: Class Diagrams get messed up? [message #1794252 is a reply to message #1716087] Tue, 28 August 2018 05:51 Go to previous messageGo to next message
shah aalam qureshi is currently offline shah aalam qureshiFriend
Messages: 1
Registered: August 2018
Junior Member
I am also facing same kind of issue,
I have existing project, where I have lots of class diagram, previously I have been using windows 7 on desktop, but now I have laptop and windows 10 installed on it. when I open class diagram it is messed up.(see Attachment)

I am using eclipse Mars.2 Release (4.5.2) and papyrus backbone 1.1.4. I have tried to change my laptops resolution and many other things. but nothing seems to work. refactoring all diagrams seems to be time consuming task, and other colleagues are still using windows 7. is their any solution to this problem?
  • Attachment: pyparus.JPG
    (Size: 124.75KB, Downloaded 117 times)
Re: Class Diagrams get messed up? [message #1794313 is a reply to message #1794252] Tue, 28 August 2018 19:37 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

Is your new laptop using High DPI setting? If so, I believe this would make fonts bigger, which in turns makes elements (classes) bigger as well (Unless they have been manually resized, in which case they should keep their original size in pixels).

Papyrus doesn't properly support High DPI (So in some cases, layout could indeed be very different on a high DPI display). Unfortunately, there's not much you can do about this at the moment

HTH,
Camille


Camille Letavernier
Re: Class Diagrams get messed up? [message #1807134 is a reply to message #1794313] Thu, 23 May 2019 11:26 Go to previous messageGo to next message
Oliver Gardiner is currently offline Oliver GardinerFriend
Messages: 50
Registered: May 2014
Location: Oxford, UK
Member
Hi Camille,

Many thanks for the info - in later versions of Windows setting the DPI scaling to 100% seems to make things usable again. Is the issue with Papyrus, GMF or Eclipse and do you know if a fix is planned?

Many thanks,

Oliver
Re: Class Diagrams get messed up? [message #1807135 is a reply to message #1807134] Thu, 23 May 2019 11:50 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
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


Camille Letavernier
Re: Class Diagrams get messed up? [message #1807144 is a reply to message #1807135] Thu, 23 May 2019 14:19 Go to previous message
Oliver Gardiner is currently offline Oliver GardinerFriend
Messages: 50
Registered: May 2014
Location: Oxford, UK
Member
Perfect - many thanks
Previous Topic:Qualified Associations
Next Topic:Message Position
Goto Forum:
  


Current Time: Thu Apr 18 04:02:56 GMT 2024

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

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

Back to the top