eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencePropertyTester.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/SpecimenOrObservationPreferences.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicPreferences.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TypeDesignationPreferences.java -text
public static final String SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS = "eu.etaxonomy.taxeditor.navigation.search.openResultInSeparateWindows";
public static final String ADD_TYPES_TO_ALL_NAMES = "eu.etaxonomy.taxeditor.store.addTypeToAllNames";
+
+ public static final String DETERMINATION_ONLY_FOR_FIELD_UNITS = "eu.etaxonomy.taxeditor.specimen.determinationOnlyOnFieldUnitLevel";
}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2014 EDIT
+* 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.preference;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * @author pplitzner
+ * @date 13.02.2014
+ *
+ */
+public class SpecimenOrObservationPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(PreferencesUtil.getPreferenceStore());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+
+ addField(new BooleanFieldEditor(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS,
+ "Taxon determination only on FieldUnit level",
+ getFieldEditorParent()));
+
+ }
+
+
+}
package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+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.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author pplitzner
*/
public class TissueSampleGeneralDetailElement extends AbstractCdmDetailElement<DerivedUnitFacade> {
+ //title cache
+ //sample designation
+ private TimePeriodElement datePreparation;
+ private EntitySelectionElement<AgentBase> selectionPreparedBy;
+ private TextWithLabelElement textPreservationMedium;
+ private TimePeriodElement datePreservation;
+ private EntitySelectionElement<AgentBase> selectionStoredAt;
+ private EntitySelectionElement<Collection> selectionCollection;
+ private TextWithLabelElement textAccessionNumber;
+ private TextWithLabelElement textBarcode;
+
+
/**
* @param formFactory
* @param formElement
*/
@Override
protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
+ datePreparation = formFactory.createTimePeriodElement(formElement, "Preparation date", null, style);
+ selectionPreparedBy = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement, "Prepared By", null, EntitySelectionElement.ALL, style);
+ textPreservationMedium = formFactory.createTextWithLabelElement(formElement, "Preservation medium", null, style);
+ datePreservation = formFactory.createTimePeriodElement(formElement, "Preservation date", null, style);
+ selectionStoredAt = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement, "Stored at", null, EntitySelectionElement.ALL, style);
+ selectionCollection = formFactory.createSelectionElement(Collection.class, getConversationHolder(), formElement, "Collection", null, EntitySelectionElement.ALL, style);
+ textAccessionNumber = formFactory.createTextWithLabelElement(formElement, "Accession Number", null, style);
+ textBarcode = formFactory.createTextWithLabelElement(formElement, "Barcode", null, style);
}
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
addPart(derivedUnitGeneralDetailSection);
addPart(gatheringEventDetailSection);
addPart(fieldUnitDetailSection);
addPart(derivedUnitBaseDetailSection);
- addPart(determinationDetailSection);
+
+ if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(determinationDetailSection);
+ }
+
}
addPart(fielUnitGeneralDetailSection);
addPart(gatheringEventDetailSection);
addPart(fieldUnitDetailSection);
+
+ if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(determinationDetailSection);
+ }
}
private void createPreservedSpecimenSpecimenSection(RootElement parent) {