fix #9168: code cleaníng
authorKatja Luther <k.luther@bgbm.org>
Wed, 29 Jul 2020 14:36:00 +0000 (16:36 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 29 Jul 2020 14:36:00 +0000 (16:36 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java

index 212042a661c02caf0271fd391004673306d08b3d..f46841b3b177ed63c1be88e9885721992b8f7e38 100644 (file)
@@ -147,11 +147,12 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
        }
 
        private FeatureNodeContainerTree getContainerTreeForDesription(DescriptionBase<?> description){
-               if(! featureNodeContainerCache.containsKey(description)){
-                       FeatureNodeContainerTree containerTree = new FeatureNodeContainerTree(description, getFeatureTree(description));
-                       featureNodeContainerCache.put(description, containerTree);
-               }
-               return featureNodeContainerCache.get(description);
+//             if(! featureNodeContainerCache.containsKey(description)){
+//                     FeatureNodeContainerTree containerTree = new FeatureNodeContainerTree(description, getFeatureTree(description));
+//                     featureNodeContainerCache.put(description, containerTree);
+//             }
+//             return featureNodeContainerCache.get(description);
+               return new FeatureNodeContainerTree(description, getFeatureTree(description));
        }
 
        @Override
@@ -179,6 +180,10 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
 
                TermTree<?> featureTree = null;
 
+               if (description instanceof TaxonNameDescription){
+
+                return PreferencesUtil.getPreferredFeatureTreeForNameDescription(false);
+            }
                // TODO change this to the feature tree associated with this taxon
                // description
                if (description.hasStructuredData()) {
@@ -191,12 +196,9 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
 
                if (featureTree == null) {
                    featureTree = TermEditorInput.getDefaultFeatureTree();
-                           }
-               if (description instanceof TaxonNameDescription){
-
-                   featureTree = TermEditorInput.getDefaultNameFeatureTree();
                }
 
+
                return featureTree;