goGo = false;
// create a thread and inside do a syncExec
Thread thread = new Thread(){
public void run() {
Display.getDefault().syncExec(new Runnable(){
public void run() {
SomeDialog someDialog = new SomeDialog();
someDialog.open(Display.getDefault().getActiveShell());
goGo = true;
}
});
}
};
thread.start();
// wait for the dialog to finish
while( !goGo ) {
try {
Thread.sleep(300);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
and then finally do whatever you have to do with the asked result.
No comments:
Post a Comment