Search in sources :

Example 1 with PerlVariableCompletionProcessor

use of com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor in project Perl5-IDEA by Camelcade.

the class PerlVariableCompletionUtil method createVariableLookupProcessor.

/**
 * @return processor of variable declarations, generating lookup elements for them and feeding to the {@code lookupConsumer}
 */
@NotNull
private static Processor<PerlVariableDeclarationElement> createVariableLookupProcessor(@NotNull PerlVariableCompletionProcessor completionProcessor) {
    PsiElement perlVariable = completionProcessor.getLeafParentElement();
    boolean addHashSlices = hasHashSlices(perlVariable);
    PerlDelegatingVariableCompletionProcessor hashElementCompletionProcessor = new PerlDelegatingVariableCompletionProcessor(completionProcessor) {

        @Override
        public void addElement(@NotNull LookupElementBuilder lookupElement) {
            super.addElement(lookupElement.withInsertHandler(PerlInsertHandlers.HASH_ELEMENT_INSERT_HANDLER).withTailText("{}"));
        }
    };
    PerlDelegatingVariableCompletionProcessor arrayElementCompletionProcessor = new PerlDelegatingVariableCompletionProcessor(completionProcessor) {

        @Override
        public void addElement(@NotNull LookupElementBuilder lookupElement) {
            super.addElement(lookupElement.withInsertHandler(PerlInsertHandlers.ARRAY_ELEMENT_INSERT_HANDLER).withTailText("[]"));
        }
    };
    if (perlVariable instanceof PsiPerlScalarVariable) {
        return variable -> {
            if (variable.getActualType() == PerlVariableType.SCALAR) {
                return processVariableLookupElement(variable, '_', completionProcessor);
            } else if (variable.getActualType() == PerlVariableType.ARRAY) {
                return processVariableLookupElement(variable, '_', arrayElementCompletionProcessor);
            } else if (variable.getActualType() == PerlVariableType.HASH) {
                return processVariableLookupElement(variable, '_', hashElementCompletionProcessor);
            }
            return completionProcessor.result();
        };
    } else if (perlVariable instanceof PsiPerlArrayVariable) {
        return variable -> {
            if (variable.getActualType() == PerlVariableType.ARRAY) {
                return processVariableLookupElement(variable, '_', completionProcessor) && processVariableLookupElement(variable, '_', arrayElementCompletionProcessor);
            } else if (variable.getActualType() == PerlVariableType.HASH) {
                return processVariableLookupElement(variable, '_', hashElementCompletionProcessor);
            }
            return completionProcessor.result();
        };
    } else if (perlVariable instanceof PsiPerlArrayIndexVariable) {
        return variable -> {
            if (variable.getActualType() == PerlVariableType.ARRAY) {
                return processVariableLookupElement(variable, '_', completionProcessor);
            }
            return completionProcessor.result();
        };
    } else if (perlVariable instanceof PsiPerlHashVariable) {
        return variable -> {
            PerlVariableType variableType = variable.getActualType();
            if (variableType == PerlVariableType.HASH) {
                return processVariableLookupElement(variable, '_', completionProcessor) && (!addHashSlices || processVariableLookupElement(variable, '_', hashElementCompletionProcessor));
            } else if (addHashSlices && variableType == PerlVariableType.ARRAY) {
                return processVariableLookupElement(variable, '_', arrayElementCompletionProcessor);
            }
            return completionProcessor.result();
        };
    } else if (perlVariable instanceof PerlGlobVariable) {
        return variable -> processVariableLookupElement(variable, '_', completionProcessor);
    }
    return variable -> {
        PerlVariableType variableType = variable.getActualType();
        if (variableType == PerlVariableType.SCALAR) {
            return processVariableLookupElement(variable, PerlVariableType.SCALAR.getSigil(), completionProcessor);
        } else if (variableType == PerlVariableType.ARRAY) {
            return processVariableLookupElement(variable, PerlVariableType.ARRAY.getSigil(), completionProcessor) && processVariableLookupElement(variable, PerlVariableType.SCALAR.getSigil(), arrayElementCompletionProcessor) && processVariableLookupElement(variable, PerlVariableType.ARRAY.getSigil(), arrayElementCompletionProcessor);
        } else if (variable.getActualType() == PerlVariableType.HASH) {
            return processVariableLookupElement(variable, PerlVariableType.HASH.getSigil(), completionProcessor) && processVariableLookupElement(variable, PerlVariableType.SCALAR.getSigil(), hashElementCompletionProcessor) && processVariableLookupElement(variable, PerlVariableType.ARRAY.getSigil(), hashElementCompletionProcessor);
        }
        return completionProcessor.result();
    };
}
Also used : PerlBundle(com.perl5.PerlBundle) GLOB_GUTTER_ICON(com.perl5.PerlIcons.GLOB_GUTTER_ICON) PerlDelegatingVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlDelegatingVariableCompletionProcessor) THashSet(gnu.trove.THashSet) ContainerUtil(com.intellij.util.containers.ContainerUtil) PerlInsertHandlers(com.perl5.lang.perl.idea.completion.PerlInsertHandlers) PerlLexicalScope(com.perl5.lang.perl.psi.properties.PerlLexicalScope) PerlVariableCompletionProcessorImpl(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessorImpl) PsiTreeUtil(com.intellij.psi.util.PsiTreeUtil) PerlExportDescriptor(com.perl5.lang.perl.extensions.packageprocessor.PerlExportDescriptor) PerlSharedSettings(com.perl5.lang.perl.idea.configuration.settings.PerlSharedSettings) PsiElement(com.intellij.psi.PsiElement) PerlVersion(com.perl5.lang.perl.internals.PerlVersion) Project(com.intellij.openapi.project.Project) com.perl5.lang.perl.psi(com.perl5.lang.perl.psi) PerlIconProvider(com.perl5.lang.perl.idea.ui.PerlIconProvider) PerlBuiltInVariablesService(com.perl5.lang.perl.psi.references.PerlBuiltInVariablesService) CompletionUtil(com.intellij.codeInsight.completion.CompletionUtil) com.perl5.lang.perl.util(com.perl5.lang.perl.util) PsiScopeProcessor(com.intellij.psi.scope.PsiScopeProcessor) PerlVariableType(com.perl5.lang.perl.psi.utils.PerlVariableType) LookupElementBuilder(com.intellij.codeInsight.lookup.LookupElementBuilder) LookupElement(com.intellij.codeInsight.lookup.LookupElement) StringUtil(com.intellij.openapi.util.text.StringUtil) Predicate(java.util.function.Predicate) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) Set(java.util.Set) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) PerlBuiltInVariable(com.perl5.lang.perl.psi.impl.PerlBuiltInVariable) PerlCompletionWeighter(com.perl5.lang.perl.idea.PerlCompletionWeighter) Processor(com.intellij.util.Processor) PerlResolveUtil(com.perl5.lang.perl.psi.utils.PerlResolveUtil) NotNull(org.jetbrains.annotations.NotNull) PerlVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor) PerlNamespaceEntityProcessor(com.perl5.lang.perl.util.processors.PerlNamespaceEntityProcessor) javax.swing(javax.swing) PerlVariableType(com.perl5.lang.perl.psi.utils.PerlVariableType) PerlDelegatingVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlDelegatingVariableCompletionProcessor) LookupElementBuilder(com.intellij.codeInsight.lookup.LookupElementBuilder) NotNull(org.jetbrains.annotations.NotNull) PsiElement(com.intellij.psi.PsiElement) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with PerlVariableCompletionProcessor

