commit ac1659d4fb4bd6a0f42c5e3cef97dee1ccad7925
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Tue Nov 15 17:27:52 2016 +0100

    fix #6199 Excluded note for excluded taxon nodes in TaxEditor

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java
index 11a1e21d5..961ff6f76 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java
@@ -30,12 +30,10 @@ import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.common.MultilanguageTextHelper;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.taxeditor.model.DefaultTermComparator;
-import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
-import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 import eu.etaxonomy.taxeditor.ui.translation.TranslationWizard;
 
 /**
@@ -89,7 +87,7 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
 	protected LanguageStringWithLabelElement element_languageString;
 
 	private Button button;
-	
+
 //	private Button removeRepresentation;
 
 	private Map<Language, LanguageString> multilanguageText;
@@ -265,6 +263,15 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
 			firePropertyChangeEvent(new CdmPropertyChangeEvent(this, event));
 		}
 	}
-	
-	
+
+	public void setEnabled(boolean enabled){
+	    if(button!=null){
+	        button.setEnabled(enabled);
+	    }
+	    if(combo_language!=null){
+	        combo_language.setEnabled(enabled);
+	    }
+	    element_languageString.setEnabled(enabled);
+	}
+
 }
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 9087bac7a..d9cb23557 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
@@ -27,6 +27,7 @@ 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.MultilanguageTextElement;
 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
@@ -61,9 +62,11 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 
 	private CheckboxElement checkbox_openInEditor;
 
-    private CheckboxElement checkbox_excluded;
+	private CheckboxElement checkbox_unplaced;
 
-    private CheckboxElement checkbox_unplaced;
+	private CheckboxElement checkbox_excluded;
+
+	private MultilanguageTextElement multiLanguageTextExcludedNotes;
 
 	private boolean openInEditor;
 
@@ -111,19 +114,19 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 
 		}
 
-
 		if (isCreateNew()){
             setParentTreeNode(entity);
-
         } else{
             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);
+		    checkbox_excluded = formFactory.createCheckbox(formElement,
+		            "Taxon is excluded", ((TaxonNode) entity).isExcluded(), style);
+		    multiLanguageTextExcludedNotes = formFactory.createMultiLanguageTextElement(formElement, "Excluded Notes", ((TaxonNode)entity).getExcludedNote(), 50, style);
+		    multiLanguageTextExcludedNotes.setEnabled(((TaxonNode) entity).isExcluded());
 		}
 
 		if (!isCreateNew()){
@@ -135,7 +138,6 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 		checkbox_openInEditor = formFactory.createCheckbox(formElement,
 				"Open in Editor", true, style);
 		setOpenInEditor(true);
-
 	}
 
 	private void preFillTaxonName() {
@@ -163,11 +165,8 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                         	}
                         }
                     }
-
                 }
-
             }
-
         }
     }
 
@@ -195,8 +194,6 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 			selection_reuseExistingTaxon.setEnabled(enabled);
 			textNewTaxonName.setEnabled(enabled);
 
-			//setTaxon(selection_reuseExistingName.getEntity());
-
 			complete = !textNewTaxonName.getText().isEmpty();
 		} else if (eventSource == textNewTaxonName) {
 			boolean enabled = CdmUtils.isBlank(textNewTaxonName.getText());
@@ -205,7 +202,9 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 
 			complete = CdmUtils.isNotBlank(textNewTaxonName.getText());
 		} else if (eventSource == checkbox_excluded) {
-		    ((TaxonNode) getEntity()).setExcluded(checkbox_excluded.getSelection());
+		    boolean isExcluded = checkbox_excluded.getSelection();
+            ((TaxonNode) getEntity()).setExcluded(isExcluded);
+            multiLanguageTextExcludedNotes.setEnabled(isExcluded);
 		} else if (eventSource == checkbox_unplaced) {
 		    ((TaxonNode) getEntity()).setUnplaced(checkbox_unplaced.getSelection());
 		} else if (eventSource == checkbox_openInEditor) {
@@ -215,7 +214,6 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 		   for (ICdmFormElement element : selectionNodeAgentRelation.getElements()){
 		       allComplete &=((TaxonNodeAgentRelationCollectionElement)element).isComplete();
 		   }
-
 		    complete = !isCreateNew() && allComplete;
 		}
 	}
@@ -319,14 +317,9 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 	        }
 	        complete = allComplete;
 	    }
-
-
 		return complete;
 	}
 
-    /**
-     * @return the createNew
-     */
     public boolean isCreateNew() {
         return createNew;
     }
