From 21f12e54fc7907e26e49f26f95ee3b62cbecdc61 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Mon, 8 Oct 2018 21:33:55 +0300 Subject: [PATCH] Fixed Job to return Status.OK_STATUS instead of null gitlab #74 gitlab #143 Change-Id: Ib1c59eca854b6daafb21bad3aa90971deb8f5481 --- .../ui/modelBrowser/handlers/StandardCopyHandler.java | 4 ++-- 1 file changed, 2 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 002a31381..1ce5b2d36 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 @@ -21,6 +21,7 @@ import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.IStatusLineManager; @@ -97,12 +98,11 @@ public class StandardCopyHandler extends AbstractHandler { formatSelectionToClipboardText(event); final Resource[] rs = ResourceAdaptionUtils.toResources(selection); Job job = new Job("Copy resources") { - @Override protected IStatus run(IProgressMonitor monitor) { monitor.beginTask("Copy resources to clipboard", 1); copyResourcesToClipboard(rs, selection, SubMonitor.convert(monitor, 1)); - return null; + return Status.OK_STATUS; } }; job.setUser(true); -- 2.47.1