use of com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor in project Perl5-IDEA by Camelcade.

the class PerlVariableCompletionUtil method processVariableLookupElement.

/**
 * @param sigilToPrepend '_' means we don't need to prepend
 */
public static boolean processVariableLookupElement(@NotNull PerlVariableDeclarationElement element, char sigilToPrepend, @NotNull PerlVariableCompletionProcessor completionProcessor) {
    String variableName = StringUtil.notNullize(element.getName());
    if (!completionProcessor.hasBraces()) {
        variableName = PerlVariable.braceName(variableName);
    }
    boolean isBuiltIn = element instanceof PerlBuiltInVariable;
    String explicitNamespaceName = completionProcessor.getExplicitNamespaceName();
    if (StringUtil.isNotEmpty(explicitNamespaceName) && !isBuiltIn && element.isGlobalDeclaration() && !explicitNamespaceName.equals(element.getNamespaceName())) {
        return completionProcessor.result();
    }
    String lookupString = variableName;
    if (!isBuiltIn && element.isGlobalDeclaration() && !completionProcessor.isLexical()) {
        lookupString = element.getCanonicalName();
        if (StringUtil.isEmpty(lookupString)) {
            return completionProcessor.result();
        }
    }
    if (completionProcessor.isFullQualified()) {
        if (!completionProcessor.matches(lookupString)) {
            return completionProcessor.result();
        }
    } else {
        if (!completionProcessor.matches(variableName)) {
            return completionProcessor.result();
        }
    }
    Icon icon;
    if (sigilToPrepend != '_') {
        lookupString = sigilToPrepend + lookupString;
        icon = PerlVariableType.bySigil(sigilToPrepend).getIcon();
    } else {
        icon = PerlIconProvider.getIcon(element);
    }
    LookupElementBuilder elementBuilder = LookupElementBuilder.create(element, lookupString).withIcon(icon).withPresentableText(variableName);
    if (isBuiltIn) {
        elementBuilder = elementBuilder.withTypeText(PerlBundle.message("built.in.type.text"));
    } else if (element.isGlobalDeclaration()) {
        elementBuilder = elementBuilder.withTypeText(element.getNamespaceName(), true);
    }
    return completionProcessor.process(sigilToPrepend == '_' ? elementBuilder : elementBuilder.withLookupString(completionProcessor.isFullQualified() ? StringUtil.notNullize(element.getCanonicalName()) : variableName));
}
Also used : PerlBuiltInVariable(com.perl5.lang.perl.psi.impl.PerlBuiltInVariable) LookupElementBuilder(com.intellij.codeInsight.lookup.LookupElementBuilder)

