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
</visibleWhen>
</command>
</menuContribution>
- <!--menuContribution
+ <menuContribution
allPopups="false"
locationURI="toolbar:eu.etaxonomy.taxeditor.editor.view.descriptive">
<command
commandId="eu.etaxonomy.taxeditor.editor.handler.showOnlyIndividualAssociations"
- label="Show Only Individual Associations"
- style="toggle">
+ icon="icons/link_obj.gif"
+ style="toggle"
+ tooltip="Show Only Individuals Associations">
</command>
- </menuContribution-->
+ </menuContribution>
<menuContribution
allPopups="false"
locationURI="popup:eu.etaxonomy.taxeditor.navigation.navigatorpopup?after=taxeditor-navigation.separator2">
</with>
</activeWhen>
</handler>
- <!--handler
+ <handler
class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.ToggleShowOnlyIndividualAssociationsHandler"
commandId="eu.etaxonomy.taxeditor.editor.handler.showOnlyIndividualAssociations">
- <activeWhen>
- <with
- variable="activePartId">
- <equals
- value="eu.etaxonomy.taxeditor.editor.view.descriptive">
- </equals>
- </with>
- </activeWhen>
- </handler-->
+ </handler>
</extension>
<extension
name="%extension.name"
id="eu.etaxonomy.taxeditor.editor.command.new.datasource"
name="%command.name.39">
</command>
- <!--command
+ <command
id="eu.etaxonomy.taxeditor.editor.handler.showOnlyIndividualAssociations"
name="Show Only Individual Associations">
- </command-->
+ </command>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
DescriptionBase<?> description = (DescriptionBase<?>) parentElement;
FeatureNodeContainerTree containerTree = getContainerTreeForDesription(description);
-
- if(getChildren(containerTree).length>=0){
- return containerTree.getRoot().getChildren().toArray();
- }
+ List<FeatureNodeContainer> children = containerTree.getRoot().getChildren();
+ //filter out containers with no children
+ List<FeatureNodeContainer> childrenWithChildren = new ArrayList<FeatureNodeContainer>();
+ for (FeatureNodeContainer featureNodeContainer : children) {
+ if(getChildren(featureNodeContainer).length>0){
+ childrenWithChildren.add(featureNodeContainer);
+ }
+ }
+ return childrenWithChildren.toArray();
}
}
else if (parentElement instanceof FeatureNodeContainer){