void (@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { final Object o = ((DefaultMutableTreeNode)value).getUserObject(); setIcon(o instanceof PsiMethod ? IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Method) : o instanceof PsiParameter ? IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Parameter) : null); final String name; if (o instanceof PsiMethod) { name = PsiFormatUtil.formatMethod((PsiMethod)o, PsiSubstitutor.EMPTY, PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_PARAMETERS, PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_TYPE); } else if (o instanceof PsiParameter) { name = PsiFormatUtil.formatVariable((PsiParameter)o, PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_TYPE, PsiSubstitutor.EMPTY); } else name = null; final boolean missing = o instanceof PsiElement && !((PsiElement)o).isPhysical(); if (name != null) { append(name, missing? SimpleTextAttributes.ERROR_ATTRIBUTES : SimpleTextAttributes.REGULAR_ATTRIBUTES); } }