2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.preference
.menu
;
11 import java
.util
.ArrayList
;
12 import java
.util
.List
;
14 import eu
.etaxonomy
.cdm
.api
.service
.IVocabularyService
;
15 import eu
.etaxonomy
.cdm
.model
.metadata
.PreferencePredicate
;
16 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
17 import eu
.etaxonomy
.cdm
.model
.term
.VocabularyEnum
;
18 import eu
.etaxonomy
.cdm
.persistence
.dto
.TermVocabularyDto
;
19 import eu
.etaxonomy
.taxeditor
.editor
.definedterm
.input
.TermEditorInput
;
20 import eu
.etaxonomy
.taxeditor
.preference
.GeneralTermPreference
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * <p>FeatureMenuPreferences class.</p>
31 public class FeatureMenuPreferences
extends GeneralTermPreference
{
33 /** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.preferences.feat"{trunked}</code> */
34 public static final String PLUGIN_ID
= "eu.etaxonomy.taxeditor.preferences.nameFeature"; //$NON-NLS-1$
37 * <p>Constructor for FeatureMenuPreference.</p>
39 public FeatureMenuPreferences() {
42 setPredicate(PreferencePredicate
.TaxonFeatures
);
43 type
= TermType
.Feature
;
49 public boolean performOk(){
51 boolean result
= super.performOk();
53 TermEditorInput
.getPreferredTaxonFeatureTree(true);
61 protected void initialiseVocabularies() {
63 super.initialiseVocabularies();
64 List
<TermVocabularyDto
> vocs
= new ArrayList
<>();
65 vocs
.add(CdmStore
.getService(IVocabularyService
.class).findVocabularyDtoByVocabularyUuid(VocabularyEnum
.NameFeature
.getUuid()));
66 this.getVocabularies().removeAll(vocs
);