Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2013-03-19 05:41:40 +0000
committerEike Stepper2013-03-19 05:43:13 +0000
commitceb5601ca4cbad51edd03f4e04a31bbab453921b (patch)
tree460ede5e49465c2d5bfa6cf79878dcd190fa617e /plugins/org.eclipse.emf.cdo.dawn.graphiti/src/org/eclipse/emf/cdo
parent0262bfafb86ebbcd4eb4cbd65bebea1d15cbba8a (diff)
downloadcdo-ceb5601ca4cbad51edd03f4e04a31bbab453921b.tar.gz
cdo-ceb5601ca4cbad51edd03f4e04a31bbab453921b.tar.xz
cdo-ceb5601ca4cbad51edd03f4e04a31bbab453921b.zip
[403710] [Dawn] Adjust to breaking changes in Graphiti 0.10.0
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403710
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.graphiti/src/org/eclipse/emf/cdo')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.graphiti/src/org/eclipse/emf/cdo/dawn/graphiti/editors/DawnGraphitiDiagramEditor.java40
1 files changed, 32 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.graphiti/src/org/eclipse/emf/cdo/dawn/graphiti/editors/DawnGraphitiDiagramEditor.java b/plugins/org.eclipse.emf.cdo.dawn.graphiti/src/org/eclipse/emf/cdo/dawn/graphiti/editors/DawnGraphitiDiagramEditor.java
index f1bdbd8ab2..ed71d4d438 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.graphiti/src/org/eclipse/emf/cdo/dawn/graphiti/editors/DawnGraphitiDiagramEditor.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.graphiti/src/org/eclipse/emf/cdo/dawn/graphiti/editors/DawnGraphitiDiagramEditor.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Martin Fluegge - initial API and implementation
*/
@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.ui.editor.DefaultPersistencyBehavior;
+import org.eclipse.graphiti.ui.editor.DiagramBehavior;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.graphiti.ui.editor.IDiagramEditorInput;
import org.eclipse.graphiti.ui.internal.services.GraphitiUiInternal;
@@ -94,8 +95,11 @@ public class DawnGraphitiDiagramEditor extends DiagramEditor implements IDawnEdi
}
}
+ /**
+ * @since 2.1
+ */
@Override
- protected void initializeGraphicalViewer()
+ public void initializeGraphicalViewer()
{
super.initializeGraphicalViewer();
dawnEditorSupport.registerListeners();
@@ -129,19 +133,39 @@ public class DawnGraphitiDiagramEditor extends DiagramEditor implements IDawnEdi
}
@Override
- protected DefaultPersistencyBehavior createPersistencyBehavior()
+ protected DiagramBehavior createDiagramBehavior()
{
- persistencyBehavior = new DefaultPersistencyBehavior(this)
+ DiagramBehavior diagramBehavior = new DiagramBehavior(this)
{
+ {
+ setParentPart(DawnGraphitiDiagramEditor.this);
+ initDefaultBehaviors();
+ }
+
@Override
- public void saveDiagram(IProgressMonitor monitor)
+ protected DefaultPersistencyBehavior createPersistencyBehavior()
{
- dawnEditorSupport.setDirty(false);
- super.saveDiagram(monitor);
+ persistencyBehavior = new DefaultPersistencyBehavior(getDiagramBehavior())
+ {
+ @Override
+ public void saveDiagram(IProgressMonitor monitor)
+ {
+ dawnEditorSupport.setDirty(false);
+ super.saveDiagram(monitor);
+ }
+ };
+
+ return persistencyBehavior;
}
};
- return persistencyBehavior;
+ return diagramBehavior;
+ }
+
+ @Deprecated
+ protected DefaultPersistencyBehavior createPersistencyBehavior()
+ {
+ throw new UnsupportedOperationException();
}
@Override

Back to the top