Example 3 with PerlVariableCompletionProcessor

use of com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor in project Perl5-IDEA by Camelcade.

the class PerlVariableCompletionProvider method addCompletions.

@Override
protected void addCompletions(@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet resultSet) {
    if (!Experiments.getInstance().isFeatureEnabled("perl5.completion.var.without.sigil")) {
        return;
    }
    PsiElement subName = parameters.getPosition();
    PsiElement method = subName.getParent();
    String namespaceName = null;
    if (!(method instanceof PsiPerlMethod) || ((PsiPerlMethod) method).isObjectMethod()) {
        return;
    }
    namespaceName = ((PsiPerlMethod) method).getExplicitNamespaceName();
    if (StringUtil.isNotEmpty(namespaceName)) {
        resultSet = resultSet.withPrefixMatcher(PerlPackageUtil.join(namespaceName, resultSet.getPrefixMatcher().getPrefix()));
    }
    PerlVariableCompletionProcessor variableCompletionProcessor = new PerlVariableCompletionProcessorImpl(parameters, resultSet, subName, namespaceName, false, false, false);
    PerlTimeLogger logger = PerlTimeLogger.create(LOG);
    PerlVariableCompletionUtil.processVariables(variableCompletionProcessor, logger);
    variableCompletionProcessor.logStatus(getClass());
}
Also used : PerlVariableCompletionProcessorImpl(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessorImpl) PsiPerlMethod(com.perl5.lang.perl.psi.PsiPerlMethod) PerlVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor) PerlTimeLogger(com.perl5.lang.perl.util.PerlTimeLogger) PsiElement(com.intellij.psi.PsiElement)

Example 4 with PerlVariableCompletionProcessor

use of com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor in project Perl5-IDEA by Camelcade.

the class PerlVariableCompletionUtil method fillWithImportedVariables.

