- added interface IDerivedUnitFacadeEditor to tag editors that are working with...
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / detail / DetailsViewer.java
index d04a0d2859d6a54fb34bbd087146165160bb98d1..229cae1ce15764f50e2dd1708bcfe2291661b37f 100644 (file)
@@ -52,7 +52,9 @@ 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.IDerivedUnitFacadeEditor;
 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -669,6 +671,16 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         OriginalLabelDataSection originalLabelDataSection = formFactory.createOriginalLabelDataSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(originalLabelDataSection);
 
+        //for editors working with facades
+        if(AbstractUtility.getActiveEditor() instanceof IDerivedUnitFacadeEditor){
+            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+            GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+            addPart(gatheringEventDetailSection);
+
+            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+            FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+            addPart(fieldUnitDetailSection);
+        }
 
         if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
             formFactory.createHorizontalSeparator(parent, SWT.BORDER);