Class FilteredCommonViewer

  • All Implemented Interfaces:
    IViewerToolTip, org.eclipse.jface.viewers.IInputProvider, org.eclipse.jface.viewers.IInputSelectionProvider, org.eclipse.jface.viewers.IPostSelectionProvider, org.eclipse.jface.viewers.ISelectionProvider

    public class FilteredCommonViewer
    extends CommonViewerEx
    A little extended Common Viewer for searching used in the Designer dialogs and parts, as well as a drag-drop enhancement.
    Author:
    Christopher Mindus
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.jface.viewers.StructuredViewer

        org.eclipse.jface.viewers.StructuredViewer.ColorAndFontCollector, org.eclipse.jface.viewers.StructuredViewer.ColorAndFontCollectorWithProviders
    • Field Summary

      • Fields inherited from class org.eclipse.jface.viewers.AbstractTreeViewer

        ALL_LEVELS
      • Fields inherited from class org.eclipse.jface.viewers.Viewer

        WIDGET_DATA_KEY
    • Constructor Summary

      Constructors 
      Constructor Description
      FilteredCommonViewer​(org.eclipse.swt.widgets.Composite parent, int style, IFilter filter)
      Creates the common viewer.
      FilteredCommonViewer​(org.eclipse.swt.widgets.Composite parent, int style, IFilter filter, int flags)
      Creates the common viewer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EndNodeTextFilter getFilterInstance()
      Gets the filter instance.
      protected void init()
      Initializes the content provider, label provider, and drag and drop support.
      void setFilters​(org.eclipse.jface.viewers.ViewerFilter... filters)
      Called to set the filters on this viewer.
      void setLabelProvider​(org.eclipse.jface.viewers.IBaseLabelProvider labelProvider)
      Overrides the setting of the label provider to add support for the search...
      • Methods inherited from class org.eclipse.ui.navigator.CommonViewer

        add, createDragAdapter, createDropAdapter, createFrameList, dispose, doUpdateItem, getCommonNavigator, getFrameList, getMapper, getNavigatorContentService, getSelection, handleDispose, handleDoubleSelect, handleLabelProviderChanged, handleOpen, handlePostSelect, handleSelect, hookControl, initDragAndDrop, internalRefresh, mapElement, refresh, refresh, remove, removeWithoutRefresh, setMapper, setSelection, setSelectionToWidget, setSorter, toString, unmapAllElements, unmapElement, update
      • Methods inherited from class org.eclipse.jface.viewers.TreeViewer

        addTreeListener, assertContentProviderType, createViewerEditor, disassociate, doGetColumnCount, editElement, getChild, getChildren, getColumnViewerOwner, getControl, getExpanded, getItemAt, getItemCount, getItemCount, getItems, getLabelProvider, getParentElement, getParentItem, getRawChildren, getSelection, getTree, getViewerRowFromItem, handleTreeCollapse, handleTreeExpand, internalAdd, internalInitializeTree, internalRefreshStruct, isExpandable, newItem, remove, removeAll, replace, setChildCount, setContentProvider, setExpanded, setHasChildren, setSelection, showItem, updatePlus
      • Methods inherited from class org.eclipse.jface.viewers.AbstractTreeViewer

        add, addSelectionListener, addTreeListener, associate, buildLabel, collapseAll, collapseToLevel, createChildren, createTreeItem, doFindInputItem, doFindItem, doUpdateItem, doUpdateItem, expandAll, expandAll, expandToLevel, expandToLevel, expandToLevel, expandToLevel, fireTreeCollapsed, fireTreeExpanded, getAutoExpandLevel, getChildren, getExpandedElements, getExpandedState, getExpandedTreePaths, getNextItem, getPreviousItem, getSelectionFromWidget, getSortedChildren, getStructuredSelection, getTreePathFromItem, getVisibleExpandedElements, indexForElement, inputChanged, insert, internalCollapseToLevel, internalExpand, internalExpandToLevel, internalFindItems, internalGetWidgetToSelect, internalIsInputOrEmptyPath, internalRefresh, internalRefresh, internalRemove, internalRemove, isSameSelection, labelProviderChanged, remove, remove, removeTreeListener, reveal, scrollDown, scrollUp, setAutoExpandLevel, setExpandedElements, setExpandedState, setExpandedTreePaths, setExpandPreCheckFilters, setSelectionToWidget, updateChildren
      • Methods inherited from class org.eclipse.jface.viewers.ColumnViewer

        applyEditorValue, cancelEditing, checkBusy, getCell, getCellEditors, getCellModifier, getColumnProperties, getColumnViewerEditor, getItem, getLabelProvider, hookEditingSupport, isBusy, isCellEditorActive, setBusy, setCellEditors, setCellModifier, setColumnProperties, setColumnViewerEditor, triggerEditorActivationEvent
      • Methods inherited from class org.eclipse.jface.viewers.StructuredViewer

        addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getRoot, getSorter, handleInvalidSelection, hasFilters, internalUpdate, needsRefilter, preservingSelection, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setInput, setUseHashlookup, testFindItem, testFindItems, unmapElement, update, updateItem, updateSelection, usingElementMap
      • Methods inherited from class org.eclipse.jface.viewers.ContentViewer

        getContentProvider, getInput
      • Methods inherited from class org.eclipse.jface.viewers.Viewer

        addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, setData, setSelection
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider

        addSelectionChangedListener, removeSelectionChangedListener, setSelection
    • Constructor Detail

      • FilteredCommonViewer

        public FilteredCommonViewer​(org.eclipse.swt.widgets.Composite parent,
                                    int style,
                                    IFilter filter)
        Creates the common viewer.
        Parameters:
        parent - Parent composite.
        style - SWT style for tree control.
        filter - The filter instance.
      • FilteredCommonViewer

        public FilteredCommonViewer​(org.eclipse.swt.widgets.Composite parent,
                                    int style,
                                    IFilter filter,
                                    int flags)
        Creates the common viewer.
        Parameters:
        parent - Parent composite.
        style - SWT style for tree control.
        filter - The filter instance.
        flags - The presentation flags, from INavigatorPresentation.
    • Method Detail

      • init

        protected void init()
        Initializes the content provider, label provider, and drag and drop support. Should not be called by clients -- this method is invoked when the constructor is invoked.
        Overrides:
        init in class CommonViewerEx
      • setLabelProvider

        public void setLabelProvider​(org.eclipse.jface.viewers.IBaseLabelProvider labelProvider)
        Overrides the setting of the label provider to add support for the search...
        Overrides:
        setLabelProvider in class org.eclipse.jface.viewers.ColumnViewer
      • setFilters

        public void setFilters​(org.eclipse.jface.viewers.ViewerFilter... filters)
        Called to set the filters on this viewer.
        Overrides:
        setFilters in class org.eclipse.jface.viewers.StructuredViewer
      • getFilterInstance

        public EndNodeTextFilter getFilterInstance()
        Gets the filter instance.