]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.ui/src/org/simantics/ui/workbench/action/ChooseActionRequest.java
DefaultMouseListener was added twice in GraphExplorerComposite
[simantics/platform.git] / bundles / org.simantics.ui / src / org / simantics / ui / workbench / action / ChooseActionRequest.java
index 210bdf91107d1a8fc276a982a4a397148f28cf3f..dc8e5a67bf7079c6557035bc8fc2760afb5fbb40 100644 (file)
@@ -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;
                 }
             });
         }