Project

General

Profile

« Previous | Next » 

Revision 1f183072

Added by Katja Luther almost 5 years ago

fix factual data view for name facts

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java
17 17
import eu.etaxonomy.cdm.model.common.Marker;
18 18
import eu.etaxonomy.cdm.model.description.DescriptionBase;
19 19
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
20
import eu.etaxonomy.cdm.model.term.FeatureTree;
21 20
import eu.etaxonomy.cdm.model.description.IDescribable;
22 21
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
22
import eu.etaxonomy.cdm.model.description.TaxonNameDescription;
23
import eu.etaxonomy.cdm.model.term.FeatureTree;
23 24
import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;
24 25
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
25 26
import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
......
182 183
	 */
183 184
	private FeatureTree getFeatureTree(DescriptionBase description){
184 185

  
185
	    FeatureTree featureTree;
186
		// TODO change this to the feature tree associated with this taxon description
187
		if (description.hasStructuredData()){
188
			featureTree = PreferencesUtil.getDefaultFeatureTreeForStructuredDescription();
189
		}else{
190
			featureTree = PreferencesUtil.getDefaultFeatureTreeForTextualDescription();
191
		}
186
	        FeatureTree<?> featureTree = null;
187

  
188
	        // TODO change this to the feature tree associated with this taxon
189
	        // description
190
	        if (description.hasStructuredData()) {
191
	            featureTree = PreferencesUtil
192
	                    .getDefaultFeatureTreeForStructuredDescription();
193
	        } else {
194
	            featureTree = PreferencesUtil
195
	                    .getDefaultFeatureTreeForTextualDescription();
196
	        }
197

  
198
	        if (featureTree == null) {
199
	            featureTree = TermEditorInput.getDefaultFeatureTree();
200
	                    }
201
	        if (description instanceof TaxonNameDescription){
202

  
203
	            featureTree = TermEditorInput.getDefaultNameFeatureTree();
204
	        }
205

  
206
	        return featureTree;
207

  
192 208

  
193
		// create a transient tree with all features if none was selected
194
		if(featureTree == null){
195
			featureTree = TermEditorInput.getDefaultFeatureTree();
196
		}
197 209

  
198
		return featureTree;
199 210
	}
200 211

  
201 212
    /**

Also available in: Unified diff