当前位置: 首页>>代码示例>>Java>>正文


Java PhpIcons类代码示例

本文整理汇总了Java中com.jetbrains.php.PhpIcons的典型用法代码示例。如果您正苦于以下问题:Java PhpIcons类的具体用法?Java PhpIcons怎么用?Java PhpIcons使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PhpIcons类属于com.jetbrains.php包,在下文中一共展示了PhpIcons类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getExceptionTypes

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
private List<Trinity> getExceptionTypes() {
    List<Trinity> types = new ArrayList<Trinity>();

    types.add(new Trinity("Exception", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("Error", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("BadFunctionCallException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("BadMethodCallException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("DomainException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("InvalidArgumentException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("LengthException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("LogicException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("OutOfBoundsException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("OutOfRangeException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("OverflowException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("RangeException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("RuntimeException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("UnderflowException", PhpIcons.EXCEPTION, "PHP Exception"));
    types.add(new Trinity("UnexpectedValueException", PhpIcons.EXCEPTION, "PHP Exception"));

    return types;
}
 
开发者ID:aurimasniekis,项目名称:idea-php-class-templates,代码行数:22,代码来源:PhpNewExceptionClassDialog.java

示例2: getAvailableTemplates

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
private List<Trinity> getAvailableTemplates() {
    List<Trinity> templates = new ArrayList<Trinity>();

    FileTemplate classTemplate = FileTemplateManager.getInstance(this.myProject).getInternalTemplate("PHP Class");

    for (FileTemplate template : FileTemplateManager.getInstance(this.myProject).getAllTemplates()) {
        if (template.getExtension().equals("class.php")) {
            templates.add(new Trinity(template.getName(), PhpIcons.CLASS, template));
        }
    }

    if (templates.size() < 1) {
        templates.add(new Trinity(classTemplate.getName(), PhpIcons.CLASS, classTemplate));
    }

    return templates;
}
 
开发者ID:aurimasniekis,项目名称:idea-php-class-templates,代码行数:18,代码来源:PhpNewTemplateClassDialog.java

示例3: addCompletions

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@Override
protected void addCompletions(@NotNull CompletionParameters parameters,
                              ProcessingContext context,
                              @NotNull CompletionResultSet result) {
    PsiElement position = parameters.getPosition().getOriginalElement();
    if (position == null) {
        return;
    }

    Collection<String> keys = LayoutIndex.getAllKeys(ContainerNameIndex.KEY, position.getProject());
    for (String key: keys) {
        result.addElement(
            LookupElementBuilder.create(key).withIcon(PhpIcons.XML_TAG_ICON)
        );
    }
}
 
开发者ID:magento,项目名称:magento2-phpstorm-plugin,代码行数:17,代码来源:LayoutContainerCompletionContributor.java

示例4: addCompletions

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@Override
protected void addCompletions(@NotNull CompletionParameters parameters,
                              ProcessingContext context,
                              @NotNull CompletionResultSet result) {
    PsiElement position = parameters.getPosition().getOriginalElement();
    if (position == null) {
        return;
    }

    Collection<String> keys = LayoutIndex.getAllKeys(BlockNameIndex.KEY, position.getProject());
    for (String key: keys) {
        result.addElement(
            LookupElementBuilder.create(key).withIcon(PhpIcons.XML_TAG_ICON)
        );
    }
}
 
开发者ID:magento,项目名称:magento2-phpstorm-plugin,代码行数:17,代码来源:LayoutBlockCompletionContributor.java

示例5: addCompletions

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@Override
protected void addCompletions(@NotNull CompletionParameters parameters,
                              ProcessingContext context,
                              @NotNull CompletionResultSet result) {
    PsiElement position = parameters.getPosition().getOriginalElement();
    if (position == null) {
        return;
    }

    String prefix = result.getPrefixMatcher().getPrefix();

    DiIndex index = DiIndex.getInstance(position.getProject());
    Collection<String> elements = index.getAllVirtualTypeElementNames(new PlainPrefixMatcher(prefix), position.getResolveScope());

    for (String elementName:elements) {
        result.addElement(
                LookupElementBuilder
                        .create(elementName)
                        .withIcon(PhpIcons.CLASS_ICON)
        );
    }
}
 
开发者ID:magento,项目名称:magento2-phpstorm-plugin,代码行数:23,代码来源:VirtualTypeCompletionProvider.java

示例6: addCompletions

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@Override
protected void addCompletions(@NotNull CompletionParameters parameters,
                              ProcessingContext context,
                              @NotNull CompletionResultSet result) {
    PsiElement position = parameters.getPosition().getOriginalElement();
    if (position == null) {
        return;
    }

    List<XmlFile> targets = LayoutIndex.getLayoutFiles(position.getProject());
    if (targets.size() > 0) {
        for (XmlFile file : targets) {
            result.addElement(
                LookupElementBuilder
                        .create(file.getVirtualFile().getNameWithoutExtension())
                        .withIcon(PhpIcons.XML_TAG_ICON)
            );
        }
    }
}
 
开发者ID:magento,项目名称:magento2-phpstorm-plugin,代码行数:21,代码来源:LayoutUpdateCompletionContributor.java

示例7: getVariants

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@NotNull
@Override
public Object[] getVariants() {
    List<LookupElement> variants = new ArrayList<LookupElement>();
    List<String> definedArguments = getAlreadyConfiguredArguments();

    for (Parameter parameter: getParameters()) {
        String argumentName = parameter.getName();
        if (definedArguments.contains(argumentName)) {
            continue;
        }

        variants.add(
            LookupElementBuilder
                .create(argumentName)
                .withIcon(PhpIcons.PARAMETER)
                .withTypeText(parameter.getDeclaredType().toStringResolved())
        );
    }

    return variants.toArray();
}
 
开发者ID:dkvashninbay,项目名称:magento2plugin,代码行数:23,代码来源:ArgumentNameReference.java

示例8: getPresentation

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@Nullable
@Override
public ProviderPresentation getPresentation() {
    return new ProviderPresentation() {
        @Nullable
        @Override
        public Icon getIcon() {
            return PhpIcons.FUNCTION;
        }

        @Nullable
        @Override
        public String getDescription() {
            return "Functions";
        }
    };
}
 
开发者ID:Haehnchen,项目名称:idea-php-toolbox,代码行数:18,代码来源:FunctionProvider.java

示例9: collectPushOverwrites

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
/**
 * Support: @push('foobar')
 */
@NotNull
private Collection<LineMarkerInfo> collectPushOverwrites(@NotNull LeafPsiElement psiElement, @NotNull String sectionName) {
    final List<GotoRelatedItem> gotoRelatedItems = new ArrayList<>();

    BladeTemplateUtil.visitUpPath(psiElement.getContainingFile(), 10, parameter -> {
        if(sectionName.equalsIgnoreCase(parameter.getContent())) {
            gotoRelatedItems.add(new RelatedPopupGotoLineMarker.PopupGotoRelatedItem(parameter.getPsiElement()).withIcon(LaravelIcons.LARAVEL, LaravelIcons.LARAVEL));
        }
    }, BladeTokenTypes.STACK_DIRECTIVE);

    if(gotoRelatedItems.size() == 0) {
        return Collections.emptyList();
    }

    return Collections.singletonList(
        getRelatedPopover("Stack Section", "Stack Overwrites", psiElement, gotoRelatedItems, PhpIcons.OVERRIDES)
    );
}
 
开发者ID:Haehnchen,项目名称:idea-php-laravel-plugin,代码行数:22,代码来源:TemplateLineMarker.java

示例10: attachTemplateBlocks

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
public void attachTemplateBlocks(PsiElement psiElement, Collection<LineMarkerInfo> lineMarkerInfos) {

        SmartyBlockGoToHandler goToHandler = new SmartyBlockGoToHandler();
        PsiElement[] gotoDeclarationTargets = goToHandler.getGotoDeclarationTargets(psiElement, 0, null);

        if(gotoDeclarationTargets == null || gotoDeclarationTargets.length == 0) {
            return;
        }

        List<PsiElement> psiElements = Arrays.asList(gotoDeclarationTargets);
        if(psiElements.size() == 0) {
            return;
        }

        NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder.create(PhpIcons.OVERRIDES).
            setTargets(psiElements).
            setTooltipText("Navigate to block");

        lineMarkerInfos.add(builder.createLineMarkerInfo(psiElement));

    }
 
开发者ID:Haehnchen,项目名称:idea-php-shopware-plugin,代码行数:22,代码来源:SmartyTemplateLineMarkerProvider.java

示例11: attachExtends

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
public void attachExtends(final SmartyFile smartyFile, final List<GotoRelatedItem> gotoRelatedItems) {

        final String templateName = TemplateUtil.getTemplateName(smartyFile.getProject(), smartyFile.getVirtualFile());
        if(templateName == null) {
            return;
        }

        FileBasedIndexImpl.getInstance().getFilesWithKey(SmartyExtendsStubIndex.KEY, new HashSet<>(Arrays.asList(templateName)), virtualFile -> {

            PsiFile psiFile = PsiManager.getInstance(smartyFile.getProject()).findFile(virtualFile);
            if(psiFile != null) {
                gotoRelatedItems.add(new RelatedPopupGotoLineMarker.PopupGotoRelatedItem(psiFile, TemplateUtil.getTemplateName(psiFile.getProject(), psiFile.getVirtualFile())).withIcon(PhpIcons.IMPLEMENTED, PhpIcons.IMPLEMENTED));
            }

            return true;
        }, GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.allScope(smartyFile.getProject()), SmartyFileType.INSTANCE));

    }
 
开发者ID:Haehnchen,项目名称:idea-php-shopware-plugin,代码行数:19,代码来源:SmartyTemplateLineMarkerProvider.java

示例12: getVariants

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@NotNull
@Override
public Object[] getVariants() {

    final List<LookupElement> lookupElements = new ArrayList<>();

    PhpClass phpClass = PsiTreeUtil.getParentOfType(getElement(), PhpClass.class);
    if(phpClass == null) {
        return lookupElements.toArray();
    }

    for(Method method: phpClass.getMethods()) {
        if(method.getModifier().isPublic() && !method.getName().startsWith("_")) {
            lookupElements.add(LookupElementBuilder.create(method.getName()).withIcon(PhpIcons.METHOD).withTypeText("Method", true));
        }
    }

    return lookupElements.toArray();
}
 
开发者ID:Haehnchen,项目名称:idea-php-shopware-plugin,代码行数:20,代码来源:EventSubscriberReferenceContributor.java

示例13: renderElement

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    super.renderElement(presentation);

    presentation.setItemTextBold(withBoldness);
    presentation.setIcon(Symfony2Icons.DOCTRINE);
    presentation.setTypeGrayed(true);

    if(this.doctrineModelField.getTypeName() != null) {
        presentation.setTypeText(this.doctrineModelField.getTypeName());
    }

    if(this.doctrineModelField.getRelationType() != null) {
        presentation.setTailText(String.format("(%s)", this.doctrineModelField.getRelationType()), true);
    }

    if(this.doctrineModelField.getRelation() != null) {
        presentation.setTypeText(this.doctrineModelField.getRelation());
        presentation.setIcon(PhpIcons.CLASS_ICON);
    }

}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:23,代码来源:DoctrineModelFieldLookupElement.java

示例14: renderRequestDetails

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
private void renderRequestDetails(@NotNull ProfilerRequestInterface profilerRequest) {
    DefaultListModel<RequestDetails> listModel = (DefaultListModel<RequestDetails>) listRequestDetails.getModel();
    listModel.removeAllElements();

    DefaultDataCollectorInterface defaultDataCollector = profilerRequest.getCollector(DefaultDataCollectorInterface.class);
    if(defaultDataCollector != null) {
        if(defaultDataCollector.getRoute() != null) {
            listModel.addElement(new RequestDetails(defaultDataCollector.getRoute(), Symfony2Icons.ROUTE));
        }

        if(defaultDataCollector.getController() != null) {
            listModel.addElement(new RequestDetails(defaultDataCollector.getController(), PhpIcons.METHOD_ICON));
        }

        if(defaultDataCollector.getTemplate() != null) {
            listModel.addElement(new RequestDetails(defaultDataCollector.getTemplate(), TwigIcons.TwigFileIcon));
        }
    }
}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:20,代码来源:Symfony2WebProfilerForm.java

示例15: getPresentation

import com.jetbrains.php.PhpIcons; //导入依赖的package包/类
@Nullable
@Override
public ProviderPresentation getPresentation() {
    return new ProviderPresentation() {
        @Nullable
        @Override
        public Icon getIcon() {
            return PhpIcons.METHOD_ICON;
        }

        @Nullable
        @Override
        public String getDescription() {
            return "Controller";
        }
    };
}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:18,代码来源:ControllerToolboxProvider.java


注:本文中的com.jetbrains.php.PhpIcons类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。