]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed StandardCopyHandler SWT threading regression 66/2266/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 1 Oct 2018 19:19:11 +0000 (22:19 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 1 Oct 2018 19:21:26 +0000 (19:21 +0000)
IStatusLineManager is now invoked properly from the SWT thread again.

gitlab #74
gitlab #133

Change-Id: I8e4a9ad3fc26b4ab2a04ebe26c64114d12eda9a0

bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java

index c8946df682bd9f7a7459f3954abbef3bfaee4bb4..002a31381439d3df4320a22dd79b28d19c012674 100644 (file)
@@ -159,8 +159,11 @@ public class StandardCopyHandler extends AbstractHandler {
     }
 
     private static void setStatus(String message) {
-        if (status != null)
-            status.setMessage(message);
+        if (status != null) {
+            SWTUtils.asyncExec(
+                    PlatformUI.getWorkbench().getDisplay(),
+                    () -> status.setMessage(message));
+        }
     }
 
     private boolean formatSelectionToClipboardText(ExecutionEvent event) {