fix NPE in factualDataPart
authorKatja Luther <k.luther@bgbm.org>
Fri, 12 Jun 2020 15:22:11 +0000 (17:22 +0200)
committerKatja Luther <k.luther@bgbm.org>
Fri, 12 Jun 2020 15:23:23 +0000 (17:23 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java

index c955c53941848c4d250314c6cc574bcfe13237d6..450540c7a29ca7c614ac57e7e4c03228b9064a99 100644 (file)
@@ -55,7 +55,6 @@ import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewerSorter;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.NameDescriptionFilter;
 import eu.etaxonomy.taxeditor.editor.view.media.e4.MediaViewPartE4;
 import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
-import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
@@ -200,15 +199,15 @@ public class FactualDataPartE4 extends AbstractCdmEditorPartE4
         if (featureNodeContainerCache.isEmpty()){
 //            return;
         }
-        if(object instanceof DescriptionElementBase){
-            DescriptionElementBase descriptionElement = (DescriptionElementBase) object;
-            DescriptionBase description = descriptionElement.getInDescription();
-            FeatureNodeContainerTree containerTree = featureNodeContainerCache.get(description);
-
-            FeatureNodeContainer featureNodeContainer = containerTree.getFeatureNodeContainerForDescriptionElement(descriptionElement);
-//            ((AbstractTreeViewer) viewer).expandToLevel(featureNodeContainer, 1);
-
-        }
+//        if(object instanceof DescriptionElementBase){
+//            DescriptionElementBase descriptionElement = (DescriptionElementBase) object;
+//            DescriptionBase description = descriptionElement.getInDescription();
+////            FeatureNodeContainerTree containerTree = featureNodeContainerCache.get(description);
+//
+////            FeatureNodeContainer featureNodeContainer = containerTree.getFeatureNodeContainerForDescriptionElement(descriptionElement);
+////            ((AbstractTreeViewer) viewer).expandToLevel(featureNodeContainer, 1);
+//
+//        }
 
 
         viewer.refresh();