public static int getClassPosition(final PsiClass aClass) { if (aClass == null || !aClass.isValid()) { return 0; } try { int pos = aClass instanceof JspClass ? ElementPresentationUtil.CLASS_KIND_JSP : ElementPresentationUtil.getClassKind(aClass); //abstract class before concrete if (pos == ElementPresentationUtil.CLASS_KIND_CLASS || pos == ElementPresentationUtil.CLASS_KIND_EXCEPTION) { boolean isAbstract = aClass.hasModifierProperty(PsiModifier.ABSTRACT) && !aClass.isInterface(); if (isAbstract) { pos --; } } return pos; } catch (IndexNotReadyException e) { return 0; } }
@Override public Icon getElementIcon(final int flags) { Icon methodIcon = myBaseIcon != null ? myBaseIcon : hasModifierProperty(PsiModifier.ABSTRACT) ? PlatformIcons.ABSTRACT_METHOD_ICON : PlatformIcons.METHOD_ICON; RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(methodIcon, this, false); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }
@Override protected String calcTooltip() { T t = getValue(); if (t != null && t.isValid()) { return ElementPresentationUtil.getDescription(t); } return super.calcTooltip(); }
public Icon getIconForFile(final FileInfo file) { final PsiElement psiElement = file.getPsiElement(); final int basicClassKind = ElementPresentationUtil.getBasicClassKind((PsiClass) psiElement); return ElementPresentationUtil.getClassIconOfKind((PsiClass) psiElement, basicClassKind); }
@Override public Icon getElementIcon(final int flags) { Icon methodIcon = hasModifierProperty(PsiModifier.ABSTRACT) ? PlatformIcons.ABSTRACT_METHOD_ICON : PlatformIcons.METHOD_ICON; RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(methodIcon, this, false); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }
@Override public Icon getElementIcon(final int flags) { final RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(myBaseIcon, this, false); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }
@Override public Icon getElementIcon(final int flags) { final RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(PlatformIcons.VARIABLE_ICON, this, false); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }
@Override public Icon getElementIcon(final int flags) { final RowIcon baseIcon = createLayeredIcon(this, PlatformIcons.PARAMETER_ICON, 0); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }
@Override public Icon getElementIcon(final int flags) { final RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(PlatformIcons.FIELD_ICON, this, false); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }
@Override public Icon getElementIcon(int flags) { return ElementPresentationUtil.createLayeredIcon(PlatformIcons.CLASS_INITIALIZER, this, false); }
@Nullable @Override protected Icon getElementIcon(@IconFlags int flags) { RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(JetgroovyIcons.Groovy.Method, this, false); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }
private void setIcon(boolean isAbstract) { Icon icon = isAbstract ? PlatformIcons.ABSTRACT_METHOD_ICON : PlatformIcons.METHOD_ICON; final RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(icon, this, false); setBaseIcon(baseIcon); }
@Override public Icon getIcon(int flags) { RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(JetgroovyIcons.Groovy.Method, this, false); return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon); }