Class IndexFilter

java.lang.Object
org.eclipse.cdt.core.index.IndexFilter

public abstract class IndexFilter extends Object
Can be subclassed and used for queries in the index.
Since:
4.0
  • Field Details

    • ALL

      public static final IndexFilter ALL
    • ALL_DECLARED

      public static final IndexFilter ALL_DECLARED
    • ALL_DECLARED_OR_IMPLICIT

      public static final IndexFilter ALL_DECLARED_OR_IMPLICIT
    • CPP_DECLARED_OR_IMPLICIT

      public static final IndexFilter CPP_DECLARED_OR_IMPLICIT
    • CPP_DECLARED_OR_IMPLICIT_NO_INSTANCE

      public static final IndexFilter CPP_DECLARED_OR_IMPLICIT_NO_INSTANCE
      Since:
      5.1
    • C_DECLARED_OR_IMPLICIT

      public static final IndexFilter C_DECLARED_OR_IMPLICIT
  • Constructor Details

    • IndexFilter

      public IndexFilter()
  • Method Details

    • getFilter

      public static IndexFilter getFilter(int linkageID)
      Get an IndexFilter that filters out bindings from linkages other than that specified.
      Parameters:
      linkageID - the id of the linkage whose bindings should be retained
      Returns:
      an IndexFilter instance
    • getDeclaredBindingFilter

      public static IndexFilter getDeclaredBindingFilter(int linkageID, boolean acceptImplicit)
      Get an IndexFilter that filters out bindings without declarations and those from linkages other than that specified.
      Parameters:
      linkageID - the id of the linkage whose bindings should be retained, or -1 to accept all linkages.
      Returns:
      an IndexFilter instance
    • getDeclaredBindingFilter

      public static IndexFilter getDeclaredBindingFilter(int linkageID, boolean acceptImplicit, boolean allowInstances)
      Get an IndexFilter that filters out bindings without declarations and those from linkages other than that specified.
      Parameters:
      linkageID - the id of the linkage whose bindings should be retained, or -1 to accept all linkages.
      Returns:
      an IndexFilter instance
      Since:
      5.1
    • acceptLinkage

      public boolean acceptLinkage(ILinkage linkage)
      Returns whether or not to include objects of the given linkage in the query.
      Parameters:
      linkage - a linkage to be tested
      Returns:
      whether to include objects of the given linkage in the query.
      See Also:
    • acceptBinding

      public boolean acceptBinding(IBinding binding) throws org.eclipse.core.runtime.CoreException
      Determines whether or not a binding is valid.
      Parameters:
      binding - the binding being checked for validity
      Returns:
      whether or not the binding is valid
      Throws:
      org.eclipse.core.runtime.CoreException