Skip to main content



      Home
Home » Modeling » Graphiti » Diagram update after model change
Diagram update after model change [message #1704916] Mon, 10 August 2015 13:28 Go to next message
Eclipse UserFriend
I've asked similar question before, but I think this one is a bit different.

When I update my model the diagram shows the changes and red hashed border appears around the shapes and exclamation label is created for the shape where change occurred. However, the refresh icon is disabled on the shape, so I can't update it manually. If I resize the editor the red border goes away, which prompts me to believe that change is registered by editor, but it does not refresh itself?

Thanks,
Alex
Re: Diagram update after model change [message #1704981 is a reply to message #1704916] Tue, 11 August 2015 05:03 Go to previous messageGo to next message
Eclipse UserFriend
Alex,

the IDiagramTypeProvider interface has some methods isAutoUpdateAt* that
control the refresh behavior in the editor. You may try to override to
achieve the behavior you would like.

Michael
Re: Diagram update after model change [message #1705300 is a reply to message #1704981] Thu, 13 August 2015 11:16 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Michael.

Perhaps I worded my question wrong. The diagram gets updated, however, red hashed border is still visible regardless.

To better explain this I recorder a video. As you can see when model updates, change is reflected is the diagram, however red border is still visible and disappears when I resize the editor. So is this some kind of issue with refresh? My update feature extends DefaultUpdateDiagramFeature.


Edit: I believe the red border was diapering after resize because of the resize feature that I implemented. If I remove resize feature, the red border stays there even when I resize the editor. The graphical elements are updated, so why is red border still there? Also, is the fact that refresh icon for shape with red border is not enabled indicates that both models are updated?

[Updated on: Thu, 13 August 2015 14:38] by Moderator

Re: Diagram update after model change [message #1705549 is a reply to message #1705300] Mon, 17 August 2015 09:05 Go to previous message
Eclipse UserFriend
Alex,

hm, that sounds as if the editor refresh does not notice something has
changed. That might happen when something is updated that is not directly
linked to a relavant domain object. Triggering a refreshContent on the
DiagramBehavior (getDiagramBehavior on DiagramEditor) will help.

Michael
Previous Topic:NPE after upgrading to eclipse mars
Next Topic:Creating a Pictogram link triggers refresh of entire diagram (bug?)
Goto Forum:
  


Current Time: Sun Apr 27 13:56:48 EDT 2025

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

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

Back to the top