I have a problem where I want the current UI execution to stop, and perform
some other ui (not a dialog box), and wait until that task is finished
before returning to the previous spot.
I have code that is running inside GEF that wants to put up a menu when the
end connection (mouse down) event is run. I tried the following trick; it
works on the MAC and under windows, but not under Linux. I wonder if there
is a better way.
Here is the code:
do some code....
Control c = Display.getCurrent().getFocusControl();
if (c != null) {
Menu old = c.getMenu();
MenuManager mm = new MenuManager();
for (String s : cats) {
mm.add(new _Action(s, isSource));
}
final Menu m = mm.createContextMenu(c);
c.setMenu(m);
m.setVisible(true);
c.getDisplay().readAndDispatch();