Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbblajer2006-12-15 14:21:49 +0000
committerbblajer2006-12-15 14:21:49 +0000
commita3459f6ddd55675ae1ee1409793c8359701fd2de (patch)
treee41bc567ac1511ff775bf4182d0bd9de7ae4f96e /plugins/org.eclipse.gmf.runtime.lite/src/org
parentbc989097289104cfa30238828def27320c39196e (diff)
downloadorg.eclipse.gmf-tooling-a3459f6ddd55675ae1ee1409793c8359701fd2de.tar.gz
org.eclipse.gmf-tooling-a3459f6ddd55675ae1ee1409793c8359701fd2de.tar.xz
org.eclipse.gmf-tooling-a3459f6ddd55675ae1ee1409793c8359701fd2de.zip
1. getEditingDomain() method made public (will be needed for navigator support);
2. NPE in DiagramEditor.dispose() fixed.
Diffstat (limited to 'plugins/org.eclipse.gmf.runtime.lite/src/org')
-rw-r--r--plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java14
-rw-r--r--plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramViewPart.java2
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java b/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java
index 2fe16390a..64362113e 100644
--- a/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java
+++ b/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java
@@ -95,7 +95,7 @@ public abstract class DiagramEditor extends EditorPart implements IDiagramManage
myDiagramDisplayer.save(monitor);
}
- protected final TransactionalEditingDomain getEditingDomain() {
+ public final TransactionalEditingDomain getEditingDomain() {
return myDiagramDisplayer.getEditingDomain();
}
@@ -171,12 +171,12 @@ public abstract class DiagramEditor extends EditorPart implements IDiagramManage
getCommandStack().removeCommandStackListener(commandStackListener);
myDiagramDisplayer.dispose();
myDiagramDisplayer = null;
- }
- ForceTrackingModificationAdapter adapter = (ForceTrackingModificationAdapter) EcoreUtil.getExistingAdapter(getEditingDomain().getResourceSet(), ForceTrackingModificationAdapter.class);
- assert adapter != null;
- adapter.release();
- if (adapter.isReleased()) {
- getEditingDomain().getResourceSet().eAdapters().remove(adapter);
+ ForceTrackingModificationAdapter adapter = (ForceTrackingModificationAdapter) EcoreUtil.getExistingAdapter(getEditingDomain().getResourceSet(), ForceTrackingModificationAdapter.class);
+ assert adapter != null;
+ adapter.release();
+ if (adapter.isReleased()) {
+ getEditingDomain().getResourceSet().eAdapters().remove(adapter);
+ }
}
super.dispose();
}
diff --git a/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramViewPart.java b/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramViewPart.java
index aaadb28b6..91c083754 100644
--- a/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramViewPart.java
+++ b/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/parts/DiagramViewPart.java
@@ -193,7 +193,7 @@ public abstract class DiagramViewPart extends ViewPart implements IDiagramManage
return domain;
}
- protected final TransactionalEditingDomain getEditingDomain() {
+ public final TransactionalEditingDomain getEditingDomain() {
if (myDiagramDisplayer == null) {
return null;
}

Back to the top