@Override protected void setVisibilityIcon(MemberInfo memberInfo, RowIcon icon) { PsiMember member = memberInfo.getMember(); PsiModifierList modifiers = member != null ? member.getModifierList() : null; if (modifiers != null) { VisibilityIcons.setVisibilityIcon(modifiers, icon); } else { icon.setIcon(IconUtil.getEmptyIcon(true), VISIBILITY_ICON_POSITION); } }
@Nullable @Override protected Icon getElementIcon(@IconFlags int flags) { Icon icon = getIconInner(); final boolean isLocked = (flags & ICON_FLAG_READ_STATUS) != 0 && !isWritable(); RowIcon rowIcon = createLayeredIcon(this, icon, ElementPresentationUtil.getFlags(this, isLocked) | getFlagsInner()); if ((flags & ICON_FLAG_VISIBILITY) != 0) { VisibilityIcons.setVisibilityIcon(getModifierList(), rowIcon); } return rowIcon; }
@Override protected void setVisibilityIcon(GrMemberInfo memberInfo, RowIcon icon) { PsiMember member = memberInfo.getMember(); PsiModifierList modifiers = member != null ? member.getModifierList() : null; if (modifiers != null) { VisibilityIcons.setVisibilityIcon(modifiers, icon); } else { icon.setIcon(IconUtil.getEmptyIcon(true), VISIBILITY_ICON_POSITION); } }
@Nullable public Icon getIcon(int flags) { Icon icon = getIconInner(); final boolean isLocked = (flags & ICON_FLAG_READ_STATUS) != 0 && !isWritable(); RowIcon rowIcon = createLayeredIcon(this, icon, ElementPresentationUtil.getFlags(this, isLocked) | getFlagsInner()); if ((flags & ICON_FLAG_VISIBILITY) != 0) { VisibilityIcons.setVisibilityIcon(getModifierList(), rowIcon); } return rowIcon; }
public static Icon addVisibilityIcon(final PsiModifierListOwner element, final int flags, final RowIcon baseIcon) { if ((flags & Iconable.ICON_FLAG_VISIBILITY) != 0) { VisibilityIcons.setVisibilityIcon(element.getModifierList(), baseIcon); } return baseIcon; }