From aa5e7bb5d56b050cfbd2e4a5ab2cc4fdfe40850b Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Mon, 1 Oct 2018 22:19:11 +0300 Subject: [PATCH] Fixed StandardCopyHandler SWT threading regression IStatusLineManager is now invoked properly from the SWT thread again. gitlab #74 gitlab #133 Change-Id: I8e4a9ad3fc26b4ab2a04ebe26c64114d12eda9a0 --- .../ui/modelBrowser/handlers/StandardCopyHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) { -- 2.43.2