String () { final PsiMethod method = (PsiMethod)getPsiElement(); if (method == null || !method.isValid()) return ""; if (DumbService.isDumb(myProject)) return method.getName(); String name = PsiFormatUtil.formatMethod( method, PsiSubstitutor.EMPTY, PsiFormatUtil.SHOW_NAME | PsiFormatUtil.SHOW_TYPE | PsiFormatUtil.TYPE_AFTER | PsiFormatUtil.SHOW_PARAMETERS, PsiFormatUtil.SHOW_TYPE ); int c = name.indexOf('\n'); if (c > -1) { name = name.substring(0, c - 1); } return name; }