--- /dev/null
+/**
+* Copyright (C) 2019 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.menu;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author k.luther
+ * @since 14.05.2019
+ *
+ */
+public class NameFeatureMenuPreference extends AbstractMenuPreferences<Feature> {
+ /** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.preferences.feat"{trunked}</code> */
+ public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.nameFeature"; //$NON-NLS-1$
+
+ /**
+ * <p>Constructor for FeatureMenuPreferences.</p>
+ */
+ public NameFeatureMenuPreference() {
+ super("Name Feature Preferences", //$NON-NLS-1$
+ Messages.FeatureMenuPreferences_display,
+ false);
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTermClass()
+ */
+ /** {@inheritDoc} */
+ @Override
+ protected TermType getTermType() {
+ return TermType.Feature;
+ }
+ @Override
+ protected List<Feature> getTerms(){
+ if(CdmStore.isActive() ){
+ List<Feature> termList = new ArrayList(TermEditorInput.getDefaultNameFeatureTree().getDistinctFeatures());
+ return termList;
+ }
+ return new ArrayList<Feature>();
+ }
+}