import org.osgi.service.event.Event;
import eu.etaxonomy.taxeditor.model.IContextListener;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
private void processAdditions(MApplication application) {
this.application = application;
hideParts();
+
}
@ProcessRemovals
*/
@Override
public void contextStart(IMemento memento, IProgressMonitor monitor) {
+ PreferencesUtil.updateDBPreferences();
hideParts();
}
public static final String INHERIT_FROM_PARENT = "PARENT";
public static final String PUBLISH = "PUBLISH";
+ public static final String FILTER_COMMON_NAME_REFERENCES = "eu.etaxonomy.taxeditor.references.selection.filterCommonNameReferences";
+
getPreferenceStore().setDefault(OVERRIDE_SPECIMEN_PREF, false);
getPreferenceStore().setDefault(OVERRIDE_NAME_DETAILS, false);
getPreferenceStore().setDefault(DISTRIBUTION_AREA_PREFRENCES_ACTIVE_OVERRIDE, false);
+ getPreferenceStore().setDefault(FILTER_COMMON_NAME_REFERENCES, false);
}
}
+public static boolean getFilterCommonNameReferences(){
+ return getPreferenceStore().getBoolean(PreferencesUtil.FILTER_COMMON_NAME_REFERENCES);
+}
+
/**
*
*/
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement formElement, int style) {
- if (isCommonNameReference){
+ if (isCommonNameReference && PreferencesUtil.getFilterCommonNameReferences()){
selection_reference = formFactory
.createCommonNameReferenceSelectionElement(formElement, "Reference",
null, EntitySelectionElement.ALL, style);