Class IndexFilter


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

      • 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 Detail

      • IndexFilter

        public IndexFilter()
    • Method Detail

      • 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
      • 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