workaround: don't show pid of attach item in case if pid=-1

IDEA-CR-39132
This commit is contained in:
Viuginov Nickolay
2018-11-07 19:20:22 +03:00
parent 1422e30cd0
commit d1932edab0
@@ -547,7 +547,8 @@ public class AttachToProcessAction extends AnAction {
@NotNull
public String getText(@NotNull Project project) {
String shortenedText = StringUtil.shortenTextWithEllipsis(myGroup.getItemDisplayText(project, myInfo, myDataHolder), 200, 0);
return myInfo.getPid() + " " + shortenedText;
int pid = myInfo.getPid();
return (pid == -1 ? "" : pid + " ") + shortenedText;
}
@NotNull