Class SelectPropViewerFilter

java.lang.Object
org.eclipse.jface.viewers.ViewerFilter
com.iizigo.prop.editor.dialog.SelectPropViewerFilter
Direct Known Subclasses:
ImageDefinitionFilter

public class SelectPropViewerFilter extends org.eclipse.jface.viewers.ViewerFilter
A viewer filter for extends properties.
Author:
Christopher Mindus
  • Constructor Details

    • SelectPropViewerFilter

      public SelectPropViewerFilter()
      Creates the viewer filter for no accept.
    • SelectPropViewerFilter

      public SelectPropViewerFilter(Class<?>[] possibleClasses)
      Creates the viewer filter.
      Parameters:
      possibleClasses - The classes that can be end nodes, null for none..
  • Method Details

    • setValidModules

      public void setValidModules(ModuleModel[] modules)
      Sets the valid projects for the workspace root.
      Parameters:
      modules - The valid modules array, or null for all (default).
    • add

      public SelectPropViewerFilter add(Class<?>... cs)
      Adds other class to the same filter.
      Parameters:
      cs - The new classes to add.
      Returns:
      The same instance.
    • addFilter

      public void addFilter(org.eclipse.jface.viewers.ViewerFilter filter)
      Adds an additional filter.
    • select

      public boolean select(org.eclipse.jface.viewers.Viewer viewer, Object parentElement, Object element)
      Filters what is passed through.
      Specified by:
      select in class org.eclipse.jface.viewers.ViewerFilter
    • isValidSelection

      public boolean isValidSelection(PropCnr pc)
      Checks if a property is of a valid class to be selected as final selection.
      Parameters:
      pc - The property.
      Returns:
      If OK, false if a child of this container may be selectable.
    • isValid

      public boolean isValid(PropCnr pc)
      Checks for a valid class in this property of its children.