public static void fillWithImportedVariables(@NotNull PerlVariableCompletionProcessor variableCompletionProcessor) {
    PerlNamespaceDefinitionElement namespaceContainer = PerlPackageUtil.getNamespaceContainerForElement(variableCompletionProcessor.getLeafElement());
    if (namespaceContainer == null) {
        return;
    }
    namespaceContainer = CompletionUtil.getOriginalOrSelf(namespaceContainer);
    String packageName = namespaceContainer.getNamespaceName();
    if (StringUtil.isEmpty(packageName)) {
        return;
    }
    PerlNamespaceEntityProcessor<PerlExportDescriptor> processor = null;
    PsiElement perlVariable = variableCompletionProcessor.getLeafParentElement();
    if (perlVariable instanceof PsiPerlScalarVariable) {
        processor = (namespaceName, descriptor) -> {
            LookupElementBuilder lookupElement = null;
            String entityName = descriptor.getImportedName();
            if (!variableCompletionProcessor.matches(entityName)) {
                return variableCompletionProcessor.result();
            }
            if (descriptor.isScalar()) {
                lookupElement = processVariableLookupElement(entityName, PerlVariableType.SCALAR);
            } else if (descriptor.isArray()) {
                lookupElement = processVariableLookupElement(entityName, PerlVariableType.ARRAY);
            } else if (descriptor.isHash()) {
                lookupElement = processVariableLookupElement(entityName, PerlVariableType.HASH);
            }
            if (lookupElement != null) {
                return variableCompletionProcessor.process(lookupElement.withTypeText(descriptor.getRealPackage(), true));
            }
            return variableCompletionProcessor.result();
        };
    } else if (perlVariable instanceof PsiPerlArrayVariable || perlVariable instanceof PsiPerlArrayIndexVariable) {
        processor = (namespaceName, descriptor) -> {
            LookupElementBuilder lookupElement = null;
            String entityName = descriptor.getImportedName();
            if (!variableCompletionProcessor.matches(entityName)) {
                return variableCompletionProcessor.result();
            }
            if (descriptor.isArray()) {
                lookupElement = createArrayElementLookupElement(entityName, PerlVariableType.ARRAY);
            } else if (descriptor.isHash()) {
                lookupElement = processHashElementLookupElement(entityName, PerlVariableType.HASH);
            }
            if (lookupElement != null) {
                return variableCompletionProcessor.process(lookupElement.withTypeText(descriptor.getRealPackage(), true));
            }
            return variableCompletionProcessor.result();
        };
    } else if (perlVariable instanceof PsiPerlHashVariable) {
        processor = (namespaceName, descriptor) -> {
            LookupElementBuilder lookupElement = null;
            if (descriptor.isHash()) {
                String entityName = descriptor.getImportedName();
                if (!variableCompletionProcessor.matches(entityName)) {
                    return variableCompletionProcessor.result();
                }
                lookupElement = processVariableLookupElement(entityName, PerlVariableType.HASH);
            }
            if (lookupElement != null) {
                return variableCompletionProcessor.process(lookupElement.withTypeText(descriptor.getRealPackage(), true));
            }
            return variableCompletionProcessor.result();
        };
    }
    if (processor != null) {
        namespaceContainer.processExportDescriptors(processor);
    }
}
Also used : PerlBundle(com.perl5.PerlBundle) GLOB_GUTTER_ICON(com.perl5.PerlIcons.GLOB_GUTTER_ICON) PerlDelegatingVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlDelegatingVariableCompletionProcessor) THashSet(gnu.trove.THashSet) ContainerUtil(com.intellij.util.containers.ContainerUtil) PerlInsertHandlers(com.perl5.lang.perl.idea.completion.PerlInsertHandlers) PerlLexicalScope(com.perl5.lang.perl.psi.properties.PerlLexicalScope) PerlVariableCompletionProcessorImpl(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessorImpl) PsiTreeUtil(com.intellij.psi.util.PsiTreeUtil) PerlExportDescriptor(com.perl5.lang.perl.extensions.packageprocessor.PerlExportDescriptor) PerlSharedSettings(com.perl5.lang.perl.idea.configuration.settings.PerlSharedSettings) PsiElement(com.intellij.psi.PsiElement) PerlVersion(com.perl5.lang.perl.internals.PerlVersion) Project(com.intellij.openapi.project.Project) com.perl5.lang.perl.psi(com.perl5.lang.perl.psi) PerlIconProvider(com.perl5.lang.perl.idea.ui.PerlIconProvider) PerlBuiltInVariablesService(com.perl5.lang.perl.psi.references.PerlBuiltInVariablesService) CompletionUtil(com.intellij.codeInsight.completion.CompletionUtil) com.perl5.lang.perl.util(com.perl5.lang.perl.util) PsiScopeProcessor(com.intellij.psi.scope.PsiScopeProcessor) PerlVariableType(com.perl5.lang.perl.psi.utils.PerlVariableType) LookupElementBuilder(com.intellij.codeInsight.lookup.LookupElementBuilder) LookupElement(com.intellij.codeInsight.lookup.LookupElement) StringUtil(com.intellij.openapi.util.text.StringUtil) Predicate(java.util.function.Predicate) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) Set(java.util.Set) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) PerlBuiltInVariable(com.perl5.lang.perl.psi.impl.PerlBuiltInVariable) PerlCompletionWeighter(com.perl5.lang.perl.idea.PerlCompletionWeighter) Processor(com.intellij.util.Processor) PerlResolveUtil(com.perl5.lang.perl.psi.utils.PerlResolveUtil) NotNull(org.jetbrains.annotations.NotNull) PerlVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor) PerlNamespaceEntityProcessor(com.perl5.lang.perl.util.processors.PerlNamespaceEntityProcessor) javax.swing(javax.swing) PerlExportDescriptor(com.perl5.lang.perl.extensions.packageprocessor.PerlExportDescriptor) LookupElementBuilder(com.intellij.codeInsight.lookup.LookupElementBuilder) PsiElement(com.intellij.psi.PsiElement)

