import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.common.utils.OrderedSetUtils;
import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.util.Layer0Utils;
import org.simantics.db.layer0.util.RemoverUtil;
import org.simantics.db.request.Write;
import org.simantics.diagram.content.ConnectionUtil;
return noParentElementReturnValue;
}
- private void cut() throws Exception {
+ protected void cut() throws Exception {
final GraphLayerManager glm = targetContext.get(GraphSynchronizationHints.GRAPH_LAYER_MANAGER);
final THashSet<Resource> cutElements = new THashSet<Resource>();
}
};
- private void copy() throws Exception {
+ protected void copy() throws Exception {
nodeMap = new NodeMap();
CommonDBUtils.selectClusterSet(graph, targetDiagram);
graph.claim(copy, L0.ConsistsOf, L0.PartOf, relationCopy);
graph.claim(copy, MOD.HasReferenceRelation, MOD.HasReferenceRelation_Inverse, relationCopy);
+ // #7348: renew reference relation GUID identifiers properly
+ Layer0Utils.renewIdentifier(graph, relationCopy);
+ for (Resource invRel : graph.getObjects(relationCopy, L0.ConsistsOf))
+ Layer0Utils.renewIdentifier(graph, invRel);
+
return copy;
}
public NodeMap getNodeMap() {
return nodeMap;
}
-
+
+ protected PasteOperation getOperation() {
+ return op;
+ }
+
+ public WriteGraph getGraph() {
+ return graph;
+ }
}