Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » ConnectionDecorator is updated only once
ConnectionDecorator is updated only once [message #1770727] Wed, 16 August 2017 14:27 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
I have UpdateFeature that update ConnectionDecorator when value in Properties View is changed. Update works only when I type first character in property field, all following characters do not trigger update() method in the feature. During debugging I saw that in GFWorkspaceCommandStackImpl.execute() method is being called with null options, so ExecutionInfo is never set and thus never put on the Stack. Any ideas why Update method is not being executed correctly?
Re: ConnectionDecorator is updated only once [message #1770819 is a reply to message #1770727] Thu, 17 August 2017 11:19 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Alex,

do you have a stacktrace of the failing call?

Michael
Re: ConnectionDecorator is updated only once [message #1770929 is a reply to message #1770819] Fri, 18 August 2017 21:06 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
No, no stack trace.
Re: ConnectionDecorator is updated only once [message #1771032 is a reply to message #1770929] Mon, 21 August 2017 11:33 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hm, that would then rather be guessing. I think you need to investigate where the GFWorkspaceCommandStackImpl.execute() call without option comes from.

Michael
Re: ConnectionDecorator is updated only once [message #1771092 is a reply to message #1771032] Mon, 21 August 2017 20:44 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
Another thing I noticed, which I am not sure why I didn't before is that with presence of update feature that is suppose to update ConnectionDecorator when a Connection label property is changed in Properties View, the connection between two object is painted as red dashed line. I forgot what that means, but if I recall it has something to do with update going wrong, yes?
Re: ConnectionDecorator is updated only once [message #1771143 is a reply to message #1771092] Tue, 22 August 2017 12:58 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
That basically means that there was an update (most probably triggered from another EMF EditingDomain) to that object and the update is not triggered automatically. Usually that happens when a domain object is changed but the graphical representation is not adapted, e.g. on editor startup. The update feature noticed that there is something to update, but only marks the object because the update strategy is set for no automatic update. See http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.graphiti.doc%2Fresources%2Fdocu%2Fgfw%2Fupdate-feature.htm&cp=27_1_3_2 in the docu.

Michael
Re: ConnectionDecorator is updated only once [message #1771165 is a reply to message #1771143] Tue, 22 August 2017 15:21 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
I think see what's going on. Since ConnectionDecorator is not linked to any object in a model it's doesn't get updated when a needed model object changes.

[Updated on: Tue, 22 August 2017 18:24]

Report message to a moderator

Previous Topic:Undo Command doesn't unset model attributes
Next Topic:Can context menus provided by Graphiti be removed?
Goto Forum:
  


Current Time: Sun Jun 24 13:20:32 GMT 2018

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

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

Back to the top