commit 48621fdd1a5cbb5cb51ee701e3781cb61018acd6
Author: Katja Luther <k.luther@bgbm.org>
Date:   Wed Feb 15 11:17:46 2017 +0100

    fix deletion of new created entities in bulk editor

diff --git a/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java b/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java
index 02d13bd9f..d6baf5fef 100644
--- a/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java
+++ b/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java
@@ -168,8 +168,8 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 		                MessagingUtils.REMOTE_ACCESS_FAILURE_MESSAGE + System.getProperty("line.separator"),
 		                pluginId,
 		                t,
-		                true,
-		                false);
+		                false,
+		                true);
 		        return true;
 		    }
 		    return false;
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/LineAnnotation.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/LineAnnotation.java
index 5634b6297..1f4f7ee7f 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/LineAnnotation.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/LineAnnotation.java
@@ -14,7 +14,6 @@ import org.apache.log4j.Logger;
 import org.eclipse.jface.text.source.Annotation;
 
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
-import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
 
 /**
  * An <code>Annotation</code> which spans an entire line and holds an object associated
@@ -40,6 +39,7 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
 	private boolean markedAsNew;
 	private T mergeTarget;
 	private DeleteConfiguratorBase configurator= null;
+	private boolean markAsDelete;
 
 
 	/**
@@ -264,6 +264,6 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
 
 	public void setDeleteConfigurator(DeleteConfiguratorBase config) {
 		this.configurator = config;
-		
+
 	}
 }
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
index 9dcbd7fde..51806e3cb 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
@@ -151,13 +151,17 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
 	@Override
 	public TeamOrPersonBase save(TeamOrPersonBase entity) {
 	   return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
-	   
+
 	}
 
 	@Override
 	public boolean delete(TeamOrPersonBase entity, DeleteConfiguratorBase config)
 			throws ReferencedObjectUndeletableException {
-		return CdmStore.getService(IAgentService.class).delete(entity.getUuid()) != null;
+	    if (entity.getUuid() != null){
+	        return CdmStore.getService(IAgentService.class).delete(entity.getUuid()) != null;
+	    }else{
+	        return false;
+	    }
 	}
 
     /* (non-Javadoc)
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
index 83dd21c54..a5c868749 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
@@ -132,7 +132,11 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
 	 * @throws ReferencedObjectUndeletableException */
 	@Override
     public boolean delete(Reference entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException {
-		return CdmStore.getService(IReferenceService.class).delete(entity.getUuid()) != null;
+	    if (entity.getUuid() != null){
+	        return CdmStore.getService(IReferenceService.class).delete(entity.getUuid()) != null;
+	    }else{
+	        return false;
+	    }
 	}
 
 	/** {@inheritDoc} */
