Search in sources :

Example 1 with PerlPackageUtil.__PACKAGE__

use of com.perl5.lang.perl.util.PerlPackageUtil.__PACKAGE__ in project Perl5-IDEA by Camelcade.

the class PerlPackageCompletionUtil method processAllNamespacesNames.

public static boolean processAllNamespacesNames(@NotNull PerlCompletionProcessor completionProcessor, boolean appendNamespaceSeparator, boolean addPackageTag) {
    PsiElement element = completionProcessor.getLeafElement();
    final Project project = element.getProject();
    Processor<PerlNamespaceDefinitionElement> namespaceProcessor = namespace -> processNamespaceLookupElement(namespace, completionProcessor, appendNamespaceSeparator);
    PerlBuiltInNamespacesService.getInstance(project).processNamespaces(namespaceProcessor);
    if (addPackageTag && !PerlPackageCompletionUtil.processPackageLookupElement(null, __PACKAGE__, PACKAGE_GUTTER_ICON, completionProcessor, false)) {
        return false;
    }
    return processFirstNamespaceForEachName(completionProcessor, project, element.getResolveScope(), namespaceProcessor);
}
Also used : InsertHandler(com.intellij.codeInsight.completion.InsertHandler) PerlFileImpl(com.perl5.lang.perl.psi.impl.PerlFileImpl) Lookup(com.intellij.codeInsight.lookup.Lookup) PerlFeaturesTable(com.perl5.lang.perl.internals.PerlFeaturesTable) PerlPackageUtil(com.perl5.lang.perl.util.PerlPackageUtil) VirtualFile(com.intellij.openapi.vfs.VirtualFile) AutoPopupController(com.intellij.codeInsight.AutoPopupController) PerlIcons(com.perl5.PerlIcons) Map(java.util.Map) PsiElement(com.intellij.psi.PsiElement) PerlVersion(com.perl5.lang.perl.internals.PerlVersion) Project(com.intellij.openapi.project.Project) PsiFile(com.intellij.psi.PsiFile) PerlBuiltInNamespacesService(com.perl5.lang.perl.psi.references.PerlBuiltInNamespacesService) Logger(com.intellij.openapi.diagnostic.Logger) PACKAGE_GUTTER_ICON(com.perl5.PerlIcons.PACKAGE_GUTTER_ICON) LookupElementBuilder(com.intellij.codeInsight.lookup.LookupElementBuilder) LookupElement(com.intellij.codeInsight.lookup.LookupElement) StringUtil(com.intellij.openapi.util.text.StringUtil) Collection(java.util.Collection) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) PerlPackageUtil.__PACKAGE__(com.perl5.lang.perl.util.PerlPackageUtil.__PACKAGE__) Processor(com.intellij.util.Processor) ObjectUtils(com.intellij.util.ObjectUtils) PerlFileTypePackage(com.perl5.lang.perl.fileTypes.PerlFileTypePackage) PerlSimpleDelegatingCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlSimpleDelegatingCompletionProcessor) PerlNamespaceDefinitionElement(com.perl5.lang.perl.psi.PerlNamespaceDefinitionElement) NotNull(org.jetbrains.annotations.NotNull) PerlCompletionProcessor(com.perl5.lang.perl.idea.completion.providers.processors.PerlCompletionProcessor) PerlTimeLogger(com.perl5.lang.perl.util.PerlTimeLogger) javax.swing(javax.swing) Project(com.intellij.openapi.project.Project) PerlNamespaceDefinitionElement(com.perl5.lang.perl.psi.PerlNamespaceDefinitionElement) PsiElement(com.intellij.psi.PsiElement)

Aggregations

AutoPopupController (com.intellij.codeInsight.AutoPopupController)1 InsertHandler (com.intellij.codeInsight.completion.InsertHandler)1 Lookup (com.intellij.codeInsight.lookup.Lookup)1 LookupElement (com.intellij.codeInsight.lookup.LookupElement)1 LookupElementBuilder (com.intellij.codeInsight.lookup.LookupElementBuilder)1 Logger (com.intellij.openapi.diagnostic.Logger)1 Project (com.intellij.openapi.project.Project)1 StringUtil (com.intellij.openapi.util.text.StringUtil)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 PsiElement (com.intellij.psi.PsiElement)1 PsiFile (com.intellij.psi.PsiFile)1 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)1 ObjectUtils (com.intellij.util.ObjectUtils)1 Processor (com.intellij.util.Processor)1 PerlIcons (com.perl5.PerlIcons)1 PACKAGE_GUTTER_ICON (com.perl5.PerlIcons.PACKAGE_GUTTER_ICON)1 PerlFileTypePackage (com.perl5.lang.perl.fileTypes.PerlFileTypePackage)1 PerlCompletionProcessor (com.perl5.lang.perl.idea.completion.providers.processors.PerlCompletionProcessor)1 PerlSimpleDelegatingCompletionProcessor (com.perl5.lang.perl.idea.completion.providers.processors.PerlSimpleDelegatingCompletionProcessor)1 PerlFeaturesTable (com.perl5.lang.perl.internals.PerlFeaturesTable)1