- formatted code
authorPatric Plitzner <p.plitzner@bgbm.org>
Mon, 27 May 2013 11:57:22 +0000 (11:57 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Mon, 27 May 2013 11:57:22 +0000 (11:57 +0000)
 - fixed warnings

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitFacadeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldObservationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java

index b245498e9ee82efbc0cfc3d715f0b7903c953434..0ebb936413cbe0c0b9ab0a2926da834ef3e8de86 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.element;
 
@@ -39,7 +39,7 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  * <p>
  * Abstract AbstractFormSection class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Feb 22, 2010
  * @version 1.0
@@ -53,7 +53,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        private ENTITY entity;
 
-       private Set<ICdmFormElement> elements = new HashSet<ICdmFormElement>();
+       private final Set<ICdmFormElement> elements = new HashSet<ICdmFormElement>();
 
        protected CdmFormFactory formFactory;
 
@@ -67,7 +67,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * Constructor for AbstractFormSection.
         * </p>
-        * 
+        *
         * @param conversation
         *            TODO
         * @param style
@@ -107,7 +107,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * Constructor for AbstractFormSection.
         * </p>
-        * 
+        *
         * @param formFactory
         *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
@@ -133,15 +133,17 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * Getter for the field <code>propertyChangeListeners</code>.
         * </p>
-        * 
+        *
         * @return a {@link java.util.Set} object.
         */
-       public List<IPropertyChangeListener> getPropertyChangeListeners() {
+       @Override
+    public List<IPropertyChangeListener> getPropertyChangeListeners() {
                return propertyChangeListeners;
        }
 
        /** {@inheritDoc} */
-       public void setPropertyChangeListeners(
+       @Override
+    public void setPropertyChangeListeners(
                        List<IPropertyChangeListener> propertyChangeListeners) {
                this.propertyChangeListeners = propertyChangeListeners;
        }
@@ -150,7 +152,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * Setter for the field <code>entity</code>.
         * </p>
-        * 
+        *
         * @param entity
         *            a ENTITY object.
         */
@@ -160,17 +162,18 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see eu.etaxonomy.taxeditor.forms.IEntityElement#getEntity()
         */
        /**
         * <p>
         * Getter for the field <code>entity</code>.
         * </p>
-        * 
+        *
         * @return a ENTITY object.
         */
-       public ENTITY getEntity() {
+       @Override
+    public ENTITY getEntity() {
                return entity;
        }
 
@@ -178,7 +181,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * getToggle
         * </p>
-        * 
+        *
         * @return a {@link org.eclipse.ui.forms.widgets.ToggleHyperlink} object.
         */
        public ToggleHyperlink getToggle() {
@@ -189,7 +192,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * getSection
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *         object.
         */
@@ -199,13 +202,14 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * eu.etaxonomy.taxeditor.forms.IPropertyChangeEmitter#firePropertyChangeEvent
         * ()
         */
        /** {@inheritDoc} */
-       public void firePropertyChangeEvent(CdmPropertyChangeEvent event) {
+       @Override
+    public void firePropertyChangeEvent(CdmPropertyChangeEvent event) {
                Assert.isNotNull(propertyChangeListeners,
                                "No property change listeners.");
                try {
@@ -221,7 +225,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        /**
         * Fires a {@link CdmPropertyChangeEvent} with the given object as source.
-        * 
+        *
         * @param object
         *            the object on which the property changed
         */
@@ -232,7 +236,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
        /**
         * Fires a {@link CdmPropertyChangeEvent} with the given object as source
         * also containing the originating event
-        * 
+        *
         * @param object
         *            the object on which the property changed
         * @param originatingEvent
@@ -246,7 +250,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.swt.widgets.Composite#setFocus()
         */
        /** {@inheritDoc} */
@@ -257,19 +261,20 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse
         * .jface.util.PropertyChangeEvent)
         */
        /** {@inheritDoc} */
-       public void propertyChange(PropertyChangeEvent event) {
+       @Override
+    public void propertyChange(PropertyChangeEvent event) {
                firePropertyChangeEvent(new CdmPropertyChangeEvent(this, event));
        }
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.swt.widgets.Control#setBackground(org.eclipse.swt.graphics
         * .Color)
@@ -283,24 +288,24 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
                getLayoutComposite().setBackground(color);
                super.setBackground(color);
        }
-       
+
        @Override
        public void setPersistentBackground(Color color) {
                persistentBackgroundColor = color;
                setBackground(color);
        }
-       
+
        @Override
        public Color getPersistentBackground() {
                return persistentBackgroundColor;
        }
-       
+
 
        /**
         * <p>
         * widgetSelected
         * </p>
-        * 
+        *
         * @param e
         *            a {@link org.eclipse.swt.events.SelectionEvent} object.
         */
@@ -335,7 +340,8 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
        }
 
        /** {@inheritDoc} */
-       public void setSelected(boolean selected) {
+       @Override
+    public void setSelected(boolean selected) {
                if (selected) {
                        setBackground(Display.getCurrent().getSystemColor(
                                        SWT.COLOR_LIST_SELECTION));
@@ -345,7 +351,8 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
        }
 
        /** {@inheritDoc} */
-       public void selectionChanged(SelectionChangedEvent event) {
+       @Override
+    public void selectionChanged(SelectionChangedEvent event) {
                if (event.getSelection() == CdmFormFactory.EMPTY_SELECTION) {
                        return;
                }
@@ -365,7 +372,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * addSelectionListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         */
@@ -377,7 +384,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * removeSelectionListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         */
@@ -386,7 +393,8 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
        }
 
        /** {@inheritDoc} */
-       public void addElement(ICdmFormElement element) {
+       @Override
+    public void addElement(ICdmFormElement element) {
                elements.add(element);
        }
 
@@ -394,7 +402,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * removeElement
         * </p>
-        * 
+        *
         * @param element
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -408,7 +416,8 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * removeElements
         * </p>
         */
-       public void removeElements() {
+       @Override
+    public void removeElements() {
                for (ICdmFormElement childElement : getElements()) {
                        // recursion
                        childElement.removeElements();
@@ -447,10 +456,11 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * Getter for the field <code>parentElement</code>.
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
-       public ICdmFormElement getParentElement() {
+       @Override
+    public ICdmFormElement getParentElement() {
                return parentElement;
        }
 
@@ -458,10 +468,11 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * Getter for the field <code>elements</code>.
         * </p>
-        * 
+        *
         * @return a {@link java.util.Set} object.
         */
-       public Set<ICdmFormElement> getElements() {
+       @Override
+    public Set<ICdmFormElement> getElements() {
                return elements;
        }
 
@@ -469,10 +480,11 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * getControls
         * </p>
-        * 
+        *
         * @return a {@link java.util.Set} object.
         */
-       public Set<Control> getControls() {
+       @Override
+    public Set<Control> getControls() {
                Set<Control> controls = new HashSet<Control>();
 
                for (Control control : getChildren()) {
@@ -493,15 +505,17 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * getLayoutComposite
         * </p>
-        * 
+        *
         * @return a {@link org.eclipse.swt.widgets.Composite} object.
         */
-       public Composite getLayoutComposite() {
+       @Override
+    public Composite getLayoutComposite() {
                return (Composite) getClient();
        }
 
        /** {@inheritDoc} */
-       public boolean containsFormElement(ICdmFormElement formElement) {
+       @Override
+    public boolean containsFormElement(ICdmFormElement formElement) {
                if (formElement == this) {
                        return true;
                } else {
@@ -519,7 +533,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * Getter for the field <code>formFactory</code>.
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         */
        public CdmFormFactory getFormFactory() {
@@ -528,7 +542,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see eu.etaxonomy.taxeditor.forms.ICdmFormElement#refresh()
         */
        /**
@@ -536,7 +550,8 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * refresh
         * </p>
         */
-       public void refresh() {
+       @Override
+    public void refresh() {
                // empty default implementation
 
        }
@@ -545,13 +560,14 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * <p>
         * getConversationHolder
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
         *         object.
         */
-       public ConversationHolder getConversationHolder() {
+       @Override
+    public ConversationHolder getConversationHolder() {
                if(getParentElement() instanceof RootElement || getParentElement() == null){
-               
+
                        IEditorPart activeEditor = StoreUtil.getActiveEditor();
                        if(activeEditor instanceof IConversationEnabled){
                                ConversationHolder conversation = ((IConversationEnabled) StoreUtil.getActiveEditor()).getConversationHolder();
@@ -560,15 +576,16 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
                }else if(getParentElement() instanceof IConversationEnabled){
                        return ((IConversationEnabled) getParentElement()).getConversationHolder();
                }
-               StoreUtil.errorDialog("Could not get conversation for AbstractFormSection", 
-                               getClass(), "There is an error in the implementation. There should have been an active editor but it wasn't", 
+               StoreUtil.errorDialog("Could not get conversation for AbstractFormSection",
+                               getClass(), "There is an error in the implementation. There should have been an active editor but it wasn't",
                                new IllegalArgumentException());
                return null;
-       
+
        }
 
        /** {@inheritDoc} */
-       public void update(CdmDataChangeMap changeEvents) {
+       @Override
+    public void update(CdmDataChangeMap changeEvents) {
        }
 
 
index 068c03b9e3a5150e0e11f6c5fb448b66944a9605..9460de11cf1a6f79db4e1101261d1f93361889ab 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.element;
 
@@ -255,7 +255,7 @@ import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
  * <p>
  * CdmFormFactory class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Feb 24, 2010
  * @version 1.0
@@ -280,9 +280,9 @@ public class CdmFormFactory extends FormToolkit {
                        return true;
                }
        };
-       
+
        /**
-        * 
+        *
         * @author n.hoffmann
         * @date Jan 25, 2010
         *
@@ -295,7 +295,7 @@ public class CdmFormFactory extends FormToolkit {
        }
 
        /**
-        * 
+        *
         * @author n.hoffmann
         * @date Jan 25, 2010
         *
@@ -321,7 +321,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 +337,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * Constructor for CdmFormFactory.
         * </p>
-        * 
+        *
         * @param display
         *            a {@link org.eclipse.swt.widgets.Display} object.
         */
@@ -347,7 +347,7 @@ public class CdmFormFactory extends FormToolkit {
        }
 
        /**
-        * 
+        *
         */
        private void init() {
                boldFontHolder2 = new BoldFontHolder2();
@@ -357,10 +357,10 @@ 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.
@@ -381,7 +381,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * destroySelectionArbitrator
         * </p>
-        * 
+        *
         * @param selectionArbitrator
         *            a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
         *            object.
@@ -409,9 +409,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 +435,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * destroyElement
         * </p>
-        * 
+        *
         * @param formElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -476,7 +477,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 +490,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createMultilineTextWithLabel
         * </p>
-        * 
+        *
         * @param labelString
         *            a {@link java.lang.String} object.
         * @param textHeight
@@ -516,7 +517,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createMultiLanguageTextElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -558,7 +559,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTextWithLabelElement
         * </p>
-        * 
+        *
         * @param labelString
         *            a {@link java.lang.String} object.
         * @param initialText
@@ -609,7 +610,7 @@ public class CdmFormFactory extends FormToolkit {
        }
 
        /**
-        * 
+        *
         * @param parentElement
         * @param labelString
         * @param conversationEnabled
@@ -631,7 +632,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createIntegerTextWithLabelElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -658,7 +659,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createFloatTextWithLabelElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -685,7 +686,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createLanguageStringWithLabelElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -713,7 +714,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createLanguageStringWithLabelElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -743,7 +744,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTextElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -767,7 +768,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createKeyValueViewerElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -794,7 +795,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTermComboElement
         * </p>
-        * 
+        *
         * @param termComboType
         *            a
         *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
@@ -812,7 +813,7 @@ 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) {
@@ -826,7 +827,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEnumComboElement
         * </p>
-        * 
+        *
         * @param enumComboType
         *            a
         *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
@@ -852,7 +853,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createBrowserElement
         * </p>
-        * 
+        *
         * @param imageUri
         *            a {@link java.net.URI} object.
         * @param style
@@ -875,7 +876,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createImageElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -898,7 +899,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTextActionElement
         * </p>
-        * 
+        *
         * @param labelString
         *            a {@link java.lang.String} object.
         * @param initialText
@@ -927,7 +928,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createCheckbox
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -950,7 +951,7 @@ 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}
@@ -1025,7 +1026,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createToggleableTextField
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1055,7 +1056,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createTimePeriodElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1082,7 +1083,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createPointElement
         * </p>
-        * 
+        *
         * @param style
         *            a int.
         * @param parentElement
@@ -1105,7 +1106,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createDateDetailSection
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1127,7 +1128,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createPartialElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1152,7 +1153,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * addSelectionListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         */
@@ -1164,7 +1165,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * removeSelectionListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         */
@@ -1183,7 +1184,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * addPropertyChangeListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
         *            object.
@@ -1199,7 +1200,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * removePropertyChangeListener
         * </p>
-        * 
+        *
         * @param listener
         *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
         *            object.
@@ -1212,7 +1213,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createHorizontalSeparator
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1232,7 +1233,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createVersionElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1253,7 +1254,7 @@ public class CdmFormFactory extends FormToolkit {
                parentElement.addElement(element);
                return element;
        }
-       
+
        /**
         * @param cdmBaseSection
         * @param object
@@ -1274,7 +1275,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createVersionSection
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1291,7 +1292,7 @@ public class CdmFormFactory extends FormToolkit {
                adapt(section);
                return section;
        }
-       
+
        /**
         * @param parent
         * @param i
@@ -1308,7 +1309,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEmptyElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1326,7 +1327,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createHeadlineSection
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1346,7 +1347,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createParsingMessageElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1372,61 +1373,61 @@ public class CdmFormFactory extends FormToolkit {
        // SIMPLIFY
 
        /**
-        * 
+        *
         */
        public static enum DetailType {
-               AUTHORSHIP, 
-               CLASSIFICATION, 
-               COLLECTION, 
-               DERIVED_UNIT, 
-               DERIVED_UNIT_FACADE, 
-               DERIVED_UNIT_GENERAL, 
-               DESCRIPTION, 
-               DESCRIPTIONELEMENT, 
-               DETERMINATION, 
-               FEATURE_DISTRIBUTION, 
-               FIELD_OBSERVATION, 
-               GATHERING_EVENT, 
+               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, 
+               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
@@ -1437,14 +1438,14 @@ public class CdmFormFactory extends FormToolkit {
                        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;
@@ -1454,7 +1455,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createCdmDetailSection
         * </p>
-        * 
+        *
         * @param detailType
         *            a
         *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
@@ -1595,19 +1596,19 @@ public class CdmFormFactory extends FormToolkit {
                                        selectionProvider, style);
                        break;
                case TAXON_RELATIONSHIP:
-                       section = new TaxonRelationshipDetailSection(this, conversation, parentElement, 
+                       section = new TaxonRelationshipDetailSection(this, conversation, parentElement,
                                        selectionProvider, style);
                        break;
                case REFERENCED_ENTITY:
-                       section = new ReferencedEntityDetailSection(this, conversation, parentElement, 
+                       section = new ReferencedEntityDetailSection(this, conversation, parentElement,
                                        selectionProvider, style);
                        break;
                case TERM_VOCABULARY:
-                       section = new TermVocabularyDetailSection(this, conversation, parentElement, 
+                       section = new TermVocabularyDetailSection(this, conversation, parentElement,
                                        selectionProvider, style);
                        break;
                case NAMED_AREA:
-                       section = new NamedAreaDetailSection(this, conversation, parentElement, 
+                       section = new NamedAreaDetailSection(this, conversation, parentElement,
                                        selectionProvider, style);
                        break;
                case USE_RECORD:
@@ -1615,7 +1616,7 @@ public class CdmFormFactory extends FormToolkit {
                                        selectionProvider, style);
                        break;
                }
-               
+
 
                if (section == null) {
                        throw new RuntimeException(
@@ -1627,13 +1628,13 @@ public class CdmFormFactory extends FormToolkit {
                return section;
        }
 
-       
-       
+
+
        /**
         * <p>
         * createCdmDetailElement
         * </p>
-        * 
+        *
         * @param detailType
         *            a
         *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
@@ -1772,46 +1773,46 @@ public class CdmFormFactory extends FormToolkit {
        }
 
        /**
-        * 
+        *
         * @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, 
+               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
        }
 
@@ -1819,7 +1820,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEntityDetailSection
         * </p>
-        * 
+        *
         * @param entityDetailType
         *            a
         *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType}
@@ -1835,13 +1836,12 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *         object.
         */
-       public AbstractFormSection createEntityDetailSection(
-                       EntityDetailType entityDetailType, ConversationHolder conversation,
-                       ICdmFormElement parentElement, int style) {
+       public AbstractFormSection createEntityDetailSection(EntityDetailType entityDetailType, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
                AbstractFormSection section = null;
 
                switch (entityDetailType) {
                case TEAM:
+                   //TODO this is not an AbstractEntityCollectionSection
                        section = new TeamDetailSection(this, conversation, parentElement,
                                        null, style);
                        break;
@@ -1985,7 +1985,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createEntityCollectionElement
         * </p>
-        * 
+        *
         * @param removeListener
         *            a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style
@@ -2034,8 +2034,8 @@ public class CdmFormFactory extends FormToolkit {
                        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);
@@ -2136,9 +2136,9 @@ public class CdmFormFactory extends FormToolkit {
         *      <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>   
+        *      </ul>
         * </p>
-        * 
+        *
         * @param clazz
         *                        a {@link Class} object of the type that you want the selection element to handle
         * @param parentElement
@@ -2166,7 +2166,7 @@ public class CdmFormFactory extends FormToolkit {
                parentElement.addElement(element);
                return element;
        }
-       
+
        public TaxonNodeSelectionElement createTaxonNodeSelectionElement(
                        ConversationHolder conversation,
                        ICdmFormElement parentElement, String labelString,
@@ -2176,7 +2176,7 @@ public class CdmFormFactory extends FormToolkit {
                parentElement.addElement(element);
                return element;
        }
-       
+
        public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
                        ConversationHolder conversation,
                        ICdmFormElement parentElement, String labelString,
@@ -2186,8 +2186,8 @@ public class CdmFormFactory extends FormToolkit {
                parentElement.addElement(element);
                return element;
        }
-       
-       
+
+
        /** {@inheritDoc} */
        public LabelElement createLabel(ICdmFormElement parentElement, String text) {
                LabelElement labelElement = new LabelElement(this, parentElement, text);
@@ -2200,7 +2200,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 +2211,7 @@ public class CdmFormFactory extends FormToolkit {
         * <p>
         * createDetailedDescriptionDetailElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -2263,7 +2263,7 @@ public class CdmFormFactory extends FormToolkit {
 
        /**
         * Creates a styled text as a part of the form.
-        * 
+        *
         * @param parent
         *            the text parent
         * @param value
@@ -2275,8 +2275,9 @@ public class CdmFormFactory extends FormToolkit {
        public StyledText createStyledText(Composite parent, String value, int style) {
                StyledText text = new StyledText(parent, getBorderStyle() | style
                                | getOrientation());
-               if (value != null)
-                       text.setText(value);
+               if (value != null) {
+            text.setText(value);
+        }
                text.setForeground(getColors().getForeground());
                text.setBackground(getColors().getBackground());
                // text.addFocusListener(visibilityHandler);
index 937ee2113f1ce93f8dd64e40613ef5acab178ddc..3997d2af3390a13e7b3ebd7720d58eedd9386f8e 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -32,7 +32,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @version 1.0
  */
 public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<DerivedUnitBase> {
-       
+
        private DerivedUnitFacade facade;
 
        private DerivedUnitFacadeConfigurator configurator;
@@ -55,24 +55,24 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
                configurator.setMoveDerivedUnitMediaToGallery(true);
                configurator.setMoveFieldObjectMediaToGallery(true);
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public void setEntity(DerivedUnitBase entity) {
                super.setEntity(entity);
                try {
                        facade = DerivedUnitFacade.NewInstance(entity, configurator);
-                       
+
                        section_general.setEntity(facade);
                        section_derivedUnitBase.setEntity(facade);
                        section_gatheringEvent.setEntity(facade);
                        section_fieldObservation.setEntity(facade);
-                       
+
                } catch (DerivedUnitFacadeNotSupportedException e) {
                        StoreUtil.errorDialog("Error", this, "SpecimenFacadeNotSupportedException while inititating SpecimenFacade", e);
                }
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public void removeElements() {
@@ -98,13 +98,13 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
                        section_fieldObservation = null;
                }
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public DerivedUnitBase getEntity() {
                throw new IllegalArgumentException("Should not be called");
        }
-       
+
        /**
         * <p>Getter for the field <code>facade</code>.</p>
         *
@@ -113,27 +113,27 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
        public DerivedUnitFacade getFacade(){
                return facade;
        }
-       
+
        /** {@inheritDoc} */
        @Override
        protected void createControls(ICdmFormElement formElement,
                        DerivedUnitBase entity, int style) {
-               
+
                section_general = (GeneralDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT_GENERAL, getConversationHolder(), formElement, null, Section.TWISTIE | Section.EXPANDED);
                section_general.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_general);
                addElement(section_general);
-               
+
                section_gatheringEvent = (GatheringEventDetailSection) formFactory.createCdmDetailSection(DetailType.GATHERING_EVENT, getConversationHolder(), formElement, null, Section.TWISTIE);
                section_gatheringEvent.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_gatheringEvent);
                addElement(section_gatheringEvent);
-               
+
                section_fieldObservation = (FieldObservationDetailSection) formFactory.createCdmDetailSection(DetailType.FIELD_OBSERVATION, getConversationHolder(), formElement, null, Section.TWISTIE);
                section_fieldObservation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_fieldObservation);
                addElement(section_fieldObservation);
-               
+
                section_derivedUnitBase = (DerivedUnitBaseDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT, getConversationHolder(), formElement, null, Section.TWISTIE);
                section_derivedUnitBase.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_derivedUnitBase);
@@ -144,8 +144,9 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
        @Override
        public void handleEvent(Object eventSource) {
                if(eventSource == section_derivedUnitBase || eventSource == section_gatheringEvent || eventSource == section_fieldObservation){
-                       if(getParentElement() instanceof AbstractCdmDetailSection)
-                               ((AbstractCdmDetailSection) getParentElement()).updateTitle();
+                       if(getParentElement() instanceof AbstractCdmDetailSection) {
+                ((AbstractCdmDetailSection) getParentElement()).updateTitle();
+            }
                }
        }
 }
index d2467e24a2edfa641e2386847ef15940acb61b09..5a1fc39fa2b3c54c207d65b049a5c5e1b5bcd6f3 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.cdm.model.description.Sex;
-import eu.etaxonomy.cdm.model.description.Stage;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
@@ -29,7 +26,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  * @version 1.0
  */
 public class FieldObservationDetailElement extends AbstractCdmDetailElement<DerivedUnitFacade> {
-       
+
        private TextWithLabelElement text_ecology;
 
        private TextWithLabelElement text_plantDescription;
@@ -40,10 +37,10 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
 
        private NumberWithLabelElement number_individualCount;
 
-       private TermComboElement<Sex> combo_sex;
+//     private TermComboElement<Sex> combo_sex;
+//
+//     private TermComboElement<Stage> combo_lifeStage;
 
-       private TermComboElement<Stage> combo_lifeStage;
-       
        /**
         * <p>Constructor for FieldObservationDetailElement.</p>
         *
@@ -54,7 +51,7 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
                        ICdmFormElement formElement) {
                super(formFactory, formElement);
        }
-               
+
        /** {@inheritDoc} */
        @Override
        protected void createControls(ICdmFormElement formElement,
@@ -64,10 +61,10 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
                // Disable for now
 //             text_fieldObjectDefinition = formFactory.createTextWithLabelElement(formElement, "Field Object Definition", entity.getFieldObjectDefinition(CdmStore.getDefaultLanguage()), style);
                text_fieldNotes = formFactory.createTextWithLabelElement(formElement, "Field Notes", entity.getFieldNotes(), style);
-               
+
                number_individualCount = formFactory.createIntegerTextWithLabelElement(formElement, "Individual Count", entity.getIndividualCount(), style);
-               combo_lifeStage = formFactory.createTermComboElement(Stage.class, formElement, "Life Stage", entity.getLifeStage(), style);
-               combo_sex = formFactory.createTermComboElement(Sex.class, formElement, "Sex", entity.getSex(), style);
+//             combo_lifeStage = formFactory.createTermComboElement(Stage.class, formElement, "Life Stage", entity.getLifeStage(), style);
+//             combo_sex = formFactory.createTermComboElement(Sex.class, formElement, "Sex", entity.getSex(), style);
        }
 
        /** {@inheritDoc} */
@@ -88,11 +85,11 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
                else if(eventSource == number_individualCount){
                        getEntity().setIndividualCount(number_individualCount.getInteger());
                }
-               else if(eventSource == combo_lifeStage){
-                       getEntity().setLifeStage(combo_lifeStage.getSelection());
-               }
-               else if(eventSource == combo_sex){
-                       getEntity().setSex(combo_sex.getSelection());
-               }
+//             else if(eventSource == combo_lifeStage){
+//                     getEntity().setLifeStage(combo_lifeStage.getSelection());
+//             }
+//             else if(eventSource == combo_sex){
+//                     getEntity().setSex(combo_sex.getSelection());
+//             }
        }
 }
index 38eabcf2ea28696c934bef3911a361504d53d177..0a4d04a81e661e8e5023df6591b06904dcf16bf5 100644 (file)
@@ -1,20 +1,20 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
 package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
-import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.preference.Resources;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -27,7 +27,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  * <p>
  * GatheringEventDetailElement class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Jun 24, 2010
  * @version 1.0
@@ -55,7 +55,7 @@ public class GatheringEventDetailElement extends
         * <p>
         * Constructor for GatheringEventDetailElement.
         * </p>
-        * 
+        *
         * @param formFactory
         *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
@@ -68,49 +68,33 @@ public class GatheringEventDetailElement extends
                super(formFactory, formElement);
        }
 
-       /** {@inheritDoc} */
-       @Override
-       protected void createControls(ICdmFormElement formElement,
-                       DerivedUnitFacade entity, int style) {
-               // collectingArea
-               number_absoluteElevationError = formFactory
-                               .createIntegerTextWithLabelElement(formElement,
-                                               "Elevation Error", entity.getAbsoluteElevationError(),
-                                               style);
-               number_absoluteElevationMinimum = formFactory
-                               .createIntegerTextWithLabelElement(formElement,
-                                               "Elevation Minimum (m)",
-                                               entity.getAbsoluteElevationMinimum(), style);
-               number_absoluteElevationMaximum = formFactory
-                               .createIntegerTextWithLabelElement(formElement,
-                                               "Elevation Maximum (m)",
-                                               entity.getAbsoluteElevationMaximum(), style);
-
-               text_collectingMethod = formFactory.createTextWithLabelElement(
-                               formElement, "Collecting Method", entity.getCollectingMethod(),
-                               style);
-
-               number_distanceToGround = formFactory
-                               .createIntegerTextWithLabelElement(formElement,
-                                               "Distance To Ground (m)", entity.getDistanceToGround(),
-                                               style);
-               number_distanceToWaterSurface = formFactory
-                               .createIntegerTextWithLabelElement(formElement,
-                                               "Distance To Water Surface (m)",
-                                               entity.getDistanceToWaterSurface(), style);
-               // exactLocation
-               text_gatheringEventDescription = formFactory
-                               .createTextWithLabelElement(formElement,
-                                               "Gathering Event Description",
-                                               entity.getGatheringEventDescription(), style);
-
-               section_collectingAreas = (CollectingAreasDetailSection) formFactory
-                               .createEntityDetailSection(EntityDetailType.COLLECTING_AREA,
-                                               getConversationHolder(), formElement, Section.TWISTIE);
-               section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(
-                               2, 1));
-               section_collectingAreas.setEntity(entity);
-       }
+    /** {@inheritDoc} */
+    @Override
+    protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
+        // collectingArea
+        number_absoluteElevationError = formFactory.createIntegerTextWithLabelElement(
+                formElement, "Elevation Error", entity.getAbsoluteElevationError(), style);
+        number_absoluteElevationMinimum = formFactory.createIntegerTextWithLabelElement(
+                formElement, "Elevation Minimum (m)", entity.getAbsoluteElevationMinimum(), style);
+        number_absoluteElevationMaximum = formFactory.createIntegerTextWithLabelElement(
+                formElement, "Elevation Maximum (m)", entity.getAbsoluteElevationMaximum(), style);
+
+        text_collectingMethod = formFactory.createTextWithLabelElement(
+                formElement, "Collecting Method", entity.getCollectingMethod(), style);
+
+        number_distanceToGround = formFactory.createIntegerTextWithLabelElement(
+                formElement, "Distance To Ground (m)", entity.getDistanceToGround(), style);
+        number_distanceToWaterSurface = formFactory.createIntegerTextWithLabelElement(
+                formElement, "Distance To Water Surface (m)", entity.getDistanceToWaterSurface(), style);
+        // exactLocation
+        text_gatheringEventDescription = formFactory.createTextWithLabelElement(
+                formElement, "Gathering Event Description", entity.getGatheringEventDescription(), style);
+
+        section_collectingAreas = (CollectingAreasDetailSection) formFactory.createEntityDetailSection(
+                EntityDetailType.COLLECTING_AREA, getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+        section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+        section_collectingAreas.setEntity(entity);
+    }
 
        /** {@inheritDoc} */
        @Override
@@ -128,7 +112,7 @@ public class GatheringEventDetailElement extends
                        } catch (IllegalArgumentException e) {
                                number_absoluteElevationMinimum
                                                .setBackground(getColor(Resources.COLOR_PARSE_ERROR));
-                               StoreUtil.warn(getClass(), e.getLocalizedMessage());
+                               AbstractUtility.warn(getClass(), e.getLocalizedMessage());
                        }
                } else if (eventSource == number_absoluteElevationMaximum) {
                        try {
@@ -140,7 +124,7 @@ public class GatheringEventDetailElement extends
                        } catch (IllegalArgumentException e) {
                                number_absoluteElevationMaximum
                                                .setBackground(getColor(Resources.COLOR_PARSE_ERROR));
-                               StoreUtil.warn(getClass(), e.getLocalizedMessage());
+                               AbstractUtility.warn(getClass(), e.getLocalizedMessage());
                        }
                } else if (eventSource == text_collectingMethod) {
                        getEntity().setCollectingMethod(text_collectingMethod.getText());
index 30f43dd00f4dad403647906fbbcb280a36ee594c..8ad6526234531b9d62eea3b6f0c9c761d7ee8a9b 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -14,7 +14,6 @@ import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.cdm.model.occurrence.Collection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
@@ -43,8 +42,8 @@ public class GeneralDetailElement extends
        private TimePeriodElement element_date;
        private EntitySelectionElement<AgentBase> selection_collector;
        private TextWithLabelElement text_collectingNumber;
-       private EntitySelectionElement<Collection> selection_collection;
-       private TextWithLabelElement text_accessionNumber;
+//     private EntitySelectionElement<Collection> selection_collection;
+//     private TextWithLabelElement text_accessionNumber;
 
        /**
         * @param formFactory
@@ -57,7 +56,7 @@ public class GeneralDetailElement extends
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
         * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
@@ -74,7 +73,7 @@ public class GeneralDetailElement extends
                                entity.getCountry(), EntitySelectionElement.NOTHING, style);
                languageText_locality = formFactory
                                .createLanguageStringWithLabelElement(formElement, "Locality",
-                                               entity.getLocality(), style);           
+                                               entity.getLocality(), style);
                element_point = formFactory.createPointElement(formElement,
                                entity.getExactLocation(), style);
                number_elevation = formFactory.createIntegerTextWithLabelElement(
@@ -89,20 +88,20 @@ public class GeneralDetailElement extends
                                                style);
                text_collectingNumber = formFactory.createTextWithLabelElement(formElement,
                                "Collecting number", entity.getFieldNumber(), style);
-               selection_collection = formFactory
-                               .createSelectionElement(Collection.class,
-                                               getConversationHolder(), formElement, "Collection",
-                                               entity.getCollection(),
-                                               EntitySelectionElement.ALL, style);
-               text_accessionNumber = formFactory.createTextWithLabelElement(
-                               formElement, "Accession Number", entity.getAccessionNumber(),
-                               style);
-               
+//             selection_collection = formFactory
+//                             .createSelectionElement(Collection.class,
+//                                             getConversationHolder(), formElement, "Collection",
+//                                             entity.getCollection(),
+//                                             EntitySelectionElement.ALL, style);
+//             text_accessionNumber = formFactory.createTextWithLabelElement(
+//                             formElement, "Accession Number", entity.getAccessionNumber(),
+//                             style);
+
        }
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
         * .lang.Object)
@@ -127,11 +126,12 @@ public class GeneralDetailElement extends
                        getEntity().setCollector(selection_collector.getSelection());
                } else if (eventSource == text_collectingNumber) {
                        getEntity().setFieldNumber(text_collectingNumber.getText());
-               } else if (eventSource == selection_collection) {
-                       getEntity().setCollection(selection_collection.getSelection());
-               } else if (eventSource == text_accessionNumber) {
-                       getEntity().setAccessionNumber(text_accessionNumber.getText());
                }
+//               else if (eventSource == selection_collection) {
+//                     getEntity().setCollection(selection_collection.getSelection());
+//             } else if (eventSource == text_accessionNumber) {
+//                     getEntity().setAccessionNumber(text_accessionNumber.getText());
+//             }
 
                if (eventSource != toggleableText_titleCache) {
                        toggleableText_titleCache.setText(getEntity().getTitleCache());
index 2a019c07d46fd032af85d7ac9a7724c73bfc5384..57cb798855860ffd4ba5adf4329fbd317353866d 100644 (file)
@@ -1,16 +1,15 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.view;
 
-import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Composite;
@@ -36,23 +35,24 @@ import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
  * @created Feb 9, 2010
  * @version 1.0
  */
-public abstract class AbstractCdmDataViewer extends Viewer implements ISelectionProvider, IConversationEnabled{
-       
+public abstract class AbstractCdmDataViewer extends Viewer implements IConversationEnabled{
+
        protected ManagedForm managedForm;
 
        protected CdmFormFactory formFactory;
 
        protected ScrolledForm scrolledForm;
-       
-       private Composite body;
-       
+
+       private final Composite body;
+
        protected RootElement rootElement;
 
+       //TODO: create a super class for this?
        private Object input;
 
-       private AbstractCdmViewPart viewPart;
+       private final AbstractCdmViewPart viewPart;
+
 
-       
        /**
         * <p>Constructor for AbstractCdmDataViewer.</p>
         *
@@ -61,9 +61,9 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
         */
        public AbstractCdmDataViewer(Composite parent, AbstractCdmViewPart viewPart) {
                this.viewPart = viewPart;
-               
+
                managedForm = new ManagedForm(parent){
-                       
+
                        /* (non-Javadoc)
                         * @see org.eclipse.ui.forms.ManagedForm#dirtyStateChanged()
                         */
@@ -72,18 +72,18 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
                                markViewPartDirty();
                        }
                };
-               
+
                createFormFactory();
-               
+
                scrolledForm = managedForm.getForm();
-               
+
                body = scrolledForm.getBody();
-               
+
                body.setLayout(LayoutConstants.LAYOUT());
-               
+
                rootElement = new RootElement(formFactory, body);
        }
-       
+
        /**
         * <p>createFormFactory</p>
         */
@@ -98,8 +98,8 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
        protected void markViewPartDirty(){
                viewPart.changed(input);
        }
-       
-       
+
+
        /**
         * @return
         */
@@ -116,22 +116,22 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
                for(Control child : body.getChildren()){
                        return child;
                }
-               
+
                return body;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.viewers.Viewer#setInput(java.lang.Object)
         */
        /** {@inheritDoc} */
        @Override
        public void setInput(Object input) {
-               this.input = input;     
+               this.input = input;
                // reset selection
                setSelection(new StructuredSelection(input));
                refresh();
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.viewers.Viewer#getInput()
         */
@@ -140,7 +140,7 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
        public Object getInput() {
                return input;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.viewers.Viewer#refresh()
         */
@@ -148,51 +148,51 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
        @Override
        public void refresh() {
                showParts();
-               
+
                managedForm.setInput(input);
-               
+
                managedForm.refresh();
-               
+
                managedForm.reflow(true);
        }
 
-       
+
        /**
         * <p>layout</p>
         */
        public void layout(){
                body.layout();
        }
-       
+
        /**
         * <p>showParts</p>
         */
        protected abstract void showParts();
-       
-       
+
+
        /**
         * <p>destroySections</p>
         */
-       protected void destroySections() {      
+       protected void destroySections() {
                for (IFormPart formPart : managedForm.getParts()){
                        removePart((CdmSectionPart) formPart);
-               }       
-               
+               }
+
                managedForm.setInput(null);
-                               
+
                formFactory.destroyElement(rootElement);
-               
+
                createFormFactory();
-               
+
                rootElement = new RootElement(formFactory, body);
-               
+
                for(Control control : body.getChildren()){
                        control.dispose();
                        control = null;
                }
        }
-       
-       
+
+
        /**
         * <p>setFocus</p>
         */
@@ -205,14 +205,14 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
                        break;
                }
        }
-       
+
        /**
         * <p>reflow</p>
         */
        public void reflow(){
                managedForm.reflow(true);
        }
-       
+
        /**
         * <p>removePart</p>
         *
@@ -222,7 +222,7 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
                managedForm.removePart(sectionPart);
                formFactory.removePropertyChangeListener(sectionPart);
        }
-       
+
        /**
         * <p>addPart</p>
         *
@@ -233,17 +233,19 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
                managedForm.addPart(sectionPart);
                formFactory.addPropertyChangeListener(sectionPart);
        }
-       
+
        /**
         * <p>getConversationHolder</p>
         *
         * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
-       public ConversationHolder getConversationHolder() {
+       @Override
+    public ConversationHolder getConversationHolder() {
                return viewPart.getConversationHolder();
        }
-       
+
        /** {@inheritDoc} */
-       public void update(CdmDataChangeMap changeEvents) {}
+       @Override
+    public void update(CdmDataChangeMap changeEvents) {}
 
 }
index ac6c878be3a20cdd17b5210896b75f73acb0a7d4..169895ef5a42a8f221fa085fb84dd447937763b7 100644 (file)
@@ -2,9 +2,9 @@
 // $Id$
 /**
  * Copyright (C) 2011 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
@@ -39,16 +39,17 @@ import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
+import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
+import eu.etaxonomy.cdm.model.occurrence.Specimen;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-
 import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
@@ -70,10 +71,8 @@ import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSectio
 import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.key.GeographicalScopeDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
 import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
@@ -101,7 +100,7 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
  * <p>
  * DetailsViewer class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Feb 12, 2010
  * @version 1.0
@@ -114,7 +113,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         * <p>
         * Constructor for DetailsViewer.
         * </p>
-        * 
+        *
         * @param parent
         *            a {@link org.eclipse.swt.widgets.Composite} object.
         * @param viewPart
@@ -132,7 +131,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
         * .lang.Object)
@@ -141,10 +140,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
        public void setInput(Object input) {
                if (input instanceof DerivedUnitBase) {
                        try {
-                               input = DerivedUnitFacade.NewInstance((DerivedUnitBase) input,
-                                               PreferencesUtil.getDerivedUnitConfigurator());
+                               input = DerivedUnitFacade.NewInstance((DerivedUnitBase) input, PreferencesUtil.getDerivedUnitConfigurator());
                        } catch (DerivedUnitFacadeNotSupportedException e) {
-                               StoreUtil.error(getClass(), e);
+                               AbstractUtility.error(getClass(), e);
                        }
                }
                super.setInput(input);
@@ -164,7 +162,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.jface.viewers.Viewer#refresh()
         */
        /** {@inheritDoc} */
@@ -174,26 +172,27 @@ public class DetailsViewer extends AbstractCdmDataViewer {
            // Too much type checking to decide which detail view to display.
            // Need to build in a mechanism where navigators / editors are 'aware'
            // of the corresponding detail viewer.
-               if (getInput() instanceof TaxonBase) {
+               Object input = getInput();
+        if (input instanceof TaxonBase) {
                        createTaxonSections(rootElement);
 
-               } else if (getInput() instanceof NonViralName) {
+               } else if (input instanceof NonViralName) {
                        createNameSections(rootElement);
 
-               } else if (getInput() instanceof Reference) {
+               } else if (input instanceof Reference) {
                        createReferenceSections(rootElement);
 
-               } else if (getInput() instanceof Team) {
+               } else if (input instanceof Team) {
                        createTeamDetailSection(rootElement);
 
-               } else if (getInput() instanceof Person) {
+               } else if (input instanceof Person) {
                        createPersonDetailSection(rootElement);
 
-               } else if (getInput() instanceof TeamOrPersonBase) {
+               } else if (input instanceof TeamOrPersonBase) {
                        createTeamOrPersonBaseDetailSection(rootElement);
 
-               } else if (getInput() instanceof DescriptionBase) {
-                       Set<Marker> descriptionMarkers = ((DescriptionBase) getInput()).getMarkers();
+               } else if (input instanceof DescriptionBase) {
+                       Set<Marker> descriptionMarkers = ((DescriptionBase) input).getMarkers();
                        MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
                        Boolean isUseDescription = false;
                        for (Marker marker : descriptionMarkers) {
@@ -201,17 +200,17 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                                        isUseDescription = true;
                                }
                        }
-                       if (((DescriptionBase) getInput()).isImageGallery()) {
+                       if (((DescriptionBase) input).isImageGallery()) {
                                createImageGallerySection(rootElement);
 
-                       } else if (isUseDescription) { 
+                       } else if (isUseDescription) {
                                createUseDescriptionSection(rootElement);
                        } else {
                                createDescriptionSection(rootElement);
 
                        }
-               } else if (getInput() instanceof DescriptionElementBase) {
-                       Set<Marker> descriptionMarkers = ((DescriptionElementBase) getInput()).getInDescription().getMarkers();
+               } else if (input instanceof DescriptionElementBase) {
+                       Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
                        MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
                        Boolean isUseDescription = false;
                        for (Marker marker : descriptionMarkers) {
@@ -219,43 +218,38 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                                        isUseDescription = true;
                                }
                        }
-                       
-                       if (isUseDescription == true && getInput() instanceof CategoricalData ) {
+
+                       if (isUseDescription == true && input instanceof CategoricalData ) {
                                createUseRecordSection(rootElement);
                        }
                        else {
                                createDescriptionElementSection(rootElement);
                        }
 
-               } else if (getInput() instanceof Media) {
+               } else if (input instanceof Media) {
                        createMediaElementSection(rootElement);
 
-               } else if (getInput() instanceof DerivedUnitFacade) {
+               } else if (input instanceof DerivedUnitFacade) {
                        createDerivedUnitBaseElementSection(rootElement);
 
-               } else if (getInput() instanceof FeatureNodeContainer) {
+               } else if (input instanceof FeatureNodeContainer) {
                        createFeatureDistributionSection(rootElement);
 
-               } else if (getInput() instanceof PolytomousKey) {
+               } else if (input instanceof PolytomousKey) {
                        //createPolytomousKeySection(rootElement);
 
-               } else if ((getInput() instanceof PolytomousKeyNode)
-                               || (getInput() instanceof PolytomousKeyRelationship)) {
+               } else if ((input instanceof PolytomousKeyNode)
+                               || (input instanceof PolytomousKeyRelationship)) {
                        createPolytomousKeyNodeSection(rootElement);
-
-               } else if (getInput() instanceof User) {
+               } else if (input instanceof User) {
                        createUserSection(rootElement);
-
-               } else if (getInput() instanceof Group) {
+               } else if (input instanceof Group) {
                        createGroupSection(rootElement);
-
-               } else if (getInput() instanceof TaxonRelationship) {
+               } else if (input instanceof TaxonRelationship) {
                        createTaxonRelationshipSection(rootElement);
-
-               } else if (getInput() instanceof TermVocabulary) {
+               } else if (input instanceof TermVocabulary) {
                        createTermVocabularySection(rootElement);
-
-               } else if (getInput() instanceof DefinedTermBase) {
+               } else if (input instanceof DefinedTermBase) {
                        createDefinedTermSection(rootElement);
                } else {
                        destroySections();
@@ -263,7 +257,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                layout();
        }
 
-       
+
        /**
         * @param rootElement
         */
@@ -272,16 +266,16 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                GroupDetailSection groupDetailSection = (GroupDetailSection) formFactory
                                .createCdmDetailSection(DetailType.GROUP,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
                MemberDetailSection memberDetailSection = (MemberDetailSection) formFactory
                                .createEntityDetailSection(EntityDetailType.MEMBER,
-                                               getConversationHolder(), parent, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
                GrantedAuthorityDetailSection grantedAuthorityDetailSection = (GrantedAuthorityDetailSection) formFactory
                                .createEntityDetailSection(EntityDetailType.GRANTED_AUTHORITY,
-                                               getConversationHolder(), parent, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(groupDetailSection);
                addPart(memberDetailSection);
@@ -290,7 +284,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.jface.viewers.Viewer#getSelection()
         */
        /** {@inheritDoc} */
@@ -301,7 +295,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
         * .ISelection, boolean)
@@ -310,8 +304,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
        @Override
        public void setSelection(ISelection selection, boolean reveal) {
                this.selection = selection;
-               SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(
-                               this, selection);
+               SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
                fireSelectionChanged(selectionChangedEvent);
        }
 
@@ -324,51 +317,51 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                TaxonBaseDetailSection taxonBaseDetailSection = (TaxonBaseDetailSection) formFactory
                                .createCdmDetailSection(DetailType.TAXONBASE,
-                                               getConversationHolder(), parent, this, Section.TWISTIE);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NonViralNameDetailSection nonViralNameSection = (NonViralNameDetailSection) formFactory
                                .createCdmDetailSection(DetailType.NONVIRALNAME,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NomenclaturalReferenceDetailSection referenceDetailSection = (NomenclaturalReferenceDetailSection) formFactory
                                .createCdmDetailSection(DetailType.NOMENCLATURALREFERENCE,
-                                               getConversationHolder(), parent, this, Section.TWISTIE);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NomenclaturalStatusSection nomenclaturalStatusSection = (NomenclaturalStatusSection) formFactory
                                .createEntityDetailSection(
                                                EntityDetailType.NOMENCLATURALSTATUS,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                ProtologueSection protologSection = (ProtologueSection) formFactory
                                .createEntityDetailSection(EntityDetailType.PROTOLOG,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                TypeDesignationSection typeDesignationSection = (TypeDesignationSection) formFactory
                                .createEntityDetailSection(EntityDetailType.TYPEDESIGNATION,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NameRelationshipDetailSection nameRelationshipSection = (NameRelationshipDetailSection) formFactory
                                .createEntityDetailSection(EntityDetailType.NAME_RELATIONSHIP,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                ParsingMessagesSection parsingMessagesSection = (ParsingMessagesSection) formFactory
                                .createCdmDetailSection(DetailType.PARSINGMESSAGE,
-                                               getConversationHolder(), parent, this, Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.EXPANDED);
 
                addPart(taxonBaseDetailSection);
                addPart(nonViralNameSection);
@@ -388,39 +381,39 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                NonViralNameDetailSection nonViralNameSection = (NonViralNameDetailSection) formFactory
                                .createCdmDetailSection(DetailType.NONVIRALNAME,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NomenclaturalReferenceDetailSection referenceDetailSection = (NomenclaturalReferenceDetailSection) formFactory
                                .createCdmDetailSection(DetailType.NOMENCLATURALREFERENCE,
-                                               getConversationHolder(), parent, this, Section.TWISTIE);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NomenclaturalStatusSection nomenclaturalStatusSection = (NomenclaturalStatusSection) formFactory
                                .createEntityDetailSection(
                                                EntityDetailType.NOMENCLATURALSTATUS,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                ProtologueSection protologSection = (ProtologueSection) formFactory
                                .createEntityDetailSection(EntityDetailType.PROTOLOG,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                TypeDesignationSection typeDesignationSection = (TypeDesignationSection) formFactory
                                .createEntityDetailSection(EntityDetailType.TYPEDESIGNATION,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NameRelationshipDetailSection nameRelationshipSection = (NameRelationshipDetailSection) formFactory
                                .createEntityDetailSection(EntityDetailType.NAME_RELATIONSHIP,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -441,8 +434,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                ReferenceDetailSection referenceDetailSection = (ReferenceDetailSection) formFactory
                                .createCdmDetailSection(DetailType.REFERENCEBASE,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(referenceDetailSection);
        }
@@ -455,8 +448,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = (TeamOrPersonBaseDetailSection) formFactory
                                .createCdmDetailSection(DetailType.TEAMORPERSONBASE,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(teamOrPersonBaseDetailSection);
        }
@@ -469,12 +462,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                TeamDetailSection teamDetailSection = (TeamDetailSection) formFactory
                                .createCdmDetailSection(DetailType.TEAM,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(teamDetailSection);
        }
-       
+
        /**
         * createPersonDetailSection
         * @param parent
@@ -483,8 +476,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                PersonDetailSection personDetailSection = (PersonDetailSection) formFactory
                                .createCdmDetailSection(DetailType.PERSON,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
                addPart(personDetailSection);
        }
 
@@ -497,22 +490,22 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                DescriptionElementDetailSection descriptionElementDetailSection = (DescriptionElementDetailSection) formFactory
                                .createCdmDetailSection(DetailType.DESCRIPTIONELEMENT,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                DescriptionElementSourceSection descriptionElementSourceSection = (DescriptionElementSourceSection) formFactory
                                .createEntityDetailSection(
                                                EntityDetailType.DESCRIPTIONELEMENTSOURCE,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                DescriptionElementMediaSection descriptionElementMediaSection = (DescriptionElementMediaSection) formFactory
                                .createEntityDetailSection(
                                                EntityDetailType.DESCRIPTIONELEMENTMEDIA,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -529,33 +522,33 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
                                .createCdmDetailSection(DetailType.DESCRIPTION,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                NaturalLanguageSection naturalLanguageSection = (NaturalLanguageSection) formFactory
                                .createCdmDetailSection(DetailType.NATURAL_LANGUAGE,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                DescribedSpecimenSection describedSpecimenSection = (DescribedSpecimenSection) formFactory
                                .createEntityDetailSection(EntityDetailType.DESCRIBED_SPECIMEN,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
                                .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                ScopeSection scopeSection = (ScopeSection) formFactory
                                .createEntityDetailSection(EntityDetailType.SCOPE,
-                                               getConversationHolder(), parent, Section.TWISTIE);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -565,7 +558,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(descriptionSourceSection);
                addPart(scopeSection);
        }
-       
+
        /**
         * Creates the use Description section
         * @param parent
@@ -574,21 +567,21 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
                                .createCdmDetailSection(DetailType.DESCRIPTION,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
                                .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
-                                               getConversationHolder(), parent, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
                addPart(descriptionDetailSection);
                addPart(descriptionSourceSection);
-               
+
        }
 
 
@@ -599,12 +592,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
                                .createCdmDetailSection(DetailType.DESCRIPTION,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(descriptionDetailSection);
        }
-       
+
        /**
         * createMediaElementSection
         * @param parent
@@ -614,8 +607,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                destroySections();
                MediaDetailsSection mediaDetailSection = (MediaDetailsSection) formFactory
                                .createCdmDetailSection(DetailType.MEDIA,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(mediaDetailSection);
        }
@@ -624,45 +617,34 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         * createDerivedUnitBaseElementSection
         * @param parent
         */
-       private void createDerivedUnitBaseElementSection(RootElement parent) {
-               destroySections();
-
-               GeneralDetailSection generalDetailSection = (GeneralDetailSection) formFactory
-                               .createCdmDetailSection(DetailType.DERIVED_UNIT_GENERAL,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+    private void createDerivedUnitBaseElementSection(RootElement parent) {
+        destroySections();
+        
+        GeneralDetailSection generalDetailSection = (GeneralDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT_GENERAL, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               GatheringEventDetailSection gatheringEventDetailSection = (GatheringEventDetailSection) formFactory
-                               .createCdmDetailSection(DetailType.GATHERING_EVENT,
-                                               getConversationHolder(), parent, this, Section.TWISTIE);
+        GatheringEventDetailSection gatheringEventDetailSection = (GatheringEventDetailSection) formFactory.createCdmDetailSection(DetailType.GATHERING_EVENT, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               FieldObservationDetailSection fieldObservationDetailSection = (FieldObservationDetailSection) formFactory
-                               .createCdmDetailSection(DetailType.FIELD_OBSERVATION,
-                                               getConversationHolder(), parent, this, Section.TWISTIE);
+        FieldObservationDetailSection fieldObservationDetailSection = (FieldObservationDetailSection) formFactory.createCdmDetailSection(DetailType.FIELD_OBSERVATION, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = (DerivedUnitBaseDetailSection) formFactory
-                               .createCdmDetailSection(DetailType.DERIVED_UNIT,
-                                               getConversationHolder(), parent, this, Section.TWISTIE);
+        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = (DerivedUnitBaseDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               DeterminationDetailSection determinationDetailSection = (DeterminationDetailSection) formFactory
-                               .createCdmDetailSection(DetailType.DETERMINATION,
-                                               getConversationHolder(), parent, this, Section.TWISTIE);
+        DeterminationDetailSection determinationDetailSection = (DeterminationDetailSection) formFactory.createCdmDetailSection(DetailType.DETERMINATION, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               addPart(generalDetailSection);
-               addPart(gatheringEventDetailSection);
-               addPart(fieldObservationDetailSection);
-               addPart(derivedUnitBaseDetailSection);
-               addPart(determinationDetailSection);
+        addPart(generalDetailSection);
+        addPart(gatheringEventDetailSection);
+        addPart(fieldObservationDetailSection);
+        addPart(derivedUnitBaseDetailSection);
+        addPart(determinationDetailSection);
 
-       }
+    }
 
        /**
         * @param rootElement
@@ -672,44 +654,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                FeatureDistributionDetailSection featureDistributionSection = (FeatureDistributionDetailSection) formFactory
                                .createCdmDetailSection(DetailType.FEATURE_DISTRIBUTION,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(featureDistributionSection);
        }
 
-       private void createPolytomousKeySection(RootElement parent) {
-               destroySections();
-
-               PolytomousKeyDetailSection polytomousKeyDetailSection = (PolytomousKeyDetailSection) formFactory
-                               .createCdmDetailSection(DetailType.POLYTOMOUS_KEY,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
-
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-               GeographicalScopeDetailSection geographicalScopeDetailSection = (GeographicalScopeDetailSection) formFactory
-                               .createEntityDetailSection(EntityDetailType.GEOGRAPHICAL_SCOPE,
-                                               getConversationHolder(), parent, Section.TWISTIE);
-
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-               ScopeRestrictionSection scopeRestrictionSection = (ScopeRestrictionSection) formFactory
-                               .createEntityDetailSection(EntityDetailType.SCOPE_RESTRICTION,
-                                               getConversationHolder(), parent, Section.TWISTIE);
-
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-               TaxonomicScopeSection taxonomicScopeSection = (TaxonomicScopeSection) formFactory
-                               .createEntityDetailSection(EntityDetailType.TAXONOMIC_SCOPE,
-                                               getConversationHolder(), parent, Section.TWISTIE);
-
-               addPart(polytomousKeyDetailSection);
-               addPart(geographicalScopeDetailSection);
-               addPart(scopeRestrictionSection);
-               addPart(taxonomicScopeSection);
-       }
-
        /**
         * createPolytomousKeyNodeSection
         * @param parent
@@ -719,42 +669,28 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         PolytomousKeyDetailSection polytomousKeyDetailSection = (PolytomousKeyDetailSection) formFactory
                 .createCdmDetailSection(DetailType.POLYTOMOUS_KEY,
-                        getConversationHolder(), parent, this, Section.TWISTIE
-                               | Section.COMPACT);
-        
+                        getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                               | ExpandableComposite.COMPACT);
+
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        
+
         PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = (PolytomousKeyNodeDetailSection) formFactory
                 .createCdmDetailSection(DetailType.POLYTOMOUS_KEY_NODE,
-                        getConversationHolder(), parent, this, Section.TWISTIE
-                                | Section.EXPANDED);
-
-//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-//
-//        GeographicalScopeDetailSection geographicalScopeDetailSection = (GeographicalScopeDetailSection) formFactory
-//                .createEntityDetailSection(EntityDetailType.GEOGRAPHICAL_SCOPE,
-//                        getConversationHolder(), parent, Section.TWISTIE | Section.COMPACT);
-//
-//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-//
-//        ScopeRestrictionSection scopeRestrictionSection = (ScopeRestrictionSection) formFactory
-//                .createEntityDetailSection(EntityDetailType.SCOPE_RESTRICTION,
-//                        getConversationHolder(), parent, Section.TWISTIE | Section.COMPACT);
-//
+                        getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                | ExpandableComposite.EXPANDED);
+
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         TaxonomicScopeSection taxonomicScopeSection = (TaxonomicScopeSection) formFactory
                 .createEntityDetailSection(EntityDetailType.TAXONOMIC_SCOPE,
-                        getConversationHolder(), parent, Section.TWISTIE | Section.COMPACT);        
+                        getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
 
            addPart(polytomousKeyDetailSection);
            addPart(polytomousKeyNodeDetailSection);
-//         addPart(geographicalScopeDetailSection);
-//         addPart(scopeRestrictionSection);
            addPart(taxonomicScopeSection);
 
        }
-       
+
        /**
         * create the UseRecordSection
         * @param parent
@@ -764,14 +700,14 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                UseRecordDetailSection descriptionUseRecordSection = (UseRecordDetailSection) formFactory
                                .createCdmDetailSection(DetailType.USE_RECORD,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               
+
                addPart(descriptionUseRecordSection);
-               
-               
+
+
        }
 
        /**
@@ -783,13 +719,13 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                UserDetailSection userDetailSection = (UserDetailSection) formFactory
                                .createCdmDetailSection(DetailType.USER,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                GroupsByUserDetailSection groupByUserDetailSection = (GroupsByUserDetailSection) formFactory
                                .createEntityDetailSection(EntityDetailType.GROUPS_BY_USER,
-                                               getConversationHolder(), parent, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                addPart(userDetailSection);
                addPart(groupByUserDetailSection);
@@ -804,13 +740,13 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                TaxonRelationshipDetailSection taxonRelationshipDetailSection = (TaxonRelationshipDetailSection) formFactory
                                .createCdmDetailSection(DetailType.TAXON_RELATIONSHIP,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
 
                ReferencedEntityDetailSection referencedEntityBaseDetailSection = (ReferencedEntityDetailSection) formFactory
                                .createCdmDetailSection(DetailType.REFERENCED_ENTITY,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
                addPart(taxonRelationshipDetailSection);
                addPart(referencedEntityBaseDetailSection);
        }
@@ -823,8 +759,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                TermVocabularyDetailSection termVocabularyDetailSection = (TermVocabularyDetailSection) formFactory
                                .createCdmDetailSection(DetailType.TERM_VOCABULARY,
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
                addPart(termVocabularyDetailSection);
        }
 
@@ -837,8 +773,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                AbstractFormSection definedTermDetailSection = formFactory
                                .createDefinedTermDetailSection(getInput().getClass(),
-                                               getConversationHolder(), parent, this, Section.TWISTIE
-                                                               | Section.EXPANDED);
+                                               getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+                                                               | ExpandableComposite.EXPANDED);
                addPart(definedTermDetailSection);
        }
 }