GMF Diagram Update Problem [message #675320] |
Tue, 31 May 2011 07:27 |
Elmander Messages: 1 Registered: May 2011 |
Junior Member |
|
|
We have an EMF model and its corresponding GMF diagram. We can synchronize model and the diagram by updating model using command stack. But when the update is not trigged from GUI thread, gmf editor and whole software is locked after a while.
This happens when we receive periodic messages from network which includes model update information and when we update the model accordingly. We can put that code (where we receive network message and update the model accordingly) in gui thread as follows where we receive the message, and that solves the problem. But that part of the code should not have a dependency to gui. But when we dont do this, gmf editor and the whole software is locked.
What can be the solution for this problem?
public void receiveNetworkMessage (){
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
updateModel();
}
});
}
Elmander
Software Developer
|
|
|
Powered by
FUDForum. Page generated in 0.02949 seconds