graphiti property view during refresh,want to write model by emf recording commad [message #1219626] |
Wed, 04 December 2013 22:03  |
Eclipse User |
|
|
|
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 #1219850 is a reply to message #1219738] |
Fri, 06 December 2013 04:26  |
Eclipse User |
|
|
|
Michael Wenz wrote on Thu, 05 December 2013 10:30Hi,
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: Mon, 09 December 2013 20:12] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.12088 seconds