X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fworkbench%2Faction%2FChooseActionRequest.java;fp=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fworkbench%2Faction%2FChooseActionRequest.java;h=dc8e5a67bf7079c6557035bc8fc2760afb5fbb40;hb=27486a61ad5a2df27c62edaff098926363a025b1;hp=210bdf91107d1a8fc276a982a4a397148f28cf3f;hpb=a770d29c1cd08ec09aed5a988cb54c9aaf623f3f;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/action/ChooseActionRequest.java b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/action/ChooseActionRequest.java index 210bdf911..dc8e5a67b 100644 --- a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/action/ChooseActionRequest.java +++ b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/action/ChooseActionRequest.java @@ -141,27 +141,14 @@ public class ChooseActionRequest extends ReadRequest { return; } } else { - parent.getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - if (parent.isDisposed()) - return; - -// System.out.println("ACTIONS: " + Arrays.toString(actions)); - IAction action = chooseAction(parent, actions, resourceName, neverPromptForAction); - if (action != null) { - action.run(); - return; - } - -// // 2. No actions ran, thus just open/close the tree -// // node. -// if (viewer.getExpandedState(singleSelection)) { -// viewer.collapseToLevel(singleSelection, 1); -// } else { -// viewer.expandToLevel(singleSelection, 1); -// } - + parent.getDisplay().asyncExec(() -> { + if (parent.isDisposed()) + return; +// System.out.println("ACTIONS: " + Arrays.toString(actions)); + IAction action = chooseAction(parent, actions, resourceName, neverPromptForAction); + if (action != null) { + action.run(); + return; } }); }