use of com.perl5.lang.perl.idea.codeInsight.typeInference.value.PerlCallStaticValue in project Perl5-IDEA by Camelcade.
the class PerlSubCallCompletionProvider method addCompletions.
@Override
public void addCompletions(@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet resultSet) {
PsiElement position = parameters.getPosition();
PsiElement method = position.getParent();
assert method instanceof PsiPerlMethod;
PerlCallValue perlValue = PerlCallValue.from(method);
if (perlValue == null) {
return;
}
PerlSimpleCompletionProcessor completionProcessor = new PerlSimpleCompletionProcessor(parameters, resultSet, position);
PerlTimeLogger logger = PerlTimeLogger.create(LOG);
if (perlValue instanceof PerlCallStaticValue && !((PerlCallStaticValue) perlValue).hasExplicitNamespace()) {
PerlSubCompletionUtil.processBuiltInSubsLookupElements(completionProcessor);
logger.debug("Processed built-in subs");
}
PerlSubCompletionUtil.processSubsCompletionsForCallValue(completionProcessor, perlValue, perlValue instanceof PerlCallStaticValue);
logger.debug("Processed subs for call value");
completionProcessor.logStatus(getClass());
}
Aggregations