commit 3e194787899d08624921b3b5cbb109ebcc74b4f5
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Tue Nov 15 10:12:29 2016 +0100

    fix #6197 Move excluded and unplaced from Taxon to TaxonNode in
    TaxEditor

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
index 1ecc93934..9087bac7a 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
@@ -59,9 +59,12 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 
 	private TaxonNodeAgentRelationCollectionSection selectionNodeAgentRelation;
 
-
 	private CheckboxElement checkbox_openInEditor;
 
+    private CheckboxElement checkbox_excluded;
+
+    private CheckboxElement checkbox_unplaced;
+
 	private boolean openInEditor;
 
 	private boolean complete;
@@ -116,6 +119,13 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
             setTreeNode(entity);
             complete = true;
         }
+		if (entity instanceof TaxonNode) {
+		    checkbox_excluded = formFactory.createCheckbox(formElement,
+		            "Taxon is excluded", ((TaxonNode) entity).isExcluded(), style);
+		    checkbox_unplaced = formFactory.createCheckbox(formElement,
+		            "Taxon is unplaced", ((TaxonNode) entity).isUnplaced(), style);
+		}
+
 		if (!isCreateNew()){
             selectionNodeAgentRelation = formFactory.createTaxonNodeAgentRelationCollectionSection(formElement, getConversationHolder(), style);
             selectionNodeAgentRelation.setEntity((TaxonNode)entity);
@@ -177,7 +187,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 			        textNewTaxonName.setText(null);
 			    }
 				complete = !textNewTaxonName.getText().isEmpty();
-				
+
 
 		} else if (eventSource == selection_reuseExistingName) {
 		    boolean enabled = selection_reuseExistingName.getEntity() == null;
@@ -193,7 +203,11 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 			selection_reuseExistingTaxon.setEnabled(enabled);
 			selection_reuseExistingName.setEnabled(enabled);
 
-			complete = !textNewTaxonName.getText().isEmpty();
+			complete = CdmUtils.isNotBlank(textNewTaxonName.getText());
+		} else if (eventSource == checkbox_excluded) {
+		    ((TaxonNode) getEntity()).setExcluded(checkbox_excluded.getSelection());
+		} else if (eventSource == checkbox_unplaced) {
+		    ((TaxonNode) getEntity()).setUnplaced(checkbox_unplaced.getSelection());
 		} else if (eventSource == checkbox_openInEditor) {
 			setOpenInEditor(checkbox_openInEditor.getSelection());
 		} else if (eventSource == selectionNodeAgentRelation){
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
index 2d612eb92..8c956f111 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
@@ -14,10 +14,8 @@ import java.util.Arrays;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
 import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
@@ -27,7 +25,6 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
@@ -53,10 +50,6 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 
 	private TextWithLabelElement text_appendedPhrase;
 
-	private CheckboxElement checkbox_excluded;
-
-	private CheckboxElement checkbox_unplaced;
-
 	private CheckboxElement checkbox_published;
 
 //	private SynonymRelationshipDetailSection sectionSynonymRelationship;
@@ -111,15 +104,6 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 		if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)) {
 			checkbox_useNameCache = formFactory.createCheckbox(formElement,
 					"Exclude Authorship", entity.isUseNameCache(), style);
-
-//#3925		
-//			if (entity instanceof Taxon) {
-//				checkbox_excluded = formFactory.createCheckbox(formElement,
-//						"Taxon is excluded", ((Taxon) entity).isExcluded(), style);
-//				checkbox_unplaced = formFactory.createCheckbox(formElement,
-//						"Taxon is unplaced", ((Taxon) entity).isUnplaced(), style);
-//			}
-
 			checkbox_doubtful = formFactory.createCheckbox(formElement,
 					entity.getClass().getSimpleName() + " is doubtful", entity.isDoubtful(), style);
 		}
@@ -157,7 +141,7 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 		super.updateContent();
 		toggleable_cache.setEnabled(getEntity().isProtectedTitleCache());
 		setIrrelevant(toggleable_cache.getState(),
-				Arrays.asList(new Object[] { toggleable_cache, checkbox_published, checkbox_unplaced, checkbox_excluded }));
+				Arrays.asList(new Object[] { toggleable_cache, checkbox_published}));
 	}
 
 	@Override
@@ -182,11 +166,6 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 			getEntity().setAppendedPhrase(text_appendedPhrase.getText());
 		}else if (eventSource == text_secundum_microreference) {
             getEntity().setSecMicroReference(text_secundum_microreference.getText());
-//#3925
-//        }else if (eventSource == checkbox_excluded) {
-//			((Taxon) getEntity()).setExcluded(checkbox_excluded.getSelection());
-//		} else if (eventSource == checkbox_unplaced) {
-//		    ((Taxon) getEntity()).setUnplaced(checkbox_unplaced.getSelection());
 		} else if (eventSource == checkbox_published) {
 		    ((Taxon)getEntity()).setPublish(checkbox_published.getSelection());
 		}
@@ -196,7 +175,7 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
         boolean pushedState = toggleable_cache.getState();
 
         getEntity().setTitleCache(toggleable_cache.getText(), pushedState);
-        setIrrelevant(pushedState, Arrays.asList(new Object[] { toggleable_cache, checkbox_published, checkbox_unplaced, checkbox_excluded}));
+        setIrrelevant(pushedState, Arrays.asList(new Object[] { toggleable_cache, checkbox_published}));
         updateToggleableCacheField();
     }
 }
