summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormgolubev2014-05-28 08:22:40 (EDT)
committermgolubev2014-05-28 08:22:40 (EDT)
commitcb18fc6bdd9b1f3c6c6669fdc9b394bffb6ac510 (patch)
tree04bd8b6dbd4b11ba7572d4e3490a103f72865c3a
parentd8a87ba9d8b961682f37d5bd042a2e35f4df1141 (diff)
downloadorg.eclipse.papyrus-cb18fc6bdd9b1f3c6c6669fdc9b394bffb6ac510.zip
org.eclipse.papyrus-cb18fc6bdd9b1f3c6c6669fdc9b394bffb6ac510.tar.gz
org.eclipse.papyrus-cb18fc6bdd9b1f3c6c6669fdc9b394bffb6ac510.tar.bz2
[Diagram versions]: Simple optimization, don't creare new instances ifrefs/changes/42/27442/1
diagarm is known to be up to date. Change-Id: I198f3792d95f1398bc54cc777b0ed9605dc8f823 Signed-off-by: mgolubev <golubev@montages.com>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
index 80a03c6..666a32c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
@@ -15,6 +15,7 @@ import org.eclipse.papyrus.infra.core.lifecycleevents.ISaveAndDirtyService;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.gmfdiag.common.SynchronizableGmfDiagramEditor;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.contexts.IContextService;
@@ -69,7 +70,7 @@ public class UmlGmfDiagramEditor extends SynchronizableGmfDiagramEditor {
@Override
public void doSetInput(IEditorInput input, boolean releaseEditorContents) throws CoreException {
super.doSetInput(input, releaseEditorContents);
- if(getDiagram() != null) {
+ if(getDiagram() != null && !DiagramVersioningUtils.isOfCurrentPapyrusVersion(getDiagram())) {
new ReconcileHelper(getEditingDomain()).reconcileDiagram(getDiagram());
}
}