Project

General

Profile

Revision 3e81c99c

ID3e81c99c4f1b691a370bd5864f88446861fe8ba3
Parent 7b130084
Child 4a201e6d

Added by Patrick Plitzner over 1 year ago

ref #7998 hard-coded filter for Feature and Name Feature vocabularies

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/character/CharacterEditor.java
57 57
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
58 58
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
59 59
import eu.etaxonomy.cdm.api.service.ITermService;
60
import eu.etaxonomy.cdm.api.service.IVocabularyService;
60 61
import eu.etaxonomy.cdm.model.common.Representation;
61 62
import eu.etaxonomy.cdm.model.common.TermType;
62 63
import eu.etaxonomy.cdm.model.common.TermVocabulary;
64
import eu.etaxonomy.cdm.model.common.VocabularyEnum;
63 65
import eu.etaxonomy.cdm.model.description.Character;
64 66
import eu.etaxonomy.cdm.model.description.FeatureNode;
65 67
import eu.etaxonomy.cdm.model.description.FeatureTree;
......
148 150

  
149 151
            @Override
150 152
            public void widgetSelected(SelectionEvent e) {
151
                vocabulary = TermVocabularySelectionDialog.select("Select vocabulary for characters", btnChooseVoc.getShell(), vocabulary, TermType.Feature);
153
                // hard-coded filter for "built-in" vocabularies Feature and Name Feature
154
                Set<TermVocabulary> vocabulariesToBeFiltered = new HashSet<>();
155
                vocabulariesToBeFiltered.add(CdmStore.getService(IVocabularyService.class).load(VocabularyEnum.Feature.getUuid()));
156
                vocabulariesToBeFiltered.add(CdmStore.getService(IVocabularyService.class).load(VocabularyEnum.NameFeature.getUuid()));
157
                if(vocabulary!=null){
158
                    vocabulariesToBeFiltered.add(vocabulary);
159
                }
160
                vocabulary = TermVocabularySelectionDialog.select("Select vocabulary for characters", btnChooseVoc.getShell(), vocabulariesToBeFiltered, TermType.Feature);
152 161
                if(vocabulary!=null){
153 162
                    txtVocabulary.setText(vocabulary.getLabel());
154 163
                }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)