public abstract class IndexPatternSearch extends ExtensibleQueryFactory<IndexPatternOccurrence,IndexPatternSearch.SearchParameters>
Modifier and Type | Class and Description |
---|---|
static class |
IndexPatternSearch.SearchParameters |
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<QueryExecutor<IndexPatternOccurrence,IndexPatternSearch.SearchParameters>> |
EP_NAME |
Modifier | Constructor and Description |
---|---|
protected |
IndexPatternSearch() |
Modifier and Type | Method and Description |
---|---|
static int |
getOccurrencesCount(PsiFile file,
IndexPattern pattern)
Returns the number of occurrences of the specified pattern
in the specified file.
|
static int |
getOccurrencesCount(PsiFile file,
IndexPatternProvider patternProvider)
Returns the number of occurrences of any pattern from the specified provider
in the specified file.
|
protected abstract int |
getOccurrencesCountImpl(PsiFile file,
IndexPattern pattern) |
protected abstract int |
getOccurrencesCountImpl(PsiFile file,
IndexPatternProvider provider) |
static Query<IndexPatternOccurrence> |
search(PsiFile file,
IndexPattern pattern)
Returns a query which can be used to process occurrences of the specified pattern
in the specified file.
|
static Query<IndexPatternOccurrence> |
search(PsiFile file,
IndexPattern pattern,
int startOffset,
int endOffset)
Returns a query which can be used to process occurrences of the specified pattern
in the specified text range.
|
static Query<IndexPatternOccurrence> |
search(PsiFile file,
IndexPatternProvider patternProvider)
Returns a query which can be used to process occurrences of any pattern from the
specified provider in the specified file.
|
static Query<IndexPatternOccurrence> |
search(PsiFile file,
IndexPatternProvider patternProvider,
boolean multiLineOccurrences)
Returns a query which can be used to process occurrences of any pattern from the
specified provider in the specified file.
|
static Query<IndexPatternOccurrence> |
search(PsiFile file,
IndexPatternProvider patternProvider,
int startOffset,
int endOffset)
Returns a query which can be used to process occurrences of any pattern from the
specified provider in the specified text range.
|
getExecutors, registerExecutor, registerExecutor, unregisterExecutor
createQuery, createUniqueResultsQuery, createUniqueResultsQuery, createUniqueResultsQuery, hasAnyExecutors
public static final ExtensionPointName<QueryExecutor<IndexPatternOccurrence,IndexPatternSearch.SearchParameters>> EP_NAME
public static Query<IndexPatternOccurrence> search(PsiFile file, IndexPattern pattern)
file
- the file in which occurrences should be searched.pattern
- the pattern to search for.public static Query<IndexPatternOccurrence> search(PsiFile file, IndexPattern pattern, int startOffset, int endOffset)
file
- the file in which occurrences should be searched.pattern
- the pattern to search for.startOffset
- the start offset of the range to search.endOffset
- the end offset of the range to search.public static Query<IndexPatternOccurrence> search(PsiFile file, IndexPatternProvider patternProvider)
file
- the file in which occurrences should be searched.patternProvider
- the provider the patterns from which are searched.public static Query<IndexPatternOccurrence> search(PsiFile file, IndexPatternProvider patternProvider, boolean multiLineOccurrences)
file
- the file in which occurrences should be searched.patternProvider
- the provider the patterns from which are searched.multiLineOccurrences
- whether continuation of occurrences on following lines should be detected
(will be returned as IndexPatternOccurrence.getAdditionalTextRanges()
public static Query<IndexPatternOccurrence> search(PsiFile file, IndexPatternProvider patternProvider, int startOffset, int endOffset)
file
- the file in which occurrences should be searched.patternProvider
- the provider the patterns from which are searched.startOffset
- the start offset of the range to search.endOffset
- the end offset of the range to search.public static int getOccurrencesCount(PsiFile file, IndexPatternProvider patternProvider)
file
- the file in which occurrences should be searched.patternProvider
- the provider the patterns from which are searched.public static int getOccurrencesCount(PsiFile file, IndexPattern pattern)
file
- the file in which occurrences should be searched.pattern
- the pattern to search for.protected abstract int getOccurrencesCountImpl(PsiFile file, IndexPatternProvider provider)
protected abstract int getOccurrencesCountImpl(PsiFile file, IndexPattern pattern)