ref #5801 Add IUndoContext to bulk editor
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 12 Sep 2016 12:20:58 +0000 (14:20 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 12 Sep 2016 12:20:58 +0000 (14:20 +0200)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java

index f676ccec9045a15260026cf7397959ab4427412c..d3d9d482ec0d96bbf2825cc898491af012fe0f94 100644 (file)
@@ -10,6 +10,8 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor;
 
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.UndoContext;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -71,8 +73,11 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
 
        private boolean isDirty;
 
+    private IUndoContext undoContext;
+
        public BulkEditor() {
                super(CdmStore.createConversation());
+        undoContext = new UndoContext();
        }
 
        /** {@inheritDoc} */
@@ -283,7 +288,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                        }
                        conversation.clear();
                        conversation.commit(true);
-                       
+
                        getEditorInput().dispose();
                        getEditorInput().bind();
                        getEditorInput().performSearch(query);
@@ -327,4 +332,8 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
        public boolean canAttachMedia() {
            return getEditorInput() instanceof TaxonEditorInput?true:false;
        }
+
+    public IUndoContext getUndoContext() {
+        return undoContext;
+    }
 }