import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.location.NamedArea;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement;
combo_specorobstype.setSelection(entity.getType());
selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(), formElement,
"Country", entity.getCountry(), EntitySelectionElement.NOTHING, style);
-
- section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
- section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- section_collectingAreas.setEntity(entity);
+ if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION)){
+ section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ section_collectingAreas.setEntity(entity);
+ }
languageText_locality = formFactory.createLanguageStringWithLabelElement(formElement, "Locality",
entity.getLocality(), style);