]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Added to CopyAdvisor interface the possibility to get a map from source resources...
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 30 May 2012 08:54:27 +0000 (08:54 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 30 May 2012 08:54:27 +0000 (08:54 +0000)
fixes #3480

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@25069 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynComponentCopyAdvisor.java

index 62672a39f9dec1c52ccd600c9ea537e5def7ea01..94e3a9f02eaa6ad5562f16e24368f399d25c1b5a 100644 (file)
@@ -11,6 +11,8 @@
  *******************************************************************************/\r
 package org.simantics.sysdyn.ui.editor.participant;\r
 \r
+import java.util.Map;\r
+\r
 import org.simantics.databoard.Bindings;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
@@ -26,10 +28,10 @@ import org.simantics.modeling.mapping.ComponentCopyAdvisor;
 import org.simantics.structural.stubs.StructuralResource2;\r
 import org.simantics.utils.datastructures.BinaryFunction;\r
 \r
-public class SysdynComponentCopyAdvisor extends ComponentCopyAdvisor{\r
+public class SysdynComponentCopyAdvisor extends ComponentCopyAdvisor {\r
 \r
     @Override\r
-    public Object copy(ISynchronizationContext context, WriteGraph graph, Resource source, Resource sourceContainer, Resource targetContainer) throws DatabaseException {\r
+    public Object copy(ISynchronizationContext context, WriteGraph graph, Resource source, Resource sourceContainer, Resource targetContainer, Map<Object, Object> map) throws DatabaseException {\r
        \r
        BinaryFunction<Boolean, ReadGraph, Statement> tester = new BinaryFunction<Boolean, ReadGraph, Statement>() {\r
 \r
@@ -56,7 +58,7 @@ public class SysdynComponentCopyAdvisor extends ComponentCopyAdvisor{
        \r
        StructuralResource2 sr2 = StructuralResource2.getInstance(graph);\r
        if(graph.isInstanceOf(source, sr2.Connection)) {\r
-                copy = CopyAdvisorUtil.copy(graph, source, tester);\r
+                copy = CopyAdvisorUtil.copy(graph, source, tester, map);\r
        } else {\r
             copy = CopyAdvisorUtil.copy4(graph, source);\r
        }\r