From: Tuukka Lehtonen Date: Mon, 1 Oct 2018 19:19:11 +0000 (+0300) Subject: Fixed StandardCopyHandler SWT threading regression X-Git-Tag: v1.43.0~136^2~347 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F66%2F2266%2F2;p=simantics%2Fplatform.git Fixed StandardCopyHandler SWT threading regression IStatusLineManager is now invoked properly from the SWT thread again. gitlab #74 gitlab #133 Change-Id: I8e4a9ad3fc26b4ab2a04ebe26c64114d12eda9a0 --- diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java index c8946df68..002a31381 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java @@ -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) {