Example 5 with PerlVariableCompletionProcessor

use of com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor in project Perl5-IDEA by Camelcade.

the class PerlVariableCompletionUtil method processFullQualifiedVariables.

public static boolean processFullQualifiedVariables(@NotNull PerlVariableCompletionProcessor variableCompletionProcessor) {
    if (!variableCompletionProcessor.isFullQualified() && variableCompletionProcessor.getCompletionParameters().getInvocationCount() == 0) {
        return variableCompletionProcessor.result();
    }
    PsiElement variableNameElement = variableCompletionProcessor.getLeafElement();
    PsiElement perlVariable = variableCompletionProcessor.getLeafParentElement();
    Processor<PerlVariableDeclarationElement> variableProcessor = createVariableLookupProcessor(variableCompletionProcessor);
    Processor<PerlVariableDeclarationElement> lookupGenerator = it -> {
        if (!variableCompletionProcessor.isFullQualified() && VARIABLES_AVAILABLE_ONLY_WITH_FQN.contains(it.getName())) {
            return variableCompletionProcessor.result();
        }
        String idString = it.getCanonicalNameWithSigil();
        if (!variableCompletionProcessor.isRegistered(idString)) {
            return variableProcessor.process(it);
        }
        return variableCompletionProcessor.result();
    };
    Project project = variableNameElement.getProject();
    GlobalSearchScope resolveScope = variableNameElement.getResolveScope();
    String namespaceName = variableCompletionProcessor.getExplicitNamespaceName();
    if (perlVariable instanceof PsiPerlScalarVariable) {
        return PerlScalarUtil.processDefinedGlobalScalars(project, resolveScope, lookupGenerator, false, namespaceName) && PerlArrayUtil.processDefinedGlobalArrays(project, resolveScope, lookupGenerator, false, namespaceName) && PerlHashUtil.processDefinedGlobalHashes(project, resolveScope, lookupGenerator, false, namespaceName);
    } else if (perlVariable instanceof PsiPerlArrayVariable) {
        return PerlArrayUtil.processDefinedGlobalArrays(project, resolveScope, lookupGenerator, false, namespaceName) && PerlHashUtil.processDefinedGlobalHashes(project, resolveScope, lookupGenerator, false, namespaceName);
    } else if (perlVariable instanceof PsiPerlArrayIndexVariable) {
        // global arrays
        return PerlArrayUtil.processDefinedGlobalArrays(project, resolveScope, lookupGenerator, false, namespaceName);
    } else if (perlVariable instanceof PsiPerlHashVariable) {
        // global hashes
        return PerlHashUtil.processDefinedGlobalHashes(project, resolveScope, lookupGenerator, false, namespaceName) && (!hasHashSlices(perlVariable) || PerlArrayUtil.processDefinedGlobalArrays(project, resolveScope, lookupGenerator, false, namespaceName));
    } else {
        Processor<PerlGlobVariable> typeGlobProcessor = typeglob -> variableCompletionProcessor.process(processVariableLookupElement(typeglob, perlVariable instanceof PsiPerlMethod, variableCompletionProcessor));
        return PerlScalarUtil.processDefinedGlobalScalars(project, resolveScope, lookupGenerator, false, namespaceName) && PerlArrayUtil.processDefinedGlobalArrays(project, resolveScope, lookupGenerator, false, namespaceName) && PerlHashUtil.processDefinedGlobalHashes(project, resolveScope, lookupGenerator, false, namespaceName) && PerlGlobUtil.processDefinedGlobs(project, resolveScope, null, typeGlobProcessor, false, namespaceName);
    }
}
Also used : PerlBundle(com.perl5.PerlBundle) GLOB_GUTTER_ICON(com.perl5.PerlIcons.GLOB_GUTTER_ICON) PerlDelegatingVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlDelegatingVariableCompletionProcessor) THashSet(gnu.trove.THashSet) ContainerUtil(com.intellij.util.containers.ContainerUtil) PerlInsertHandlers(com.perl5.lang.perl.idea.completion.PerlInsertHandlers) PerlLexicalScope(com.perl5.lang.perl.psi.properties.PerlLexicalScope) PerlVariableCompletionProcessorImpl(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessorImpl) PsiTreeUtil(com.intellij.psi.util.PsiTreeUtil) PerlExportDescriptor(com.perl5.lang.perl.extensions.packageprocessor.PerlExportDescriptor) PerlSharedSettings(com.perl5.lang.perl.idea.configuration.settings.PerlSharedSettings) PsiElement(com.intellij.psi.PsiElement) PerlVersion(com.perl5.lang.perl.internals.PerlVersion) Project(com.intellij.openapi.project.Project) com.perl5.lang.perl.psi(com.perl5.lang.perl.psi) PerlIconProvider(com.perl5.lang.perl.idea.ui.PerlIconProvider) PerlBuiltInVariablesService(com.perl5.lang.perl.psi.references.PerlBuiltInVariablesService) CompletionUtil(com.intellij.codeInsight.completion.CompletionUtil) com.perl5.lang.perl.util(com.perl5.lang.perl.util) PsiScopeProcessor(com.intellij.psi.scope.PsiScopeProcessor) PerlVariableType(com.perl5.lang.perl.psi.utils.PerlVariableType) LookupElementBuilder(com.intellij.codeInsight.lookup.LookupElementBuilder) LookupElement(com.intellij.codeInsight.lookup.LookupElement) StringUtil(com.intellij.openapi.util.text.StringUtil) Predicate(java.util.function.Predicate) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) Set(java.util.Set) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) PerlBuiltInVariable(com.perl5.lang.perl.psi.impl.PerlBuiltInVariable) PerlCompletionWeighter(com.perl5.lang.perl.idea.PerlCompletionWeighter) Processor(com.intellij.util.Processor) PerlResolveUtil(com.perl5.lang.perl.psi.utils.PerlResolveUtil) NotNull(org.jetbrains.annotations.NotNull) PerlVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor) PerlNamespaceEntityProcessor(com.perl5.lang.perl.util.processors.PerlNamespaceEntityProcessor) javax.swing(javax.swing) PerlDelegatingVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlDelegatingVariableCompletionProcessor) PsiScopeProcessor(com.intellij.psi.scope.PsiScopeProcessor) Processor(com.intellij.util.Processor) PerlVariableCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor) PerlNamespaceEntityProcessor(com.perl5.lang.perl.util.processors.PerlNamespaceEntityProcessor) Project(com.intellij.openapi.project.Project) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) PsiElement(com.intellij.psi.PsiElement)

