X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftypicals%2FTypicalUtil.java;h=8aef62c7b2dfe3e6e34d9a8629400fbf245ebedf;hb=39de724eba3c483631685a7281ee96c17d700c99;hp=3016311ff9c0411be3eb22cb8b11ab6a440ad960;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java index 3016311ff..8aef62c7b 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java @@ -21,6 +21,7 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; +import org.eclipse.core.runtime.NullProgressMonitor; import org.simantics.NameLabelMode; import org.simantics.NameLabelUtil; import org.simantics.Simantics; @@ -169,7 +170,7 @@ public class TypicalUtil { CommonDBUtils.selectClusterSet(graph, target); SimanticsClipboardImpl clipboard = new SimanticsClipboardImpl(); CopyHandler ch = new TypicalCompositeCopyHandler(template.getResource()); - ch.copyToClipboard(graph, clipboard); + ch.copyToClipboard(graph, clipboard, new NullProgressMonitor()); Map hints = Collections.singletonMap(ClipboardUtils.HINT_TARGET_RESOURCE, target); @@ -260,7 +261,7 @@ public class TypicalUtil { if (excludedComponents != null && excludedComponents.contains(component)) continue; try { - String renamed = ComponentNamingUtil.findFreshInstanceName(graph, SimanticsUI.getProject(), configurationRoot, typicalCompositeInstance, component); + String renamed = ComponentNamingUtil.findFreshInstanceName(graph, Simantics.getProject(), configurationRoot, typicalCompositeInstance, component); if (DEBUG) System.out.println("Typicals: renamed " + entry.getKey() + " -> " + renamed); graph.claimLiteral(entry.getValue(), L0.HasName, L0.NameOf, renamed, Bindings.STRING);