Search in sources :

Example 1 with OptionalPropertiesFilter

use of eu.esdihumboldt.hale.ui.common.definition.viewer.OptionalPropertiesFilter in project hale by halestudio.

the class EntitySchemaExplorer method prependToolbarActions.

/**
 * @see SchemaExplorer#prependToolbarActions(ToolBarManager)
 */
@Override
protected void prependToolbarActions(ToolBarManager manager) {
    // structure
    manager.add(new ContentProviderAction("Types as list", SchemasViewPlugin.getImageDescriptor("icons/flat_hierarchy.png"), getTreeViewer(), listProvider, true));
    manager.add(new ContentProviderAction("Type hierarchy", SchemasViewPlugin.getImageDescriptor("icons/inheritance_hierarchy.png"), getTreeViewer(), hierarchyProvider, false));
    manager.add(new Separator());
    // type filters
    ViewerFilter typeUnpopulated = new UnpopulatedTypesFilter();
    manager.add(new FilterAction("Hide unpopulated types", "Show unpopulated types", SchemasViewPlugin.getImageDescriptor("icons/type_empty.gif"), getTreeViewer(), typeUnpopulated, true, true));
    manager.add(new Separator());
    // properties filters
    ViewerFilter unpopulated = new UnpopulatedPropertiesFilter();
    manager.add(new FilterAction("Hide unpopulated properties", "Show unpopulated properties", SchemasViewPlugin.getImageDescriptor("icons/empty.gif"), getTreeViewer(), unpopulated, true, true));
    ViewerFilter inherited = new InheritedPropertiesFilter();
    manager.add(new FilterAction("Hide inherited properties", "Show inherited properties", SchemasViewPlugin.getImageDescriptor("icons/inherited.gif"), getTreeViewer(), inherited, true, true));
    ViewerFilter optional = new OptionalPropertiesFilter();
    manager.add(new FilterAction("Hide optional properties", "Show optional properties", SchemasViewPlugin.getImageDescriptor("icons/mandatory.gif"), getTreeViewer(), optional, true, true));
    manager.add(new Separator());
}
Also used : InheritedPropertiesFilter(eu.esdihumboldt.hale.ui.common.definition.viewer.InheritedPropertiesFilter) ViewerFilter(org.eclipse.jface.viewers.ViewerFilter) ContentProviderAction(eu.esdihumboldt.hale.ui.service.entity.util.ContentProviderAction) UnpopulatedTypesFilter(eu.esdihumboldt.hale.ui.service.population.UnpopulatedTypesFilter) Separator(org.eclipse.jface.action.Separator) FilterAction(eu.esdihumboldt.hale.ui.util.viewer.FilterAction) UnpopulatedPropertiesFilter(eu.esdihumboldt.hale.ui.service.population.UnpopulatedPropertiesFilter) OptionalPropertiesFilter(eu.esdihumboldt.hale.ui.common.definition.viewer.OptionalPropertiesFilter)

Aggregations

InheritedPropertiesFilter (eu.esdihumboldt.hale.ui.common.definition.viewer.InheritedPropertiesFilter)1 OptionalPropertiesFilter (eu.esdihumboldt.hale.ui.common.definition.viewer.OptionalPropertiesFilter)1 ContentProviderAction (eu.esdihumboldt.hale.ui.service.entity.util.ContentProviderAction)1 UnpopulatedPropertiesFilter (eu.esdihumboldt.hale.ui.service.population.UnpopulatedPropertiesFilter)1 UnpopulatedTypesFilter (eu.esdihumboldt.hale.ui.service.population.UnpopulatedTypesFilter)1 FilterAction (eu.esdihumboldt.hale.ui.util.viewer.FilterAction)1 Separator (org.eclipse.jface.action.Separator)1 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)1