commit af7453f9181876fdf50d181fff046e8706a7bebb
Author: Katja Luther <k.luther@bgbm.org>
Date:   Fri Jun 9 17:32:36 2017 +0200

    ref #6390: add all name related parts to details view of misapp

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java
index 179a9072e..596d7f9da 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java
@@ -34,9 +34,14 @@ import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
 import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NameDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
+import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopeDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.IDerivedUnitFacadeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
 
 /**
@@ -111,9 +116,34 @@ public class CdmSectionPart<T> extends SectionPart implements
 			((NonViralNameDetailSection) formSection)
 					.setTaxonBase( ((TaxonRelationship)input).getFromTaxon());
 			return true;
+		}else if ((input instanceof TaxonRelationship)
+				&& (formSection instanceof NomenclaturalReferenceDetailSection)) {
+			((NomenclaturalReferenceDetailSection) formSection)
+					.setTaxonBase( ((TaxonRelationship)input).getFromTaxon());
+			return true;
+		}else if ((input instanceof TaxonRelationship)
+				&& (formSection instanceof NomenclaturalStatusSection)) {
+			((NomenclaturalStatusSection) formSection)
+					.setTaxonBase( ((TaxonRelationship)input).getFromTaxon());
+			return true;
+		}else if ((input instanceof TaxonRelationship)
+				&& (formSection instanceof ProtologueSection)) {
+			((ProtologueSection) formSection)
+					.setTaxonBase( ((TaxonRelationship)input).getFromTaxon());
+			return true;
+		}else if ((input instanceof TaxonRelationship)
+				&& (formSection instanceof TypeDesignationSection)) {
+			((TypeDesignationSection) formSection)
+					.setTaxonBase( ((TaxonRelationship)input).getFromTaxon());
+			return true;
+		}else if ((input instanceof TaxonRelationship)
+				&& (formSection instanceof NameRelationshipDetailSection)) {
+			((NameRelationshipDetailSection) formSection)
+					.setTaxonBase( ((TaxonRelationship)input).getFromTaxon());
+			return true;
 		}
 
-
+		
 		formSection.setEntity((T) input);
 
 		return true;
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
index 14d35d330..25fee3aef 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
@@ -778,13 +778,39 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                 .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
                         ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(nonViralNameSection);
-//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-//        //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
-//        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
-//        		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-//        addPart(referenceDetailSection);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
+        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
+        		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        addPart(referenceDetailSection);
 
+        //if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
+            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
+            		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+            addPart(nomenclaturalStatusSection);
+    //}
+
+	//if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
+		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+		addPart(protologSection);
+	//}
+
+	//if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
+		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+		addPart(typeDesignationSection);
+	//}
+
+	//if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
+		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+		addPart(nameRelationshipSection);
+	//}
+
+        
         //}
     }
 
