package eu.etaxonomy.taxeditor.bulkeditor;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IViewPart;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineDocumentProvider;
import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;
import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
-import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;
+import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
+import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
+import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
+import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
+import eu.etaxonomy.taxeditor.model.IPartContentHasMedia;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
- * <p>BulkEditor class.</p>
+ * <p>
+ * BulkEditor class.
+ * </p>
*
* @author p.ciardelli
* @created 07.07.2009
* @version 1.0
*/
-public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDetails, IDirtyMarkableSelectionProvider{
+public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDetails,
+ IDirtyMarkable, IDerivedUnitFacadePart, IPartContentHasFactualData, IPartContentHasMedia {
/** Constant <code>ID="bulkeditor.editor"</code> */
public static final String ID = "bulkeditor.editor";
private IPropertyChangeListener markerPreferenceListener;
+ private boolean isDirty;
+
/**
* <p>Constructor for BulkEditor.</p>
*/
super.dispose();
}
+
/* (non-Javadoc)
* @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#isEditable()
*/
/** {@inheritDoc} */
@Override
public void setFocus() {
+ conversation.bind();
searchBar.setFocus();
// TODO find a better place to put this - this dialog should be shown after initial contents of
}
}
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#isDirty()
+ */
+ @Override
+ public boolean isDirty() {
+ if(isDirty){
+ return isDirty;
+ }
+ else{
+ return super.isDirty();
+ }
+ }
+
+ @Override
+ public void forceDirty(){
+ isDirty = true;
+ firePropertyChange(PROP_DIRTY);
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ isDirty = false;
+
+ super.doSave(progressMonitor);
+
+ selectFirstItem();
+
+ getSourceViewer().getTextWidget().setFocus();
+
+ }
+
/** {@inheritDoc} */
@Override
public void changed(Object object) {