| [news.eclipse.tools.gef] Re: None-UI thread model updates and Display.getCurrent() returning null. |
Exactly what I do. In my property listeners I create a runnable to handle the call to refreshVisuals(). Actually my runnable is a class member and not a local variable.
I pass my runnable into a display I get by calling
getViewer().getControl().getDisplay();
I use syncExec
CL
Anytime you do something like that you should catch any NPEs. It is possible that the editor gets closed, or the editpart is removed from the viewer, etc. after the background event has been dispatched but before your code runs.
CL