ref #3836: show modifier part only if recommended modifier voc exist
authorKatja Luther <k.luther@bgbm.org>
Tue, 9 Apr 2019 06:58:13 +0000 (08:58 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 9 Apr 2019 06:58:13 +0000 (08:58 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/CategoricalDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/CommonNameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/DistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/IndividualsAssociationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/TaxonInteractionDetailElement.java

index 414c817..8d0b663 100644 (file)
@@ -46,7 +46,9 @@ public class CategoricalDataDetailElement extends AbstractDetailedDescriptionDet
                section_stateData.setEntity(entity);
                section_stateData.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                createTimePeriod(formElement, entity, style);
                section_stateData.setEntity(entity);
                section_stateData.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                createTimePeriod(formElement, entity, style);
-               createModifier(formElement, entity, style);
+               if (entity.getFeature().getRecommendedModifierEnumeration() != null){
+                   createModifier(formElement, entity, style);
+               }
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index 25bc711..d4ea748 100644 (file)
@@ -68,7 +68,10 @@ public class CommonNameDetailElement extends AbstractDetailedDescriptionDetailEl
                                entity.getArea(), EntitySelectionElement.NOTHING, style);
 
                createTimePeriod(formElement, entity, style);
                                entity.getArea(), EntitySelectionElement.NOTHING, style);
 
                createTimePeriod(formElement, entity, style);
-               createModifier(formElement, entity, style);
+               if (entity.getFeature().getRecommendedModifierEnumeration() != null){
+            createModifier(formElement, entity, style);
+        }
+
        }
 
 
        }
 
 
index 3130c1a..c188e13 100644 (file)
@@ -58,7 +58,9 @@ public class DistributionDetailElement extends
 
         combo_presenceAbsence = formFactory.createTermComboElement(PresenceAbsenceTerm.class, this, "Distribution Status", entity.getStatus(), style);
         createTimePeriod(formElement, entity, style);
 
         combo_presenceAbsence = formFactory.createTermComboElement(PresenceAbsenceTerm.class, this, "Distribution Status", entity.getStatus(), style);
         createTimePeriod(formElement, entity, style);
-        createModifier(formElement, entity, style);
+        if (entity.getFeature().getRecommendedModifierEnumeration() != null){
+            createModifier(formElement, entity, style);
+        }
        }
 
        /** {@inheritDoc} */
        }
 
        /** {@inheritDoc} */
index 3e8c8f4..5aa1956 100644 (file)
@@ -61,7 +61,9 @@ public class IndividualsAssociationDetailElement extends
                }
 
                createTimePeriod(formElement, entity, style);
                }
 
                createTimePeriod(formElement, entity, style);
-               createModifier(formElement, entity, style);
+               if (entity.getFeature().getRecommendedModifierEnumeration() != null){
+            createModifier(formElement, entity, style);
+        }
        }
 
        /** {@inheritDoc} */
        }
 
        /** {@inheritDoc} */
index 3afaf47..bf073bb 100644 (file)
@@ -7,9 +7,9 @@ import java.util.ArrayList;
 
 import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
 
 import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
-import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.description.MeasurementUnit;
 import eu.etaxonomy.cdm.model.description.QuantitativeData;
 import eu.etaxonomy.cdm.model.description.MeasurementUnit;
 import eu.etaxonomy.cdm.model.description.QuantitativeData;
+import eu.etaxonomy.cdm.model.term.TermType;
 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.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -51,6 +51,9 @@ public class QuantitativeDataDetailElement extends
                section_statisticalMeasurementValues = formFactory.createStatisticalMeasurementValueSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
                section_statisticalMeasurementValues.setEntity(entity);
                section_statisticalMeasurementValues.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                section_statisticalMeasurementValues = formFactory.createStatisticalMeasurementValueSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
                section_statisticalMeasurementValues.setEntity(entity);
                section_statisticalMeasurementValues.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+               if (entity.getFeature().getRecommendedModifierEnumeration() != null){
+            createModifier(formElement, entity, style);
+        }
        }
 
        /** {@inheritDoc} */
        }
 
        /** {@inheritDoc} */
index 5665bd4..886a586 100644 (file)
@@ -79,7 +79,9 @@ public class TaxonInteractionDetailElement extends
                     CdmStore.getDefaultLanguage()).getText());
         }
         createTimePeriod(formElement, entity, style);
                     CdmStore.getDefaultLanguage()).getText());
         }
         createTimePeriod(formElement, entity, style);
-        createModifier(formElement, entity, style);
+        if (entity.getFeature().getRecommendedModifierEnumeration() != null){
+            createModifier(formElement, entity, style);
+        }
        }
 
        /** {@inheritDoc} */
        }
 
        /** {@inheritDoc} */