Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » graphiti property view during refresh,want to write model by emf recording commad
graphiti property view during refresh,want to write model by emf recording commad [message #1219626] Thu, 05 December 2013 03:03 Go to next message
xiao yu zhou is currently offline xiao yu zhouFriend
Messages: 20
Registered: August 2013
Junior Member
Hi gays:
i want to edit model data by emf recording command in property view during refresh.so I just did that,then emf said i wrote model without transaction. I find during refresh,the command is not top level command.
It is obvious that there are two threads there editing the model data,the one is graphiti create feature and the other is the property view which is invoking the refresh.
now i just want to know how to wait the graphiti create feature thread end, specificlly speaking, wait the topLevelCommand in GFWorkspaceCommandStackImpl back to true.
i really appreciate your answer and help.
Re: graphiti property view during refresh,want to write model by emf recording commad [message #1219738 is a reply to message #1219626] Thu, 05 December 2013 15:30 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1640
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi,

not sure why there are 2 threads involved here, Graphiti itselft should not
open them. How do you trigger the property view update?

Have you seen the section "How do i build an editable property sheet? " at
http://www.eclipse.org/graphiti/developers/faq.php

Michael
Re: graphiti property view during refresh,want to write model by emf recording commad [message #1219850 is a reply to message #1219738] Fri, 06 December 2013 09:26 Go to previous message
xiao yu zhou is currently offline xiao yu zhouFriend
Messages: 20
Registered: August 2013
Junior Member
Michael Wenz wrote on Thu, 05 December 2013 10:30
Hi,

not sure why there are 2 threads involved here, Graphiti itselft should not
open them. How do you trigger the property view update?

Have you seen the section "How do i build an editable property sheet? " at
http://www.eclipse.org/graphiti/developers/faq.php

Michael


Hi Michael.
I want to edit the model data(Emf model) in property method refresh. However, when i dragged a pe element in the diagram, then i got an error warning showing me that i edit model without a transaction editing domain. Then i debugged in,i found the toplevelcommand variable in Gfcommandstackimpl class was false. I know that whole create pe method contained in a command. If there is only one thread running there the variable can not be false. Besides i found after pe created, refresh behavior would be invoked and the refresh behavior opened a refresh job and the code in the job invoked the Tabpropertysheet's refresh method.
now i move the editing code from refresh method to creatfeature. now the warning gone.

[Updated on: Tue, 10 December 2013 01:12]

Report message to a moderator

Previous Topic:Different classloader in ToolBehaviorProvider?
Next Topic:Share the same editingDomain in MultiPageEditor
Goto Forum:
  


Current Time: Fri Dec 19 12:59:49 GMT 2014

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

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