import java.util.Collection;
import java.util.Collections;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.simantics.db.Resource;
import org.simantics.db.layer0.adapter.ActionFactory;
import org.simantics.db.layer0.adapter.ActionFactory2;
return null;
resources.add((Resource)o);
}
-
- return new Runnable() {
- @Override
- public void run() {
-
- StandardCopyHandler.copyResourcesToClipboard(resources.toArray(new Resource[resources.size()]), null);
-
- }
+ return () -> {
+ Job job = new Job(Messages.Copy_Copy) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ StandardCopyHandler.copyResourcesToClipboard(resources.toArray(new Resource[resources.size()]), null, monitor);
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
};
}