Search in sources :

Example 1 with CompletionResultsProcessor

use of com.google.idea.blaze.base.lang.buildfile.completion.CompletionResultsProcessor in project intellij by bazelbuild.

the class LoadedSymbolReference method getVariants.

@Override
public Object[] getVariants() {
    PsiElement bzlFile = bzlFileReference.resolve();
    if (!(bzlFile instanceof BuildFile)) {
        return EMPTY_ARRAY;
    }
    CompletionResultsProcessor processor = new CompletionResultsProcessor(myElement, myElement.getQuoteType(), false);
    ((BuildFile) bzlFile).searchSymbolsInScope(processor, null);
    return processor.getResults().toArray();
}
Also used : BuildFile(com.google.idea.blaze.base.lang.buildfile.psi.BuildFile) PsiElement(com.intellij.psi.PsiElement) CompletionResultsProcessor(com.google.idea.blaze.base.lang.buildfile.completion.CompletionResultsProcessor)

Example 2 with CompletionResultsProcessor

use of com.google.idea.blaze.base.lang.buildfile.completion.CompletionResultsProcessor in project intellij by bazelbuild.

the class TargetReference method getVariants.

@Override
public Object[] getVariants() {
    CompletionResultsProcessor processor = new CompletionResultsProcessor(myElement, QuoteType.NoQuotes, true);
    ResolveUtil.searchInScope(myElement, processor);
    return processor.getResults().toArray();
}
Also used : CompletionResultsProcessor(com.google.idea.blaze.base.lang.buildfile.completion.CompletionResultsProcessor)

Example 3 with CompletionResultsProcessor

use of com.google.idea.blaze.base.lang.buildfile.completion.CompletionResultsProcessor in project intellij by bazelbuild.

the class LocalReference method getVariants.

@Override
public Object[] getVariants() {
    CompletionResultsProcessor processor = new CompletionResultsProcessor(myElement, QuoteType.NoQuotes, true);
    ResolveUtil.searchInScope(myElement, processor);
    return processor.getResults().toArray();
}
Also used : CompletionResultsProcessor(com.google.idea.blaze.base.lang.buildfile.completion.CompletionResultsProcessor)

Aggregations

CompletionResultsProcessor (com.google.idea.blaze.base.lang.buildfile.completion.CompletionResultsProcessor)3 BuildFile (com.google.idea.blaze.base.lang.buildfile.psi.BuildFile)1 PsiElement (com.intellij.psi.PsiElement)1