Package org.eclipse.cdt.core.index
Class IndexFilter
java.lang.Object
org.eclipse.cdt.core.index.IndexFilter
Can be subclassed and used for queries in the index.
- Since:
- 4.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IndexFilter
static final IndexFilter
static final IndexFilter
static final IndexFilter
static final IndexFilter
static final IndexFilter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptBinding
(IBinding binding) Determines whether or not a binding is valid.boolean
acceptLinkage
(ILinkage linkage) Returns whether or not to include objects of the given linkage in the query.static IndexFilter
getDeclaredBindingFilter
(int linkageID, boolean acceptImplicit) Get an IndexFilter that filters out bindings without declarations and those from linkages other than that specified.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.static IndexFilter
getFilter
(int linkageID) Get an IndexFilter that filters out bindings from linkages other than that specified.
-
Field Details
-
ALL
-
ALL_DECLARED
-
ALL_DECLARED_OR_IMPLICIT
-
CPP_DECLARED_OR_IMPLICIT
-
CPP_DECLARED_OR_IMPLICIT_NO_INSTANCE
- Since:
- 5.1
-
C_DECLARED_OR_IMPLICIT
-
-
Constructor Details
-
IndexFilter
public IndexFilter()
-
-
Method Details
-
getFilter
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
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
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
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
-