Aggregations

PsiElement (com.intellij.psi.PsiElement)6 PerlVariableCompletionProcessor (com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessor)6 PerlVariableCompletionProcessorImpl (com.perl5.lang.perl.idea.completion.providers.processors.PerlVariableCompletionProcessorImpl)6 LookupElementBuilder (com.intellij.codeInsight.lookup.LookupElementBuilder)5 PerlBuiltInVariable (com.perl5.lang.perl.psi.impl.PerlBuiltInVariable)5 CompletionUtil (com.intellij.codeInsight.completion.CompletionUtil)4 LookupElement (com.intellij.codeInsight.lookup.LookupElement)4 Project (com.intellij.openapi.project.Project)4 StringUtil (com.intellij.openapi.util.text.StringUtil)4 PsiScopeProcessor (com.intellij.psi.scope.PsiScopeProcessor)4 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)4 PsiTreeUtil (com.intellij.psi.util.PsiTreeUtil)4 Processor (com.intellij.util.Processor)4 ContainerUtil (com.intellij.util.containers.ContainerUtil)4 PerlBundle (com.perl5.PerlBundle)4 GLOB_GUTTER_ICON (com.perl5.PerlIcons.GLOB_GUTTER_ICON)4 PerlExportDescriptor (com.perl5.lang.perl.extensions.packageprocessor.PerlExportDescriptor)4 PerlCompletionWeighter (com.perl5.lang.perl.idea.PerlCompletionWeighter)4 PerlInsertHandlers (com.perl5.lang.perl.idea.completion.PerlInsertHandlers)4 PerlDelegatingVariableCompletionProcessor (com.perl5.lang.perl.idea.completion.providers.processors.PerlDelegatingVariableCompletionProcessor)4