Revision 7fcccab7
Added by Katja Luther almost 3 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java | ||
---|---|---|
20 | 20 |
import eu.etaxonomy.cdm.model.description.IDescribable; |
21 | 21 |
import eu.etaxonomy.cdm.model.description.IndividualsAssociation; |
22 | 22 |
import eu.etaxonomy.cdm.model.description.TaxonNameDescription; |
23 |
import eu.etaxonomy.cdm.model.metadata.EnabledComputedDescription; |
|
23 | 24 |
import eu.etaxonomy.cdm.model.term.TermTree; |
24 | 25 |
import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput; |
25 | 26 |
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer; |
... | ... | |
220 | 221 |
} |
221 | 222 |
} |
222 | 223 |
else { |
223 |
resultDescriptions.add(description); |
|
224 |
if (description.isComputed() && PreferencesUtil.getComputedDesciptionHandlingPreference().equals(EnabledComputedDescription.Invisible)){ |
|
225 |
continue; |
|
226 |
} |
|
227 |
resultDescriptions.add(description); |
|
228 |
|
|
224 | 229 |
} |
225 | 230 |
} |
226 | 231 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveLabelProvider.java | ||
---|---|---|
23 | 23 |
import eu.etaxonomy.taxeditor.model.DescriptionHelper; |
24 | 24 |
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer; |
25 | 25 |
import eu.etaxonomy.taxeditor.model.ImageResources; |
26 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
|
26 | 27 |
|
27 | 28 |
/** |
28 | 29 |
* @author p.ciardelli |
... | ... | |
80 | 81 |
}else if (element instanceof FeatureNodeContainer){ |
81 | 82 |
desc = ((FeatureNodeContainer)element).getDescription(); |
82 | 83 |
} |
83 |
if (desc.isComputed()){ |
|
84 |
if (desc.isComputed() && PreferencesUtil.isComputedDesciptionHandlingDisabled()){
|
|
84 | 85 |
return Display.getCurrent().getSystemColor(SWT.COLOR_GRAY); |
85 | 86 |
} |
86 | 87 |
return null; |
Also available in: Unified diff
ref #9630: make computed descriptions handling configurable - adapt content and label provider