X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2Fsg%2FDiagramSceneGraphProvider.java;h=61305ade0c58e8bc8162ff5308e34b3e1dbf3ffe;hp=3d800d1f1f43d56ff82c929f9e0fcc4aa12ea6fb;hb=e353ca45b2ad3ce36ea48336feca56e86ad0b089;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07 diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java index 3d800d1f1..61305ade0 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java @@ -171,6 +171,10 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi } } + public GraphToDiagramSynchronizer getGraphToDiagramSynchronizer() { + return synchronizer; + } + protected CopyPasteStrategy getCopyPasteStrategy() { try { CopyPasteStrategy cpStrategy = Simantics.getSession().syncRequest(new PossibleAdapter(resource, CopyPasteStrategy.class)); @@ -189,7 +193,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi return new MappedElementCopyAdvisor(new ElementCopyAdvisor(), new ComponentCopyAdvisor()); } - private void initContext(CanvasContext ctx) { + protected void initContext(CanvasContext ctx) { boolean unlock = false; if (!ctx.isLocked()) { ctx.setLocked(true); @@ -244,7 +248,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi ctx.add( new ElementInteractor() ); ctx.add( new Selection() ); ctx.add( new DiagramParticipant() ); - ctx.add( new ElementPainter(false) ); + ctx.add( new ElementPainter(true) ); //ctx.add( new ElementHeartbeater() ); ctx.add( new ZOrderHandler() ); @@ -431,7 +435,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi try { // FIXME: I have no idea if this works or not.. - diagram = SimanticsUI.getSession().syncRequest(new Read() { + diagram = Simantics.getSession().syncRequest(new Read() { @Override public IDiagram perform(ReadGraph graph) throws DatabaseException { IDiagram d = synchronizer.loadDiagram(new NullProgressMonitor(), graph, null, structuralPath.resources[0], null, structuralPath.removeFromBeginning(0), hints);