- sorting/ordering on all hierarchy levels (#3736)
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / CdmFormFactory.java
index 068c03b9e3a5150e0e11f6c5fb448b66944a9605..00818c1455b98f60c566345fbb4f73cf30b40c25 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.element;
 
@@ -33,6 +33,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.internal.forms.widgets.FormFonts;
@@ -40,36 +41,37 @@ import org.joda.time.Partial;
 import org.springframework.security.core.GrantedAuthority;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Credit;
+import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.common.Extension;
 import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
 import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.common.IDefinedTerm;
+import eu.etaxonomy.cdm.model.common.IEnumTerm;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.common.Marker;
+import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.common.TimePeriod;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.common.VersionableEntity;
 import eu.etaxonomy.cdm.model.description.CategoricalData;
 import eu.etaxonomy.cdm.model.description.CommonTaxonName;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
 import eu.etaxonomy.cdm.model.description.KeyStatement;
-import eu.etaxonomy.cdm.model.description.Modifier;
 import eu.etaxonomy.cdm.model.description.QuantitativeData;
-import eu.etaxonomy.cdm.model.description.Scope;
 import eu.etaxonomy.cdm.model.description.StateData;
 import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
 import eu.etaxonomy.cdm.model.description.TaxonInteraction;
@@ -88,14 +90,14 @@ import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.cdm.model.occurrence.Specimen;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection.UnitType;
 import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
 import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
 import eu.etaxonomy.taxeditor.ui.password.EditPasswordElement;
@@ -116,8 +118,8 @@ import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailElem
 import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.common.ReferenceEntityDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.common.RefereneEntityDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.description.DerivedUnitElement;
 import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailElement;
@@ -129,6 +131,7 @@ import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceEle
 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceElement;
 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceSection;
+import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
 import eu.etaxonomy.taxeditor.ui.section.description.ModifierElement;
 import eu.etaxonomy.taxeditor.ui.section.description.ModifierSection;
 import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageDetailElement;
@@ -198,8 +201,8 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationEventDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationHistoryDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldObservationDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldObservationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GeneralDetailElement;
@@ -244,6 +247,7 @@ import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.FeatureDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
@@ -255,7 +259,7 @@ import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
  * <p>
  * CdmFormFactory class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Feb 24, 2010
  * @version 1.0
@@ -266,7 +270,7 @@ public class CdmFormFactory extends FormToolkit {
        private MouseListener selectionMouseHandler;
        private FocusListener selectionFocusHandler;
 
-       private final Set selectionListenerList = new HashSet();
+    private final Set<SelectionListener> selectionListenerList = new HashSet<SelectionListener>();
 
        private final List<IPropertyChangeListener> propertyChangeListeners = new ArrayList<IPropertyChangeListener>();
 
@@ -280,9 +284,9 @@ public class CdmFormFactory extends FormToolkit {
                        return true;
                }
        };
-       
+
        /**
-        * 
+        *
         * @author n.hoffmann
         * @date Jan 25, 2010
         *
@@ -295,7 +299,7 @@ public class CdmFormFactory extends FormToolkit {
        }
 
        /**
-        * 
+        *
         * @author n.hoffmann
         * @date Jan 25, 2010
         *
@@ -312,8 +316,8 @@ public class CdmFormFactory extends FormToolkit {
                event.widget = e.widget;
                SelectionEvent selectionEvent = new SelectionEvent(event);
 
-               for (Object listener : selectionListenerList) {
-                       ((SelectionListener) listener).widgetSelected(selectionEvent);
+        for (SelectionListener listener : selectionListenerList) {
+            listener.widgetSelected(selectionEvent);
                }
        }
 
@@ -321,7 +325,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * Constructor for CdmFormFactory.
         * </p>
-        * 
+        *
         * @param display
         *            a {@link org.eclipse.swt.widgets.Display} object.
         * @param selectionProvider
@@ -337,7 +341,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * Constructor for CdmFormFactory.
         * </p>
-        * 
+        *
         * @param display
         *            a {@link org.eclipse.swt.widgets.Display} object.
         */
@@ -347,7 +351,7 @@ public class CdmFormFactory extends FormToolkit {
        }
 
        /**
-        * 
+        *
         */
        private void init() {
                boldFontHolder2 = new BoldFontHolder2();
@@ -357,20 +361,18 @@ public class CdmFormFactory extends FormToolkit {
 
        /**
         * Creates an instance initialized with the correct selectionProvider
-        * 
+        *
         * Make sure to remove the instance when the entityComposite disposes via
         * destroySelectionArbitrator(..)
-        * 
+        *
         * @param entityElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
         *            object.
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
         *         object.
         */
-       public SelectionArbitrator createSelectionArbitrator(
-                       IEntityElement entityElement) {
-               SelectionArbitrator selectionArbitrator = new SelectionArbitrator(
-                               entityElement);
+    public SelectionArbitrator createSelectionArbitrator(IEntityElement entityElement) {
+        SelectionArbitrator selectionArbitrator = new SelectionArbitrator(entityElement);
                selectionArbitrator.addSelectionProvider(selectionProvider);
                selectionProvider.addSelectionChangedListener(selectionArbitrator);
                addSelectionListener(selectionArbitrator);
@@ -381,22 +383,19 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * destroySelectionArbitrator
         * </p>
-        * 
+        *
         * @param selectionArbitrator
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
+     *            a
+     *            {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
         *            object.
         */
-       public void destroySelectionArbitrator(
-                       SelectionArbitrator selectionArbitrator) {
+    public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator) {
                removeSelectionListener(selectionArbitrator);
                if (selectionProvider != null) {
-                       selectionProvider
-                                       .removeSelectionChangedListener(selectionArbitrator);
+            selectionProvider.removeSelectionChangedListener(selectionArbitrator);
                } else {
-                       StoreUtil
-                                       .error(this.getClass(),
-                                                       "Tried to destroy a selection listener from this factories listeners but was null",
-                                                       null);
+            AbstractUtility.error(this.getClass(),
+                    "Tried to destroy a selection listener from this factories listeners but was null", null);
                }
        }
 
@@ -409,9 +408,10 @@ public class CdmFormFactory extends FormToolkit {
 
        /**
         * <p>
-        * adapt
+     * Adapts the {@link AbstractCdmFormElement}:<br>
+     * - sets the {@link IPropertyChangeListener}s handled by this class
         * </p>
-        * 
+        *
         * @param formElement
         *            a
         *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
@@ -434,7 +434,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * destroyElement
         * </p>
-        * 
+        *
         * @param formElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -446,8 +446,7 @@ public class CdmFormFactory extends FormToolkit {
                }
                // destroy selection arbitrator, if any
                if (formElement instanceof ISelectableElement) {
-                       destroySelectionArbitrator(((ISelectableElement) formElement)
-                                       .getSelectionArbitrator());
+            destroySelectionArbitrator(((ISelectableElement) formElement).getSelectionArbitrator());
                }
                // remove this element form its parents list of elements
                // ICdmFormElement parentElement = formElement.getParentElement();
@@ -476,7 +475,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEmptyCell
         * </p>
-        * 
+        *
         * @param parent
         *            a {@link org.eclipse.swt.widgets.Composite} object.
         * @return a {@link org.eclipse.swt.widgets.Label} object.
@@ -489,7 +488,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createMultilineTextWithLabel
         * </p>
-        * 
+        *
         * @param labelString
         *            a {@link java.lang.String} object.
         * @param textHeight
@@ -502,11 +501,9 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
         *         object.
         */
-       public TextWithLabelElement createMultilineTextWithLabel(
-                       ICdmFormElement parentElement, String labelString, int textHeight,
-                       int style) {
-               TextWithLabelElement element = new TextWithLabelElement(this,
-                               parentElement, labelString, "", textHeight, style);
+    public TextWithLabelElement createMultilineTextWithLabel(ICdmFormElement parentElement, String labelString,
+            int textHeight, int style) {
+        TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, "", textHeight, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -516,7 +513,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createMultiLanguageTextElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -532,23 +529,19 @@ public class CdmFormFactory extends FormToolkit {
         *         {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
         *         object.
         */
-       public MultilanguageTextElement createMultiLanguageTextElement(
-                       ICdmFormElement parentElement, String labelString,
-                       Map<Language, LanguageString> multilanguageText, int textHeight,
-                       int style) {
-               MultilanguageTextElement element = new MultilanguageTextElement(this,
-                               parentElement, labelString, multilanguageText, textHeight,
-                               style);
+    public MultilanguageTextElement createMultiLanguageTextElement(ICdmFormElement parentElement, String labelString,
+            Map<Language, LanguageString> multilanguageText, int textHeight, int style) {
+        MultilanguageTextElement element = new MultilanguageTextElement(this, parentElement, labelString,
+                multilanguageText, textHeight, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
 
-       public KeyStatementElement createKeyStatementElement(
-                       ICdmFormElement parentElement, String labelString,
+    public KeyStatementElement createKeyStatementElement(ICdmFormElement parentElement, String labelString,
                        KeyStatement keyStatement, int textHeight, int style) {
-               KeyStatementElement element = new KeyStatementElement(this,
-                               parentElement, labelString, keyStatement, textHeight, style);
+        KeyStatementElement element = new KeyStatementElement(this, parentElement, labelString, keyStatement,
+                textHeight, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -558,7 +551,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTextWithLabelElement
         * </p>
-        * 
+        *
         * @param labelString
         *            a {@link java.lang.String} object.
         * @param initialText
@@ -571,21 +564,18 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
         *         object.
         */
-       public TextWithLabelElement createTextWithLabelElement(
-                       ICdmFormElement parentElement, String labelString,
+    public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
                        String initialText, int style) {
-               TextWithLabelElement element = new TextWithLabelElement(this,
-                               parentElement, labelString, initialText, null, style);
+        TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, initialText, null,
+                style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
 
-       public UriWithLabelElement createUriWithLabelElement(
-                       ICdmFormElement parentElement, String labelString, URI initialUri,
-                       int style) {
-               UriWithLabelElement element = new UriWithLabelElement(this,
-                               parentElement, labelString, initialUri, null, style);
+    public UriWithLabelElement createUriWithLabelElement(ICdmFormElement parentElement, String labelString,
+            URI initialUri, int style) {
+        UriWithLabelElement element = new UriWithLabelElement(this, parentElement, labelString, initialUri, null, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -598,18 +588,17 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         * @return
         */
-       public OpenUrlSelectorElement createOpenUrlSelectorElement(
-                       ICdmFormElement parentElement, String labelString,
+    public OpenUrlSelectorElement createOpenUrlSelectorElement(ICdmFormElement parentElement, String labelString,
                        IOpenUrlEnabled openUrlEnabled, int style) {
-               OpenUrlSelectorElement element = new OpenUrlSelectorElement(this,
-                               parentElement, labelString, openUrlEnabled, style);
+        OpenUrlSelectorElement element = new OpenUrlSelectorElement(this, parentElement, labelString, openUrlEnabled,
+                style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
 
        /**
-        * 
+        *
         * @param parentElement
         * @param labelString
         * @param conversationEnabled
@@ -617,11 +606,9 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         * @return
         */
-       public EditPasswordElement createEditPasswordElement(
-                       ICdmFormElement parentElement, String labelString,
+    public EditPasswordElement createEditPasswordElement(ICdmFormElement parentElement, String labelString,
                        ConversationHolder conversation, User user, int style) {
-               EditPasswordElement element = new EditPasswordElement(this,
-                               parentElement, labelString, user, conversation);
+        EditPasswordElement element = new EditPasswordElement(this, parentElement, labelString, user, conversation);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -631,7 +618,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createIntegerTextWithLabelElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -641,51 +628,26 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link java.lang.Integer} object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
         *         object.
         */
-       public NumberWithLabelElement createIntegerTextWithLabelElement(
+       public NumberWithLabelElement createNumberTextWithLabelElement(
                        ICdmFormElement parentElement, String labelString,
-                       Integer initialInteger, int style) {
+                       Number initialNumber, int style) {
                NumberWithLabelElement element = new NumberWithLabelElement(this,
-                               parentElement, labelString, initialInteger, style);
+                               parentElement, labelString, initialNumber, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
 
-       /**
-        * <p>
-        * createFloatTextWithLabelElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param initialFloat
-        *            a float.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
-        *         object.
-        */
-       public NumberWithLabelElement createFloatTextWithLabelElement(
-                       ICdmFormElement parentElement, String labelString,
-                       float initialFloat, int style) {
-               NumberWithLabelElement element = new NumberWithLabelElement(this,
-                               parentElement, labelString, initialFloat, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
 
        /**
         * <p>
         * createLanguageStringWithLabelElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -699,11 +661,10 @@ public class CdmFormFactory extends FormToolkit {
         *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
         *         object.
         */
-       public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
-                       ICdmFormElement parentElement, String labelString,
-                       LanguageString languageString, int style) {
-               LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(
-                               this, parentElement, labelString, languageString, style);
+    public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
+            String labelString, LanguageString languageString, int style) {
+        LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
+                languageString, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -713,7 +674,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createLanguageStringWithLabelElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -729,11 +690,10 @@ public class CdmFormFactory extends FormToolkit {
         *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
         *         object.
         */
-       public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
-                       ICdmFormElement parentElement, String labelString,
-                       LanguageString languageString, int height, int style) {
-               LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(
-                               this, parentElement, labelString, languageString, height, style);
+    public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
+            String labelString, LanguageString languageString, int height, int style) {
+        LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
+                languageString, height, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -743,7 +703,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTextElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -754,10 +714,8 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
         *         object.
         */
-       public TextWithLabelElement createTextElement(
-                       ICdmFormElement parentElement, String initialText, int style) {
-               TextWithLabelElement element = new TextWithLabelElement(this,
-                               parentElement, null, initialText, null, style);
+    public TextWithLabelElement createTextElement(ICdmFormElement parentElement, String initialText, int style) {
+        TextWithLabelElement element = new TextWithLabelElement(this, parentElement, null, initialText, null, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -767,7 +725,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createKeyValueViewerElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -780,11 +738,9 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
         *         object.
         */
-       public KeyValueViewerElement createKeyValueViewerElement(
-                       ICdmFormElement parentElement, String keyHeading,
+    public KeyValueViewerElement createKeyValueViewerElement(ICdmFormElement parentElement, String keyHeading,
                        String valueHeading, Map<Object, Object> map) {
-               KeyValueViewerElement element = new KeyValueViewerElement(this,
-                               parentElement, keyHeading, valueHeading, map);
+        KeyValueViewerElement element = new KeyValueViewerElement(this, parentElement, keyHeading, valueHeading, map);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -794,7 +750,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTermComboElement
         * </p>
-        * 
+        *
         * @param termComboType
         *            a
         *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
@@ -812,11 +768,46 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
         *         object.
         */
-       
-       public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(
-                       Class<T> termComboType, ICdmFormElement parentElement,
-                       String labelString, T selection, int style) {
-               TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString, selection, style);
+
+    public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(Class<T> termComboType,
+            ICdmFormElement parentElement, String labelString, T selection, int style) {
+        TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString,
+                selection, style);
+               adapt(element);
+               parentElement.addElement(element);
+               return element;
+       }
+
+       /**
+        * <p>
+        * createTermComboElement
+        * </p>
+        *
+        * @param termComboType
+        *            a
+        *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
+        *            object.
+        * @param parentElement
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+        *            object.
+        * @param labelString
+        *            a {@link java.lang.String} object.
+        * @param selection
+        *            a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
+        *            object.
+        * @param style
+        *            a int.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
+        *         object.
+        */
+
+       public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+                       TermType termType,
+                       ICdmFormElement parentElement,
+                       String labelString,
+                       T selection,
+                       int style) {
+               TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -826,7 +817,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEnumComboElement
         * </p>
-        * 
+        *
         * @param enumComboType
         *            a
         *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
@@ -839,7 +830,7 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
         *         object.
         */
-       public <T extends IDefinedTerm> EnumComboElement<T> createEnumComboElement(
+       public <T extends IEnumTerm<T>> EnumComboElement<T> createEnumComboElement(
                        Class<T> enumComboType, ICdmFormElement parentElement,
                        int style) {
                EnumComboElement<T> element = new EnumComboElement<T>(this, parentElement, enumComboType, style);
@@ -852,7 +843,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createBrowserElement
         * </p>
-        * 
+        *
         * @param imageUri
         *            a {@link java.net.URI} object.
         * @param style
@@ -860,12 +851,11 @@ public class CdmFormFactory extends FormToolkit {
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement} object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
+     *         object.
         */
-       public BrowserElement createBrowserElement(ICdmFormElement parentElement,
-                       URI imageUri, int style) {
-               BrowserElement element = new BrowserElement(this, parentElement,
-                               imageUri, style);
+    public BrowserElement createBrowserElement(ICdmFormElement parentElement, URI imageUri, int style) {
+        BrowserElement element = new BrowserElement(this, parentElement, imageUri, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -875,7 +865,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createImageElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -885,10 +875,8 @@ public class CdmFormFactory extends FormToolkit {
         *            a int.
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
         */
-       public ImageElement createImageElement(ICdmFormElement parentElement,
-                       URI imageUri, int style) {
-               ImageElement element = new ImageElement(this, parentElement, imageUri,
-                               style);
+    public ImageElement createImageElement(ICdmFormElement parentElement, URI imageUri, int style) {
+        ImageElement element = new ImageElement(this, parentElement, imageUri, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -898,7 +886,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTextActionElement
         * </p>
-        * 
+        *
         * @param labelString
         *            a {@link java.lang.String} object.
         * @param initialText
@@ -913,11 +901,10 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
         *         object.
         */
-       public TextActionElement createTextActionElement(
-                       ICdmFormElement parentElement, String labelString,
+    public TextActionElement createTextActionElement(ICdmFormElement parentElement, String labelString,
                        String buttonLabel, String initialText, int style) {
-               TextActionElement element = new TextActionElement(this, parentElement,
-                               labelString, buttonLabel, initialText, style);
+        TextActionElement element = new TextActionElement(this, parentElement, labelString, buttonLabel, initialText,
+                style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -927,7 +914,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createCheckbox
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -937,12 +924,11 @@ public class CdmFormFactory extends FormToolkit {
         *            a boolean.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement} object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
+     *         object.
         */
-       public CheckboxElement createCheckbox(ICdmFormElement parentElement,
-                       String label, boolean initialState, int style) {
-               CheckboxElement element = new CheckboxElement(this, parentElement,
-                               label, initialState, style | orientation);
+    public CheckboxElement createCheckbox(ICdmFormElement parentElement, String label, boolean initialState, int style) {
+        CheckboxElement element = new CheckboxElement(this, parentElement, label, initialState, style | orientation);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -950,10 +936,11 @@ public class CdmFormFactory extends FormToolkit {
 
        /**
         * Creates a section as a part of the form.
-        * 
+        *
         * @return the section widget
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
+     *            a
+     *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         */
        public Section adapt(AbstractFormSection section) {
@@ -965,26 +952,20 @@ public class CdmFormFactory extends FormToolkit {
                section.setPropertyChangeListeners(propertyChangeListeners);
 
                if (section.getToggle() != null) {
-                       section.getToggle().setHoverDecorationColor(
-                                       getColors().getColor(IFormColors.TB_TOGGLE_HOVER));
-                       section.getToggle().setDecorationColor(
-                                       getColors().getColor(IFormColors.TB_TOGGLE));
+            section.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE_HOVER));
+            section.getToggle().setDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE));
                }
 
-               section.setFont(boldFontHolder2.getBoldFont(section
-                               .getLayoutComposite().getFont()));
+        section.setFont(boldFontHolder2.getBoldFont(section.getLayoutComposite().getFont()));
 
-               if ((section.getStyle() & Section.TITLE_BAR) != 0
-                               || (section.getStyle() & Section.SHORT_TITLE_BAR) != 0) {
+        if ((section.getStyle() & ExpandableComposite.TITLE_BAR) != 0
+                || (section.getStyle() & ExpandableComposite.SHORT_TITLE_BAR) != 0) {
                        getColors().initializeSectionToolBarColors();
-                       section.setTitleBarBackground(getColors().getColor(
-                                       IFormColors.TB_BG));
-                       section.setTitleBarBorderColor(getColors().getColor(
-                                       IFormColors.TB_BORDER));
+            section.setTitleBarBackground(getColors().getColor(IFormColors.TB_BG));
+            section.setTitleBarBorderColor(getColors().getColor(IFormColors.TB_BORDER));
                }
                // call setTitleBarForeground regardless as it also sets the label color
-               section.setTitleBarForeground(getColors().getColor(
-                               IFormColors.TB_TOGGLE));
+        section.setTitleBarForeground(getColors().getColor(IFormColors.TB_TOGGLE));
                return section;
        }
 
@@ -1007,15 +988,13 @@ public class CdmFormFactory extends FormToolkit {
                                dispose();
                        }
                        if (boldFont == null) {
-                               boldFont = FormFonts.getInstance().getBoldFont(
-                                               getColors().getDisplay(), normalFont);
+                boldFont = FormFonts.getInstance().getBoldFont(getColors().getDisplay(), normalFont);
                        }
                }
 
                public void dispose() {
                        if (boldFont != null) {
-                               FormFonts.getInstance().markFinished(boldFont,
-                                               getColors().getDisplay());
+                FormFonts.getInstance().markFinished(boldFont, getColors().getDisplay());
                                boldFont = null;
                        }
                }
@@ -1025,7 +1004,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createToggleableTextField
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1040,12 +1019,10 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
         *         object.
         */
-       public ToggleableTextElement createToggleableTextField(
-                       ICdmFormElement parentElement, String labelString,
+    public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString,
                        String initialText, boolean initialState, int style) {
-               ToggleableTextElement element = new ToggleableTextElement(this,
-                               parentElement, labelString, initialText, initialState, style
-                                               | orientation);
+        ToggleableTextElement element = new ToggleableTextElement(this, parentElement, labelString, initialText,
+                initialState, style | orientation);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -1055,7 +1032,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTimePeriodElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1068,11 +1045,43 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
         *         object.
         */
-       public TimePeriodElement createTimePeriodElement(
-                       ICdmFormElement parentElement, String labelString,
+    public TimePeriodElement createTimePeriodElement(ICdmFormElement parentElement, String labelString,
                        TimePeriod timePeriod, int style) {
-               TimePeriodElement element = new TimePeriodElement(this, parentElement,
-                               labelString, timePeriod, style);
+        TimePeriodElement element = new TimePeriodElement(this, parentElement, labelString, timePeriod, style);
+               adapt(element);
+               parentElement.addElement(element);
+               return element;
+       }
+
+       /**
+        * <p>
+        * createGatheringEventUnitElement
+        * </p>
+        *
+        * @param parentElement
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+        *            object.
+        * @param labelString
+        *            a {@link java.lang.String} object.
+        * @param timePeriod
+        *            a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
+        * @param style
+        *            a int.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
+        *         object.
+        */
+       public GatheringEventUnitElement createGatheringEventUnitElement(
+                       ICdmFormElement parentElement,
+                       String labelString,
+                       DerivedUnitFacade gatheringEvent,
+                       MinMaxTextSection.UnitType unitType,
+                       int style) {
+               GatheringEventUnitElement element = new GatheringEventUnitElement(this,
+                               parentElement,
+                               labelString,
+                               gatheringEvent,
+                               unitType,
+                               style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -1082,7 +1091,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createPointElement
         * </p>
-        * 
+        *
         * @param style
         *            a int.
         * @param parentElement
@@ -1092,10 +1101,8 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link eu.etaxonomy.cdm.model.location.Point} object.
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
         */
-       public PointElement createPointElement(ICdmFormElement parentElement,
-                       Point point, int style) {
-               PointElement element = new PointElement(this, parentElement, point,
-                               style);
+    public PointElement createPointElement(ICdmFormElement parentElement, Point point, int style) {
+        PointElement element = new PointElement(this, parentElement, point, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -1105,7 +1112,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createDateDetailSection
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1114,10 +1121,28 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
         *         object.
         */
-       public DateDetailSection createDateDetailSection(
-                       ICdmFormElement parentElement, int style) {
-               DateDetailSection section = new DateDetailSection(this, parentElement,
-                               style);
+    public DateDetailSection createDateDetailSection(ICdmFormElement parentElement, int style) {
+        DateDetailSection section = new DateDetailSection(this, parentElement, style);
+               parentElement.addElement(section);
+               adapt(section);
+               return section;
+       }
+
+       /**
+        * <p>
+        * createDateDetailSection
+        * </p>
+        *
+        * @param parentElement
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+        *            object.
+        * @param style
+        *            a int.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
+        *         object.
+        */
+       public MinMaxTextSection createMinMaxTextSection(ICdmFormElement parentElement, UnitType unitType, int style) {
+               MinMaxTextSection section = new MinMaxTextSection(this, parentElement, unitType, style);
                parentElement.addElement(section);
                adapt(section);
                return section;
@@ -1127,7 +1152,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createPartialElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1137,12 +1162,12 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link org.joda.time.Partial} object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement} object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
+     *         object.
         */
-       public PartialElement createPartialElement(ICdmFormElement parentElement,
-                       String labelString, Partial partial, int style) {
-               PartialElement element = new PartialElement(this, parentElement,
-                               labelString, style);
+    public PartialElement createPartialElement(ICdmFormElement parentElement, String labelString, Partial partial,
+            int style) {
+        PartialElement element = new PartialElement(this, parentElement, labelString, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -1152,7 +1177,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * addSelectionListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         */
@@ -1164,16 +1189,14 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * removeSelectionListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         */
        public void removeSelectionListener(SelectionListener listener) {
                if (listener == null) {
-                       StoreUtil
-                                       .error(this.getClass(),
-                                                       "Tried to remove a selection listener from this factories listeners but was null",
-                                                       null);
+            AbstractUtility.error(this.getClass(),
+                    "Tried to remove a selection listener from this factories listeners but was null", null);
                } else {
                        selectionListenerList.remove(listener);
                }
@@ -1183,7 +1206,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * addPropertyChangeListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
         *            object.
@@ -1199,7 +1222,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * removePropertyChangeListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
         *            object.
@@ -1212,7 +1235,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createHorizontalSeparator
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1220,10 +1243,8 @@ public class CdmFormFactory extends FormToolkit {
         *            a int.
         * @return a {@link org.eclipse.swt.widgets.Label} object.
         */
-       public Label createHorizontalSeparator(ICdmFormElement parentElement,
-                       int style) {
-               Label separator = this.createSeparator(
-                               parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
+    public Label createHorizontalSeparator(ICdmFormElement parentElement, int style) {
+        Label separator = this.createSeparator(parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
                separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                return separator;
        }
@@ -1232,7 +1253,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createVersionElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1245,25 +1266,21 @@ public class CdmFormFactory extends FormToolkit {
         *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
         *         object.
         */
-       public VersionElement createVersionElement(ICdmFormElement parentElement,
-                       VersionableEntity entity, int style) {
-               VersionElement element = new VersionElement(this, parentElement,
-                               entity, style);
+    public VersionElement createVersionElement(ICdmFormElement parentElement, VersionableEntity entity, int style) {
+        VersionElement element = new VersionElement(this, parentElement, entity, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
-       
+
        /**
         * @param cdmBaseSection
         * @param object
         * @param style
         * @return
         */
-       public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement,
-                       CdmBase entity, int style) {
-               CdmBaseElement element = new CdmBaseElement(this, parentElement,
-                               entity, style);
+    public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement, CdmBase entity, int style) {
+        CdmBaseElement element = new CdmBaseElement(this, parentElement, entity, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -1274,7 +1291,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createVersionSection
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1284,14 +1301,13 @@ public class CdmFormFactory extends FormToolkit {
         *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
         *         object.
         */
-       public VersionSection createVersionSection(ICdmFormElement parentElement,
-                       int style) {
+    public VersionSection createVersionSection(ICdmFormElement parentElement, int style) {
                VersionSection section = new VersionSection(this, parentElement, style);
                parentElement.addElement(section);
                adapt(section);
                return section;
        }
-       
+
        /**
         * @param parent
         * @param i
@@ -1308,15 +1324,14 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEmptyElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
         */
        public EmptyElement createEmptyElement(ICdmFormElement parentElement) {
-               EmptyElement element = new EmptyElement(this, parentElement, null,
-                               SWT.NULL);
+        EmptyElement element = new EmptyElement(this, parentElement, null, SWT.NULL);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -1326,7 +1341,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createHeadlineSection
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1335,8 +1350,7 @@ public class CdmFormFactory extends FormToolkit {
         *         object.
         */
        public HeadlineSection createHeadlineSection(ICdmFormElement parentElement) {
-               HeadlineSection section = new HeadlineSection(this, parentElement,
-                               SWT.NULL);
+        HeadlineSection section = new HeadlineSection(this, parentElement, SWT.NULL);
                parentElement.addElement(section);
                adapt(section);
                return section;
@@ -1346,7 +1360,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createParsingMessageElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1359,625 +1373,691 @@ public class CdmFormFactory extends FormToolkit {
         *         {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
         *         object.
         */
-       public ParsingMessageElement createParsingMessageElement(
-                       ICdmFormElement parentElement, ParserProblem parserProblem,
-                       int style) {
-               ParsingMessageElement element = new ParsingMessageElement(this,
-                               parentElement, parserProblem, style);
+    public ParsingMessageElement createParsingMessageElement(ICdmFormElement parentElement,
+            ParserProblem parserProblem, int style) {
+        ParsingMessageElement element = new ParsingMessageElement(this, parentElement, parserProblem, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
 
-       // SIMPLIFY
+    public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass, ConversationHolder conversation,
+            ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
+
+        AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement,
+                selectionProvider, style);
 
-       /**
-        * 
-        */
-       public static enum DetailType {
-               AUTHORSHIP, 
-               CLASSIFICATION, 
-               COLLECTION, 
-               DERIVED_UNIT, 
-               DERIVED_UNIT_FACADE, 
-               DERIVED_UNIT_GENERAL, 
-               DESCRIPTION, 
-               DESCRIPTIONELEMENT, 
-               DETERMINATION, 
-               FEATURE_DISTRIBUTION, 
-               FIELD_OBSERVATION, 
-               GATHERING_EVENT, 
-               GRANTEDAUTHORITY,
-               GROUP, 
-               HYBRID, 
-               INSTITUTION, 
-               MEDIA, 
-               NAMED_AREA, 
-               NAMED_AREA_LEVEL, 
-               NAMERELATIONSHIP, 
-               NATURAL_LANGUAGE, 
-               NOMENCLATURALREFERENCE, 
-               NONVIRALNAME, 
-               PARSINGMESSAGE, 
-               PERSON, 
-               POLYTOMOUS_KEY, 
-               POLYTOMOUS_KEY_NODE, 
-               REFERENCEBASE, 
-               REFERENCED_ENTITY, 
-               SCIENTIFICNAME, 
-               TAXON_NODE, 
-               TAXON_RELATIONSHIP, 
-               TAXONBASE, 
-               TEAM, 
-               TEAMORPERSONBASE, 
-               TERM_VOCABULARY,
-               USE_RECORD,
-               USER
-       }
-       
-       public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       ISelectionProvider selectionProvider, int style) {
-               
-               AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement, selectionProvider, style);
-                       
                parentElement.addElement(section);
                adapt(section);
                return section;
-               
-       }
-       
-       /**
-        * @param definedTermClass
-        * @param formElement
-        * @param style
-        * @return
-        */
-       public AbstractCdmDetailElement createDefinedTermDetailElement(
-                       Class definedTermClass, AbstractCdmDetailSection parentElement,
-                       int style) {
-               AbstractCdmDetailElement element = null;
-               
-               if (NamedArea.class.isAssignableFrom(definedTermClass)){
-                       element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
-               }
-               else {
-                       element = new DefinedTermDetailElement(this, parentElement);
-               }
-               
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
+
        }
 
-       /**
-        * <p>
-        * createCdmDetailSection
-        * </p>
-        * 
-        * @param detailType
-        *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param selectionProvider
-        *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
-        * @param style
-        *            a int.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *         object.
-        */
-       public AbstractFormSection createCdmDetailSection(DetailType detailType,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       ISelectionProvider selectionProvider, int style) {
-               AbstractFormSection section = null;
-
-               switch (detailType) {
-               case SCIENTIFICNAME:
-                       section = new NameDetailSection(this, conversation, parentElement,
-                                       selectionProvider, style);
-                       break;
-               case REFERENCEBASE:
-                       section = new ReferenceDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case NOMENCLATURALREFERENCE:
-                       section = new NomenclaturalReferenceDetailSection(this,
-                                       conversation, parentElement, selectionProvider, style);
-                       break;
-               case TAXONBASE:
-                       section = new TaxonBaseDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case AUTHORSHIP:
-                       section = new AuthorshipDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case TEAMORPERSONBASE:
-                       section = new TeamOrPersonBaseDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case TEAM:
-                       section = new TeamDetailSection(this, conversation, parentElement,
-                                       null, style);
-                       break;
-               case PERSON:
-                       section = new PersonDetailSection(this, conversation,
-                                       parentElement, null, style);
-                       break;
-               case DESCRIPTION:
-                       section = new DescriptionDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case DESCRIPTIONELEMENT:
-                       section = new DescriptionElementDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case PARSINGMESSAGE:
-                       section = new ParsingMessagesSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case NONVIRALNAME:
-                       section = new NonViralNameDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case MEDIA:
-                       section = new eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection(
-                                       this, conversation, parentElement, selectionProvider, style);
-                       break;
-               case DERIVED_UNIT_FACADE:
-                       section = new DerivedUnitFacadeDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case FIELD_OBSERVATION:
-                       section = new FieldObservationDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case GATHERING_EVENT:
-                       section = new GatheringEventDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case DERIVED_UNIT:
-                       section = new DerivedUnitBaseDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case NATURAL_LANGUAGE:
-                       section = new NaturalLanguageSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case FEATURE_DISTRIBUTION:
-                       section = new FeatureDistributionDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case CLASSIFICATION:
-                       section = new ClassificationDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case TAXON_NODE:
-                       section = new TaxonNodeDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case POLYTOMOUS_KEY:
-                       section = new PolytomousKeyDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case POLYTOMOUS_KEY_NODE:
-                       section = new PolytomousKeyNodeDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case INSTITUTION:
-                       section = new InstitutionDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case DERIVED_UNIT_GENERAL:
-                       section = new GeneralDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case HYBRID:
-                       section = new HybridDetailSection(this, conversation,
-                                       parentElement, selectionProvider, style);
-                       break;
-               case USER:
-                       section = new UserDetailSection(this, conversation, parentElement,
-                                       selectionProvider, style);
-                       break;
-               case GROUP:
-                       section = new GroupDetailSection(this, conversation, parentElement,
-                                       selectionProvider, style);
-                       break;
-               case DETERMINATION:
-                       section = new DeterminationDetailSection(this, conversation, parentElement,
-                                       selectionProvider, style);
-                       break;
-               case TAXON_RELATIONSHIP:
-                       section = new TaxonRelationshipDetailSection(this, conversation, parentElement, 
-                                       selectionProvider, style);
-                       break;
-               case REFERENCED_ENTITY:
-                       section = new ReferencedEntityDetailSection(this, conversation, parentElement, 
-                                       selectionProvider, style);
-                       break;
-               case TERM_VOCABULARY:
-                       section = new TermVocabularyDetailSection(this, conversation, parentElement, 
-                                       selectionProvider, style);
-                       break;
-               case NAMED_AREA:
-                       section = new NamedAreaDetailSection(this, conversation, parentElement, 
-                                       selectionProvider, style);
-                       break;
-               case USE_RECORD:
-                       section = new UseRecordDetailSection(this, conversation, parentElement,
-                                       selectionProvider, style);
-                       break;
+    /**
+     * @param definedTermClass
+     * @param formElement
+     * @param style
+     * @return
+     */
+    public AbstractCdmDetailElement createDefinedTermDetailElement(Class definedTermClass,
+            AbstractCdmDetailSection parentElement, int style) {
+        AbstractCdmDetailElement element = null;
+
+        if (NamedArea.class.isAssignableFrom(definedTermClass)) {
+            element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+        } else if (definedTermClass.equals(Feature.class)) {
+            element = new FeatureDetailElement(this, parentElement);
+        } else {
+            element = new DefinedTermDetailElement(this, parentElement);
+        }
+
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+
+    //--------DetailSections---------
+    public NameDetailSection createNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        NameDetailSection section = new NameDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ReferenceDetailSection createReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        ReferenceDetailSection section = new ReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public NomenclaturalReferenceDetailSection createNomenclaturalReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        NomenclaturalReferenceDetailSection section = new NomenclaturalReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TaxonBaseDetailSection createTaxonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        TaxonBaseDetailSection section = new TaxonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public AuthorshipDetailSection createAuthorshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        AuthorshipDetailSection section = new AuthorshipDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TeamOrPersonBaseDetailSection createTeamOrPersonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        TeamOrPersonBaseDetailSection section = new TeamOrPersonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TeamDetailSection createTeamDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        TeamDetailSection section = new TeamDetailSection(this, conversation, parentElement, null, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public PersonDetailSection createPersonDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        PersonDetailSection section = new PersonDetailSection(this, conversation, parentElement, null, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DescriptionDetailSection createDescriptionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        DescriptionDetailSection section = new DescriptionDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DescriptionElementDetailSection createDescriptionElementDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        DescriptionElementDetailSection section = new DescriptionElementDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ParsingMessagesSection createParsingMessagesSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        ParsingMessagesSection section = new ParsingMessagesSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public NonViralNameDetailSection createNonViralNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        NonViralNameDetailSection section = new NonViralNameDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public MediaDetailsSection createMediaDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        MediaDetailsSection section = new MediaDetailsSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DerivedUnitFacadeDetailSection createDerivedUnitFacadeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        DerivedUnitFacadeDetailSection section = new DerivedUnitFacadeDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public FieldUnitDetailSection createFieldUnitDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        FieldUnitDetailSection section = new FieldUnitDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public GatheringEventDetailSection createGatheringEventDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DerivedUnitBaseDetailSection createDerivedUnitBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        DerivedUnitBaseDetailSection section = new DerivedUnitBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public NaturalLanguageSection createNaturalLanguageSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        NaturalLanguageSection section = new NaturalLanguageSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public FeatureDistributionDetailSection createFeatureDistributionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        FeatureDistributionDetailSection section = new FeatureDistributionDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ClassificationDetailSection createClassificationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        ClassificationDetailSection section = new ClassificationDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TaxonNodeDetailSection createTaxonNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        TaxonNodeDetailSection section = new TaxonNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public PolytomousKeyDetailSection createPolytomousKeyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        PolytomousKeyDetailSection section = new PolytomousKeyDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public PolytomousKeyNodeDetailSection createPolytomousKeyNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        PolytomousKeyNodeDetailSection section = new PolytomousKeyNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public InstitutionDetailSection createInstitutionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        InstitutionDetailSection section = new InstitutionDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public GeneralDetailSection createGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public HybridDetailSection createHybridDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        HybridDetailSection section = new HybridDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public UserDetailSection createUserDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        UserDetailSection section = new UserDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public GroupDetailSection createGroupDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        GroupDetailSection section = new GroupDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DeterminationDetailSection createDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        DeterminationDetailSection section = new DeterminationDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TaxonRelationshipDetailSection createTaxonRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        TaxonRelationshipDetailSection section = new TaxonRelationshipDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ReferencedEntityDetailSection createReferencedEntityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        ReferencedEntityDetailSection section = new ReferencedEntityDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TermVocabularyDetailSection createTermVocabularyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        TermVocabularyDetailSection section = new TermVocabularyDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+
+    public NamedAreaDetailSection createNamedAreaDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        NamedAreaDetailSection section = new NamedAreaDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public UseRecordDetailSection createUseRecordDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        UseRecordDetailSection section = new UseRecordDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public GeneralDetailSection createFOSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
                }
-               
 
-               if (section == null) {
-                       throw new RuntimeException(
-                                       "You tried to create a cdm detail section that is not implemented yet.");
+    public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public FieldUnitDetailSection createFODetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        FieldUnitDetailSection section = new FieldUnitDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
                }
 
+    private void addAndAdaptSection(ICdmFormElement parentElement, AbstractFormSection<?> section) {
                parentElement.addElement(section);
                adapt(section);
-               return section;
        }
 
-       
-       
-       /**
-        * <p>
-        * createCdmDetailElement
-        * </p>
-        * 
-        * @param detailType
-        *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
-        *            object.
-        * @param style
-        *            a int.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement}
-        *         object.
-        */
-       public AbstractCdmDetailElement createCdmDetailElement(
-                       DetailType detailType, ICdmFormElement parentElement, int style) {
-               AbstractCdmDetailElement element = null;
-
-               switch (detailType) {
-               case SCIENTIFICNAME:
-                       element = new NameDetailElement(this, parentElement, style);
-                       break;
-               case REFERENCEBASE:
-                       element = new ReferenceDetailElement(this, parentElement, style);
-                       break;
-               case NOMENCLATURALREFERENCE:
-                       element = new NomenclaturalReferenceDetailElement(this,
-                                       parentElement, style);
-                       break;
-               case TAXONBASE:
-                       element = new TaxonBaseDetailElement(this, parentElement, style);
-                       break;
-               case AUTHORSHIP:
-                       element = new AuthorshipDetailElement(this, parentElement, style);
-                       break;
-               case TEAM:
-                       element = new TeamDetailElement(this, parentElement, style);
-                       break;
-               case PERSON:
-                       element = new PersonDetailElement(this, parentElement, style);
-                       break;
-               case DESCRIPTION:
-                       element = new DescriptionDetailElement(this, parentElement, style);
-                       break;
-               case DESCRIPTIONELEMENT:
-                       element = new DescriptionElementDetailElement(this, parentElement,
-                                       style);
-                       break;
-               case NONVIRALNAME:
-                       element = new NonViralNameDetailElement(this, parentElement);
-                       break;
-               case DERIVED_UNIT_FACADE:
-                       element = new DerivedUnitFacadeDetailElement(this, parentElement);
-                       break;
-               case FIELD_OBSERVATION:
-                       element = new FieldObservationDetailElement(this, parentElement);
-                       break;
-               case GATHERING_EVENT:
-                       element = new GatheringEventDetailElement(this, parentElement);
-                       break;
-               case DERIVED_UNIT:
-                       element = new DerivedUnitBaseDetailElement(this, parentElement);
-                       break;
-               case NATURAL_LANGUAGE:
-                       element = new NaturalLanguageDetailElement(this, parentElement);
-                       break;
-               case FEATURE_DISTRIBUTION:
-                       element = new FeatureDistributionDetailElement(this, parentElement);
-                       break;
-               case CLASSIFICATION:
-                       element = new ClassificationDetailElement(this, parentElement);
-                       break;
-               case TAXON_NODE:
-                       element = new TaxonNodeDetailElement(this, parentElement);
-                       break;
-               case COLLECTION:
-                       element = new CollectionDetailElement(this, parentElement);
-                       break;
-               case POLYTOMOUS_KEY:
-                       element = new PolytomousKeyDetailElement(this, parentElement);
-                       break;
-               case POLYTOMOUS_KEY_NODE:
-                       element = new PolytomousKeyNodeDetailElement(this, parentElement);
-                       break;
-               case INSTITUTION:
-                       element = new InstitutionDetailElement(this, parentElement);
-                       break;
-               case DERIVED_UNIT_GENERAL:
-                       element = new GeneralDetailElement(this, parentElement);
-                       break;
-               case HYBRID:
-                       element = new HybridDetailElement(this, parentElement);
-                       break;
-               case USER:
-                       element = new UserDetailElement(this, parentElement);
-                       break;
-               case GROUP:
-                       element = new GroupDetailElement(this, parentElement);
-                       break;
-               case GRANTEDAUTHORITY:
-                       element = new GrantedAuthorityDetailElement(this, parentElement);
-                       break;
-               case DETERMINATION:
-                       element = new DeterminationDetailElement(this, parentElement);
-                       break;
-               case TAXON_RELATIONSHIP:
-                       element = new TaxonRelationshipDetailElement(this, parentElement);
-                       break;
-               case REFERENCED_ENTITY:
-                       element = new RefereneEntityDetailElement(this, parentElement);
-                       break;
-               case TERM_VOCABULARY:
-                       element = new TermVocabularyDetailElement(this, parentElement);
-                       break;
-               case NAMED_AREA:
-                       element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
-                       break;
-               case NAMED_AREA_LEVEL:
-                       element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
-                       break;
-               case USE_RECORD:
-                       //element = new UseRecordDetailElement(this, parentElement, style);
-                       element = new UseRecordDetailElement(this, parentElement);
-                       break;
+    //--------DetailElements------------
+
+    public UseRecordDetailElement createUseRecordDetailElement(ICdmFormElement parentElement){
+        UseRecordDetailElement element = new UseRecordDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public DefinedTermDetailElement<NamedAreaLevel> createNamedAreaLevelElement(ICdmFormElement parentElement){
+        DefinedTermDetailElement<NamedAreaLevel> element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement createNamedAreaDetailElement(ICdmFormElement parentElement){
+        eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public TermVocabularyDetailElement createTermVocabularyDetailElement(ICdmFormElement parentElement){
+        TermVocabularyDetailElement element = new TermVocabularyDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public ReferenceEntityDetailElement createReferenceEntityDetailElement(ICdmFormElement parentElement){
+        ReferenceEntityDetailElement element = new ReferenceEntityDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public TaxonRelationshipDetailElement createTaxonRelationshipDetailElement(ICdmFormElement parentElement){
+        TaxonRelationshipDetailElement element = new TaxonRelationshipDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public GrantedAuthorityDetailElement createGrantedAuthorityDetailElement(ICdmFormElement parentElement){
+        GrantedAuthorityDetailElement element = new GrantedAuthorityDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public GroupDetailElement createGroupDetailElement(ICdmFormElement parentElement){
+        GroupDetailElement element = new GroupDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public UserDetailElement createUserDetailElement(ICdmFormElement parentElement){
+        UserDetailElement element = new UserDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public HybridDetailElement createHybridDetailElement(ICdmFormElement parentElement){
+        HybridDetailElement element = new HybridDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public InstitutionDetailElement createInstitutionDetailElement(ICdmFormElement parentElement){
+        InstitutionDetailElement element = new InstitutionDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public PolytomousKeyNodeDetailElement createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement){
+        PolytomousKeyNodeDetailElement element = new PolytomousKeyNodeDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public PolytomousKeyDetailElement createPolytomousKeyDetailElement(ICdmFormElement parentElement){
+        PolytomousKeyDetailElement element = new PolytomousKeyDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public CollectionDetailElement createCollectionDetailElement(ICdmFormElement parentElement){
+        CollectionDetailElement element = new CollectionDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public TaxonNodeDetailElement createTaxonNodeDetailElement(ICdmFormElement parentElement){
+        TaxonNodeDetailElement element = new TaxonNodeDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public ClassificationDetailElement createClassificationDetailElement(ICdmFormElement parentElement){
+        ClassificationDetailElement element = new ClassificationDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public FeatureDistributionDetailElement createFeatureDistributionDetailElement(ICdmFormElement parentElement){
+        FeatureDistributionDetailElement element = new FeatureDistributionDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public NaturalLanguageDetailElement createNaturalLanguageDetailElement(ICdmFormElement parentElement){
+        NaturalLanguageDetailElement element = new NaturalLanguageDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public DerivedUnitFacadeDetailElement createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement){
+        DerivedUnitFacadeDetailElement element = new DerivedUnitFacadeDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public NonViralNameDetailElement createNonViralNameDetailElement(ICdmFormElement parentElement){
+        NonViralNameDetailElement element = new NonViralNameDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public DescriptionElementDetailElement createDescriptionElementDetailElement(ICdmFormElement parentElement, int style){
+        DescriptionElementDetailElement element = new DescriptionElementDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public DescriptionDetailElement createDescriptionDetailElement(ICdmFormElement parentElement, int style){
+        DescriptionDetailElement element = new DescriptionDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public PersonDetailElement createPersonDetailElement(ICdmFormElement parentElement, int style){
+        PersonDetailElement element = new PersonDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public TeamDetailElement createTeamDetailElement(ICdmFormElement parentElement, int style){
+        TeamDetailElement element = new TeamDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public AuthorshipDetailElement createAuthorshipDetailElement(ICdmFormElement parentElement, int style){
+        AuthorshipDetailElement element = new AuthorshipDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public TaxonBaseDetailElement createTaxonBaseDetailElement(ICdmFormElement parentElement, int style){
+        TaxonBaseDetailElement element = new TaxonBaseDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public NameDetailElement createNameDetailElement(ICdmFormElement parentElement, int style){
+        NameDetailElement element = new NameDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public ReferenceDetailElement createReferenceDetailElement(ICdmFormElement parentElement, int style){
+        ReferenceDetailElement element = new ReferenceDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public NomenclaturalReferenceDetailElement createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement, int style){
+        NomenclaturalReferenceDetailElement element = new NomenclaturalReferenceDetailElement(this, parentElement, style);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+
+    public GeneralDetailElement createGeneralDetailElement(ICdmFormElement parentElement){
+        GeneralDetailElement element = new GeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public GatheringEventDetailElement createGatheringEventDetailElement(ICdmFormElement parentElement) {
+        GatheringEventDetailElement element = new GatheringEventDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
                }
 
-               if (element == null) {
-                       StoreUtil
-                                       .error(this.getClass(),
-                                                       "Detail element was not created. Seems like the case was not implemented for the requested detail type: "
-                                                                       + detailType, null);
+    public FieldUnitDetailElement createFieldUnitDetailElement(ICdmFormElement parentElement) {
+        FieldUnitDetailElement element = new FieldUnitDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
                }
 
-               adapt(element);
-               parentElement.addElement(element);
+    public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) {
+        DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
                return element;
        }
 
-       /**
-        * 
-        * @author n.hoffmann
-        * @created Mar 5, 2010
-        * @version 1.0
-        */
-       public static enum EntityDetailType {
-               TEAM, 
-               TEAMMEMBER, 
-               ANNOTATION, 
-               CREDIT, 
-               DESCRIPTIONELEMENTSOURCE, 
-               EXTENSION, 
-               MARKER, 
-               MEDIA, 
-               DESCRIPTIONELEMENTMEDIA, 
-               MEDIAREPRESENTATION, 
-               MEDIAREPRESENTATIONPART, 
-               MODIFIER, 
-               NOMENCLATURALSTATUS, 
-               NAME_RELATIONSHIP, 
-               PROTOLOG, 
-               RIGHTS, 
-               SOURCE, 
-               SCOPE, 
-               DESCRIPTIONSOURCE, 
-               TYPEDESIGNATION, 
-               STATE_DATA, 
-               STATISTICAL_MEASUREMENT_VALUE, 
-               DESCRIBED_SPECIMEN, 
-               COLLECTING_AREA, 
-               DETERMINATION_EVENT, 
-               SPECIMEN_COLLECTION, 
-               IDENTIFIABLE_SOURCE_COLLECTION, 
-               GEOGRAPHICAL_SCOPE, 
-               SCOPE_RESTRICTION, 
-               MEMBER, 
-               GRANTED_AUTHORITY, 
-               GROUPS_BY_USER, 
-               TAXONOMIC_SCOPE, 
-               DETERMINATION_CURRENT, 
-               DETERMINATION_HISTORY
+    public DeterminationDetailElement createDeterminationDetailElement(ICdmFormElement parentElement) {
+        DeterminationDetailElement element = new DeterminationDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
        }
 
        /**
-        * <p>
-        * createEntityDetailSection
-        * </p>
-        * 
-        * @param entityDetailType
-        *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType}
-        *            object.
-        * @param style
-        *            a int.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *         object.
+     * @param element
         */
-       public AbstractFormSection createEntityDetailSection(
-                       EntityDetailType entityDetailType, ConversationHolder conversation,
-                       ICdmFormElement parentElement, int style) {
-               AbstractFormSection section = null;
-
-               switch (entityDetailType) {
-               case TEAM:
-                       section = new TeamDetailSection(this, conversation, parentElement,
-                                       null, style);
-                       break;
-               case TEAMMEMBER:
-                       section = new TeamMemberSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case ANNOTATION:
-                       section = new AnnotationSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case CREDIT:
-                       section = new CreditSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case DESCRIPTIONELEMENTSOURCE:
-                       section = new DescriptionElementSourceSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case EXTENSION:
-                       section = new ExtensionSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case MARKER:
-                       section = new MarkerSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case MEDIA:
-                       section = new MediaSection(this, conversation, parentElement, style);
-                       break;
-               case DESCRIPTIONELEMENTMEDIA:
-                       section = new DescriptionElementMediaSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case MEDIAREPRESENTATION:
-                       section = new MediaRepresentationSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case MEDIAREPRESENTATIONPART:
-                       section = new MediaRepresentationPartSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case MODIFIER:
-                       section = new ModifierSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case NOMENCLATURALSTATUS:
-                       section = new NomenclaturalStatusSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case NAME_RELATIONSHIP:
-                       section = new NameRelationshipDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case PROTOLOG:
-                       section = new ProtologueSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case RIGHTS:
-                       section = new RightsSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case SOURCE:
-                       section = new SourceSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case SCOPE:
-                       section = new ScopeSection(this, conversation, parentElement, style);
-                       break;
-               case DESCRIPTIONSOURCE:
-                       section = new DescriptionSourceSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case TYPEDESIGNATION:
-                       section = new TypeDesignationSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case STATE_DATA:
-                       section = new StateDataSection(this, conversation, parentElement,
-                                       style);
-                       break;
-               case STATISTICAL_MEASUREMENT_VALUE:
-                       section = new StatisticalMeasurementValueSection(this,
-                                       conversation, parentElement, style);
-                       break;
-               case DESCRIBED_SPECIMEN:
-                       section = new DescribedSpecimenSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case COLLECTING_AREA:
-                       section = new CollectingAreasDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case DETERMINATION_CURRENT:
-                       section = new CurrentDeterminationDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case DETERMINATION_HISTORY:
-                       section = new DeterminationHistoryDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case SPECIMEN_COLLECTION:
-                       section = new SpecimenCollectionDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case IDENTIFIABLE_SOURCE_COLLECTION:
-                       section = new SourceCollectionDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case GEOGRAPHICAL_SCOPE:
-                       section = new GeographicalScopeDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case SCOPE_RESTRICTION:
-                       section = new ScopeRestrictionSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case MEMBER:
-                       section = new MemberDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case GRANTED_AUTHORITY:
-                       section = new GrantedAuthorityDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case GROUPS_BY_USER:
-                       section = new GroupsByUserDetailSection(this, conversation,
-                                       parentElement, style);
-                       break;
-               case TAXONOMIC_SCOPE:
-                       section = new TaxonomicScopeSection(this, conversation,
-                                       parentElement, style);
-                       break;
+    private void addAndAdaptElement(ICdmFormElement parentElement, AbstractCdmDetailElement<?> element) {
+        adapt(element);
+        parentElement.addElement(element);
+    }
+
+    //--------EntityCollectionSection----------
+    public TeamMemberSection createTeamMemberSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        TeamMemberSection section = new TeamMemberSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public AnnotationSection createAnnotationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        AnnotationSection section = new AnnotationSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public CreditSection createCreditSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        CreditSection section = new CreditSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DescriptionElementSourceSection createDescriptionElementSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        DescriptionElementSourceSection section = new DescriptionElementSourceSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ExtensionSection createExtensionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        ExtensionSection section = new ExtensionSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public MarkerSection createMarkerSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        MarkerSection section = new MarkerSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public MediaSection createMediaSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        MediaSection section = new MediaSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DescriptionElementMediaSection createDescriptionElementMediaSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        DescriptionElementMediaSection section = new DescriptionElementMediaSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public MediaRepresentationSection createMediaRepresentationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        MediaRepresentationSection section = new MediaRepresentationSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public MediaRepresentationPartSection createMediaRepresentationPartSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        MediaRepresentationPartSection section = new MediaRepresentationPartSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ModifierSection createModifierSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        ModifierSection section = new ModifierSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public NomenclaturalStatusSection createNomenclaturalStatusSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        NomenclaturalStatusSection section = new NomenclaturalStatusSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public NameRelationshipDetailSection createNameRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        NameRelationshipDetailSection section = new NameRelationshipDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public RightsSection createRightsSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        RightsSection section = new RightsSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SourceSection createSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SourceSection section = new SourceSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ScopeSection createScopeSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        ScopeSection section = new ScopeSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DescriptionSourceSection createDescriptionSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        DescriptionSourceSection section = new DescriptionSourceSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TypeDesignationSection createTypeDesignationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        TypeDesignationSection section = new TypeDesignationSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public StateDataSection createStateDataSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        StateDataSection section = new StateDataSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public StatisticalMeasurementValueSection createStatisticalMeasurementValueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        StatisticalMeasurementValueSection section = new StatisticalMeasurementValueSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DescribedSpecimenSection createDescribedSpecimenSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        DescribedSpecimenSection section = new DescribedSpecimenSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public CollectingAreasDetailSection createCollectingAreasDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        CollectingAreasDetailSection section = new CollectingAreasDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public CurrentDeterminationDetailSection createCurrentDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        CurrentDeterminationDetailSection section = new CurrentDeterminationDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DeterminationHistoryDetailSection createDeterminationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        DeterminationHistoryDetailSection section = new DeterminationHistoryDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SpecimenCollectionDetailSection createSpecimenCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SpecimenCollectionDetailSection section = new SpecimenCollectionDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SourceCollectionDetailSection createSourceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SourceCollectionDetailSection section = new SourceCollectionDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public GeographicalScopeDetailSection createGeographicalScopeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        GeographicalScopeDetailSection section = new GeographicalScopeDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public ScopeRestrictionSection createScopeRestrictionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        ScopeRestrictionSection section = new ScopeRestrictionSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public MemberDetailSection createMemberDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        MemberDetailSection section = new MemberDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public GrantedAuthorityDetailSection createGrantedAuthorityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        GrantedAuthorityDetailSection section = new GrantedAuthorityDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public GroupsByUserDetailSection createGroupsByUserDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        GroupsByUserDetailSection section = new GroupsByUserDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
                }
-               parentElement.addElement(section);
-               adapt(section);
+
+    public TaxonomicScopeSection createTaxonomicScopeSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        TaxonomicScopeSection section = new TaxonomicScopeSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
                return section;
        }
 
@@ -1985,13 +2065,14 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEntityCollectionElement
         * </p>
-        * 
+        *
         * @param removeListener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
+     *            a
+     *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param versionableEntity
         *            a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
@@ -2002,123 +2083,131 @@ public class CdmFormFactory extends FormToolkit {
         *         {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
         *         object.
         */
-       public AbstractEntityCollectionElement createEntityCollectionElement(
-                       AbstractFormSection parentElement, Object versionableEntity,
-                       SelectionListener removeListener, Color backgroundColor, int style) {
+    public AbstractEntityCollectionElement createEntityCollectionElement(AbstractFormSection parentElement,
+            Object versionableEntity, SelectionListener removeListener, Color backgroundColor, int style) {
                AbstractEntityCollectionElement element = null;
 
                Object entity = HibernateProxyHelper.deproxy(versionableEntity);
 
                if (entity instanceof Annotation) {
-                       element = new AnnotationElement(this, parentElement,
-                                       (Annotation) entity, removeListener, style);
+            element = new AnnotationElement(this, parentElement, (Annotation) entity, removeListener, style);
                } else if (entity instanceof Person) {
-                       element = new TeamMemberElement(this, parentElement,
-                                       (Person) entity, removeListener, style);
+            element = new TeamMemberElement(this, parentElement, (Person) entity, removeListener, style);
                } else if (entity instanceof Credit) {
-                       element = new CreditElement(this, parentElement, (Credit) entity,
-                                       removeListener, style);
+            element = new CreditElement(this, parentElement, (Credit) entity, removeListener, style);
                } else if (entity instanceof Extension) {
-                       element = new ExtensionElement(this, parentElement,
-                                       (Extension) entity, removeListener, style);
+            element = new ExtensionElement(this, parentElement, (Extension) entity, removeListener, style);
                } else if (entity instanceof Marker) {
-                       element = new MarkerElement(this, parentElement, (Marker) entity,
-                                       removeListener, style);
+            element = new MarkerElement(this, parentElement, (Marker) entity, removeListener, style);
                } else if (entity instanceof Media) {
-                       element = new MediaElement(this, parentElement, (Media) entity,
-                                       removeListener, style);
+            element = new MediaElement(this, parentElement, (Media) entity, removeListener, style);
                } else if (entity instanceof MediaRepresentation) {
-                       element = new MediaRepresentationElement(this, parentElement,
-                                       (MediaRepresentation) entity, removeListener, style);
+            element = new MediaRepresentationElement(this, parentElement, (MediaRepresentation) entity, removeListener,
+                    style);
                } else if (entity instanceof ImageFile) {
-                       element = new ImageFileElement(this, parentElement,
-                                       (ImageFile) entity, removeListener, style);
+            element = new ImageFileElement(this, parentElement, (ImageFile) entity, removeListener, style);
                } else if (entity instanceof MediaRepresentationPart){
-                       element = new MediaRepresentationPartElement(this, parentElement, 
-                                       (MediaRepresentationPart) entity, removeListener, style);                       
+            element = new MediaRepresentationPartElement(this, parentElement, (MediaRepresentationPart) entity,
+                    removeListener, style);
                } else if (entity instanceof NomenclaturalStatus) {
-                       element = new NomenclaturalStatusElement(this, parentElement,
-                                       (NomenclaturalStatus) entity, removeListener, style);
+            element = new NomenclaturalStatusElement(this, parentElement, (NomenclaturalStatus) entity, removeListener,
+                    style);
                } else if (entity instanceof Rights) {
-                       element = new RightsElement(this, parentElement, (Rights) entity,
+            element = new RightsElement(this, parentElement, (Rights) entity, removeListener, style);
+        } else if (entity instanceof DescriptionElementSource) {
+            element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
                                        removeListener, style);
-               } else if (entity instanceof DescriptionElementSource) {
-                       element = new DescriptionElementSourceElement(this, parentElement,
-                                       (DescriptionElementSource) entity, removeListener, style);
                } else if (entity instanceof IdentifiableSource) {
-                       element = new IdentifiableSourceElement(this, parentElement,
-                                       (IdentifiableSource) entity, removeListener, style);
-               } else if (entity instanceof Scope) {
-                       element = new ScopeElement(this, parentElement, (Scope) entity,
-                                       removeListener, style);
-               } else if (entity instanceof Modifier) {
-                       element = new ModifierElement(this, parentElement,
-                                       (Modifier) entity, removeListener, style);
+            element = new IdentifiableSourceElement(this, parentElement, (IdentifiableSource) entity, removeListener,
+                    style);
+               } else if (entity instanceof DefinedTerm) {
+                       switch(((DefinedTerm)entity).getTermType()) {
+                               case Scope:
+                                       element = new ScopeElement(this,
+                                                       parentElement,
+                                                       (DefinedTerm) entity,
+                                                       removeListener,
+                                                       style);
+                                       break;
+                               case Modifier:
+                                       element = new ModifierElement(this,
+                                                       parentElement,
+                                                       (DefinedTerm) entity,
+                                                       removeListener,
+                                                       style);
+                                       break;
+                               default:
+                                       //FIXME : Actually we should through an exception here
+                                       element = null;
+                                       break;
+
+                       }
                } else if (entity instanceof Reference) {
-                       element = new DescriptionSourceElement(this, parentElement,
-                                       (Reference) entity, removeListener, style);
+            element = new DescriptionSourceElement(this, parentElement, (Reference) entity, removeListener, style);
                } else if (entity instanceof NameTypeDesignation) {
-                       element = new NameTypeDesignationElement(this, parentElement,
-                                       (NameTypeDesignation) entity, removeListener, style);
+            element = new NameTypeDesignationElement(this, parentElement, (NameTypeDesignation) entity, removeListener,
+                    style);
                } else if (entity instanceof NameRelationship) {
-                       element = new NameRelationshipDetailElement(this, parentElement,
-                                       (NameRelationship) entity, removeListener, style);
+            element = new NameRelationshipDetailElement(this, parentElement, (NameRelationship) entity, removeListener,
+                    style);
                } else if (entity instanceof SpecimenTypeDesignation) {
-                       element = new SpecimenTypeDesignationElement(this, parentElement,
-                                       (SpecimenTypeDesignation) entity, removeListener, style);
+            element = new SpecimenTypeDesignationElement(this, parentElement, (SpecimenTypeDesignation) entity,
+                    removeListener, style);
                } else if (entity instanceof StateData) {
-                       element = new StateDataElement(this, parentElement,
-                                       (StateData) entity, removeListener, style);
+            element = new StateDataElement(this, parentElement, (StateData) entity, removeListener, style);
                } else if (entity instanceof StatisticalMeasurementValue) {
-                       element = new StatisticalMeasurementValueElement(this,
-                                       parentElement, (StatisticalMeasurementValue) entity,
+            element = new StatisticalMeasurementValueElement(this, parentElement, (StatisticalMeasurementValue) entity,
                                        removeListener, style);
                } else if (entity instanceof DerivedUnit) {
-                       element = new DerivedUnitElement(this, parentElement,
-                                       (DerivedUnit) entity, removeListener, style);
+                       switch(((DerivedUnit)entity).getRecordBasis()) {
+                               case LivingSpecimen:
+                               case PreservedSpecimen:
+                               case OtherSpecimen:
+                                       element = new SpecimenCollectionDetailElement(this,
+                                                               parentElement,
+                                                               (DerivedUnit) entity,
+                                                               removeListener,
+                                                               style);
+                                       break;
+                               default:
+                                       element = new DerivedUnitElement(this,
+                                                               parentElement,
+                                                               (DerivedUnit) entity,
+                                                               removeListener,
+                                                               style);
+                       }
+
                } else if (entity instanceof NamedArea) {
-                       element = new NamedAreaDetailElement(this, parentElement,
-                                       (NamedArea) entity, removeListener, style);
+            element = new NamedAreaDetailElement(this, parentElement, (NamedArea) entity, removeListener, style);
                } else if (entity instanceof DeterminationEvent) {
-                       element = new DeterminationEventDetailElement(this, parentElement,
-                                       (DeterminationEvent) entity, removeListener, style);
-               } else if (entity instanceof Specimen) {
-                       element = new SpecimenCollectionDetailElement(this, parentElement,
-                                       (Specimen) entity, removeListener, style);
+            element = new DeterminationEventDetailElement(this, parentElement, (DeterminationEvent) entity,
+                    removeListener, style);
                } else if (entity instanceof User) {
-                       element = new MemberDetailElement(this, parentElement,
-                                       (User) entity, removeListener, style);
+            element = new MemberDetailElement(this, parentElement, (User) entity, removeListener, style);
                } else if (entity instanceof GrantedAuthority) {
-                       element = new GrantedAuthorityCollectionElement(this, parentElement,
-                                       (GrantedAuthorityImpl) entity, removeListener, style);
+            element = new GrantedAuthorityCollectionElement(this, parentElement, (GrantedAuthorityImpl) entity,
+                    removeListener, style);
                } else if (entity instanceof Group) {
-                       element = new GroupsByUserDetailElement(this, parentElement,
-                                       (Group) entity, removeListener, style);
+            element = new GroupsByUserDetailElement(this, parentElement, (Group) entity, removeListener, style);
                } else if (entity instanceof Taxon) {
-                       element = new TaxonDetailElement(this, parentElement,
-                                       (Taxon) entity, removeListener, style);
+            element = new TaxonDetailElement(this, parentElement, (Taxon) entity, removeListener, style);
                } else if (entity instanceof DescriptionElementBase) {
                        // this is the special case for protologs, maybe we can do this
                        // differently when API improves
                        DescriptionElementBase descriptionElement = (DescriptionElementBase) entity;
                        if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
-                               element = new ProtologueElement(this, parentElement,
-                                               descriptionElement, removeListener, style);
+                element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
                        }
                }
 
                if (element == null) {
-                       StoreUtil
-                                       .errorDialog(
-                                                       "No element for entity",
-                                                       this,
-                                                       "Could not generate element for entity. "
-                                                                       + "Looks like the case is not handled already. Check implementation. Entity: "
+            AbstractUtility.errorDialog("No element for entity", this,
+                    "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
                                                                        + entity, null);
 
                }
 
-               if (backgroundColor != null && !backgroundColor.isDisposed()) {
+        else if (backgroundColor != null && !backgroundColor.isDisposed()) {
                        element.setPersistentBackground(backgroundColor);
                }
 
@@ -2134,16 +2223,20 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         *      <strong>Selection elements not handled by this method:</strong>
         *      <ul>
-        *              <li>{@link TaxonNodeSelectionElement} see {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}</li>
-        *              <li>{@link NomenclaturalAuthorTeamSelectionElement} see {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}</li>
-        *      </ul>   
+     * <li>{@link TaxonNodeSelectionElement} see
+     * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
+     * </li>
+     * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
+     * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
+     * </li>
+        *      </ul>
         * </p>
-        * 
+        *
         * @param clazz
-        *                        a {@link Class} object of the type that you want the selection element to handle
+     *            a {@link Class} object of the type that you want the selection
+     *            element to handle
         * @param parentElement
-        *            a {@link ICdmFormElement}
-        *            object.
+     *            a {@link ICdmFormElement} object.
         * @param labelString
         *            a {@link String} object.
         * @param selectionType
@@ -2153,41 +2246,38 @@ public class CdmFormFactory extends FormToolkit {
         *            a int.
         * @param conversation
         *            a {@link ConversationHolder} object.
-        * @return a
-        *         {@link EntitySelectionElement}
-        *         object.
+     * @return a {@link EntitySelectionElement} object.
         */
-       public <T extends ICdmBase> EntitySelectionElement<T> createSelectionElement(
-                       Class<T> clazz, ConversationHolder conversation,
-                       ICdmFormElement parentElement, String labelString,
-                       T selection, int mode, int style) {
-               EntitySelectionElement<T> element = new EntitySelectionElement<T>(this, conversation, parentElement, clazz, labelString, selection, mode, style);
+    public <T extends ICdmBase> EntitySelectionElement<T> createSelectionElement(Class<T> clazz,
+            ConversationHolder conversation, ICdmFormElement parentElement, String labelString, T selection, int mode,
+            int style) {
+        EntitySelectionElement<T> element = new EntitySelectionElement<T>(this, conversation, parentElement, clazz,
+                labelString, selection, mode, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
-       
-       public TaxonNodeSelectionElement createTaxonNodeSelectionElement(
-                       ConversationHolder conversation,
-                       ICdmFormElement parentElement, String labelString,
-                       TaxonNode selection, int mode, int style) {
-               TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this, conversation, parentElement, labelString, selection, mode, style);
+
+    public TaxonNodeSelectionElement createTaxonNodeSelectionElement(ConversationHolder conversation,
+            ICdmFormElement parentElement, String labelString, TaxonNode selection, int mode, int style) {
+        TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this, conversation, parentElement,
+                labelString, selection, mode, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
-       
+
        public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
-                       ConversationHolder conversation,
-                       ICdmFormElement parentElement, String labelString,
-                       Team selection, int mode, int style) {
-               NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this, conversation, parentElement, labelString, selection, mode, style);
+            ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
+            int mode, int style) {
+        NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
+                conversation, parentElement, labelString, selection, mode, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
-       
-       
+
+
        /** {@inheritDoc} */
        public LabelElement createLabel(ICdmFormElement parentElement, String text) {
                LabelElement labelElement = new LabelElement(this, parentElement, text);
@@ -2200,7 +2290,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * Getter for the field <code>selectionProvider</code>.
         * </p>
-        * 
+        *
         * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         */
        public ISelectionProvider getSelectionProvider() {
@@ -2211,7 +2301,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createDetailedDescriptionDetailElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -2226,34 +2316,31 @@ public class CdmFormFactory extends FormToolkit {
         *         object.
         */
        public AbstractDetailedDescriptionDetailElement createDetailedDescriptionDetailElement(
-                       ICdmFormElement parentElement, DescriptionElementBase entity,
-                       int style) {
+            ICdmFormElement parentElement, DescriptionElementBase entity, int style) {
                AbstractDetailedDescriptionDetailElement detailedDescriptionElement = null;
 
                if (entity instanceof CategoricalData) {
-                       detailedDescriptionElement = new CategoricalDataDetailElement(this,
-                                       parentElement, (CategoricalData) entity, style);
+            detailedDescriptionElement = new CategoricalDataDetailElement(this, parentElement,
+                    (CategoricalData) entity, style);
                } else if (entity instanceof CommonTaxonName) {
-                       detailedDescriptionElement = new CommonNameDetailElement(this,
-                                       parentElement, (CommonTaxonName) entity, style);
+            detailedDescriptionElement = new CommonNameDetailElement(this, parentElement, (CommonTaxonName) entity,
+                    style);
                } else if (entity instanceof Distribution) {
-                       detailedDescriptionElement = new DistributionDetailElement(this,
-                                       parentElement, (Distribution) entity, style);
+            detailedDescriptionElement = new DistributionDetailElement(this, parentElement, (Distribution) entity,
+                    style);
                } else if (entity instanceof IndividualsAssociation) {
-                       detailedDescriptionElement = new IndividualsAssociationDetailElement(
-                                       this, parentElement, (IndividualsAssociation) entity, style);
+            detailedDescriptionElement = new IndividualsAssociationDetailElement(this, parentElement,
+                    (IndividualsAssociation) entity, style);
                } else if (entity instanceof QuantitativeData) {
-                       detailedDescriptionElement = new QuantitativeDataDetailElement(
-                                       this, parentElement, (QuantitativeData) entity, style);
+            detailedDescriptionElement = new QuantitativeDataDetailElement(this, parentElement,
+                    (QuantitativeData) entity, style);
                } else if (entity instanceof TaxonInteraction) {
-                       detailedDescriptionElement = new TaxonInteractionDetailElement(
-                                       this, parentElement, (TaxonInteraction) entity, style);
+            detailedDescriptionElement = new TaxonInteractionDetailElement(this, parentElement,
+                    (TaxonInteraction) entity, style);
                } else if (entity instanceof TextData) {
-                       detailedDescriptionElement = new TextDataDetailElement(this,
-                                       parentElement, (TextData) entity, style);
+            detailedDescriptionElement = new TextDataDetailElement(this, parentElement, (TextData) entity, style);
                } else {
-                       throw new IllegalStateException(
-                                       "There is no interface for the given description element");
+            throw new IllegalStateException("There is no interface for the given description element");
                }
                adapt(detailedDescriptionElement);
                parentElement.addElement(detailedDescriptionElement);
@@ -2263,7 +2350,7 @@ public class CdmFormFactory extends FormToolkit {
 
        /**
         * Creates a styled text as a part of the form.
-        * 
+        *
         * @param parent
         *            the text parent
         * @param value
@@ -2273,10 +2360,10 @@ public class CdmFormFactory extends FormToolkit {
         * @return the text widget
         */
        public StyledText createStyledText(Composite parent, String value, int style) {
-               StyledText text = new StyledText(parent, getBorderStyle() | style
-                               | getOrientation());
-               if (value != null)
+        StyledText text = new StyledText(parent, getBorderStyle() | style | getOrientation());
+        if (value != null) {
                        text.setText(value);
+        }
                text.setForeground(getColors().getForeground());
                text.setBackground(getColors().getBackground());
                // text.addFocusListener(visibilityHandler);