From 3177a94904d04cfde544817ccd30060bbbf70368 Mon Sep 17 00:00:00 2001 From: Patric Plitzner Date: Wed, 26 Nov 2014 14:20:29 +0000 Subject: [PATCH] - activated filter in factual data view for displaying only IndividualsAssociations --- .gitattributes | 1 + .../icons/link_obj.gif | Bin 0 -> 218 bytes eu.etaxonomy.taxeditor.editor/plugin.xml | 25 +++++++----------- .../DescriptiveContentProvider.java | 13 ++++++--- 4 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 eu.etaxonomy.taxeditor.editor/icons/link_obj.gif diff --git a/.gitattributes b/.gitattributes index 279de7dbe..03a3a3081 100644 --- a/.gitattributes +++ b/.gitattributes @@ -357,6 +357,7 @@ eu.etaxonomy.taxeditor.editor/icons/derivate_view-16x16-32.png -text eu.etaxonomy.taxeditor.editor/icons/edit_16x16.gif -text eu.etaxonomy.taxeditor.editor/icons/emblem-photos.png -text eu.etaxonomy.taxeditor.editor/icons/leaf_detail.png -text +eu.etaxonomy.taxeditor.editor/icons/link_obj.gif -text eu.etaxonomy.taxeditor.editor/icons/xper64.png -text eu.etaxonomy.taxeditor.editor/p2.inf -text eu.etaxonomy.taxeditor.editor/plugin.xml -text diff --git a/eu.etaxonomy.taxeditor.editor/icons/link_obj.gif b/eu.etaxonomy.taxeditor.editor/icons/link_obj.gif new file mode 100644 index 0000000000000000000000000000000000000000..5fd9c94946cb22dcf11255d259e6b220a564552a GIT binary patch literal 218 zcmZ?wbhEHb6krfwIKsftnabCfDcF}KG_^o%L50MW0Q?p5-P&7vbaqTI+&$TN&s5U`Gc5Klj61X}`P91X%iBwq)+znJHSzDK+h-Sr z{09RDFi`x-!pOiN%b)||f$U^p4Np+-dvd}gRZA_VZRK5)*!F3;`C40B_ws6W_&(rX zA!EkO5vIHFTcHpY6ko$(a;xJ*Om`r$dN?i#!adT-V-xnny+B7bxq OgMn&DV@snVgEauwMp$tG literal 0 HcmV?d00001 diff --git a/eu.etaxonomy.taxeditor.editor/plugin.xml b/eu.etaxonomy.taxeditor.editor/plugin.xml index c0c7fc3dd..e0dc27452 100644 --- a/eu.etaxonomy.taxeditor.editor/plugin.xml +++ b/eu.etaxonomy.taxeditor.editor/plugin.xml @@ -823,15 +823,16 @@ - + @@ -961,18 +962,10 @@ - + - + diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java index b24ee1704..ddbb3525a 100644 --- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java +++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java @@ -67,10 +67,15 @@ public class DescriptiveContentProvider implements ITreeContentProvider { DescriptionBase description = (DescriptionBase) parentElement; FeatureNodeContainerTree containerTree = getContainerTreeForDesription(description); - - if(getChildren(containerTree).length>=0){ - return containerTree.getRoot().getChildren().toArray(); - } + List children = containerTree.getRoot().getChildren(); + //filter out containers with no children + List childrenWithChildren = new ArrayList(); + for (FeatureNodeContainer featureNodeContainer : children) { + if(getChildren(featureNodeContainer).length>0){ + childrenWithChildren.add(featureNodeContainer); + } + } + return childrenWithChildren.toArray(); } } else if (parentElement instanceof FeatureNodeContainer){ -- 2.34.1