From: Patrick Plitzner Date: Mon, 12 Sep 2016 12:20:58 +0000 (+0200) Subject: ref #5801 Add IUndoContext to bulk editor X-Git-Tag: 4.3.0^2~47 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/9c419e9ee3522a6c9c209eddfd18c6d1710a7524?hp=c023c9afa5f06499320a897dc034422beb02c572;ds=sidebyside ref #5801 Add IUndoContext to bulk editor --- diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java index f676ccec9..d3d9d482e 100644 --- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java +++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java @@ -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; + } }