Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilos Kleint2010-12-29 08:45:22 -0500
committerMilos Kleint2010-12-29 08:45:22 -0500
commit885ac3194f50b6e51dd504eea78a6c75126f3a97 (patch)
tree8106108acf810179c5798617d1b500a21a6919df
parent5f1c2f7446f03acffb66b0da5bce158bf4ad7998 (diff)
downloadm2e-core-885ac3194f50b6e51dd504eea78a6c75126f3a97.tar.gz
m2e-core-885ac3194f50b6e51dd504eea78a6c75126f3a97.tar.xz
m2e-core-885ac3194f50b6e51dd504eea78a6c75126f3a97.zip
just notes
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
index 884f3b07..2f26fc0b 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
@@ -704,6 +704,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
}
}
});
+ //mkleint: getModelForEdit alone shall do just fine, no?
structuredModel = modelManager.getExistingModelForEdit(doc);
if(structuredModel == null) {
structuredModel = modelManager.getModelForEdit((IStructuredDocument) doc);
@@ -719,13 +720,15 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
};
IStructuredTextUndoManager undoManager = structuredModel.getUndoManager();
+ //mkleint: it appears to me that the undomanager will only only be null
+ //for documents released from read/edit (which we do in dispose())
if(undoManager != null) {
sseCommandStack = (BasicCommandStack) undoManager.getCommandStack();
if(sseCommandStack != null) {
sseCommandStack.addCommandStackListener(commandStackListener);
}
}
-
+ //mkleint: why is this here?
flushCommandStack();
try {
readProjectDocument();
@@ -741,6 +744,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
factories.add(new ReflectiveItemProviderAdapterFactory());
adapterFactory = new ComposedAdapterFactory(factories);
+ //mkleint: why doesn't this one delegate to the sseCommandStack?
commandStack = new NotificationCommandStack(this);
editingDomain = new AdapterFactoryEditingDomain(adapterFactory, //
commandStack, new HashMap<Resource, Boolean>());

Back to the top