]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.annotation.ui/src/org/simantics/annotation/ui/wizard/AnnotationTypeExporter.java
Add progress monitoring for copying resources on desktop
[simantics/platform.git] / bundles / org.simantics.annotation.ui / src / org / simantics / annotation / ui / wizard / AnnotationTypeExporter.java
index 70470fc6a503309c04ce5073879db4b44cd8d749..417f2c515a8b7a2c14529ffc58d457e457309716 100644 (file)
@@ -43,7 +43,7 @@ import org.simantics.utils.ui.dialogs.ShowMessage;
 
 /**
  * @author Tuukka Lehtonen
- * @author Teemu Mätäsniemi
+ * @author Teemu M�t�sniemi
  */
 public class AnnotationTypeExporter implements IRunnableWithProgress {
 
@@ -99,13 +99,13 @@ public class AnnotationTypeExporter implements IRunnableWithProgress {
             public SimanticsClipboard perform(ReadGraph graph) throws DatabaseException {
                 CopyHandler ch = graph.adapt(annotation, CopyHandler.class);
                 SimanticsClipboardImpl clipboard = new SimanticsClipboardImpl();
-                ch.copyToClipboard(graph, clipboard);
+                ch.copyToClipboard(graph, clipboard, SubMonitor.convert(monitor, 85));
                 return clipboard;
             }
         });
         for (Set<Representation> object : clipboard.getContents()) {
             TransferableGraph1 tg = ClipboardUtils.accept(object, SimanticsKeys.KEY_TRANSFERABLE_GRAPH);
-            monitor.worked(95);
+            monitor.worked(10);
 
             monitor.setTaskName("Writing transferable graph...");
             DataContainers.writeFile(location, new DataContainer(