Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Diagram update after model change
Diagram update after model change [message #1704916] Mon, 10 August 2015 17:28 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
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 09:03 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1899
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 15:16 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
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 18:38]

Report message to a moderator

Re: Diagram update after model change [message #1705549 is a reply to message #1705300] Mon, 17 August 2015 13:05 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1899
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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: Wed Nov 14 16:13:23 GMT 2018

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

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

Back to the top