limit the length of progress text (IDEA-75379)

This commit is contained in:
Dmitry Jemerov
2011-10-13 13:34:46 +02:00
parent 5be04a3535
commit 63faf67726
@@ -611,7 +611,18 @@ public class PsiSearchHelperImpl implements PsiSearchHelper {
}
if (progress != null) {
progress.setText(PsiBundle.message("psi.search.for.word.progress", StringUtil.join(allWords, ", ")));
final StringBuilder result = new StringBuilder();
for (String string : allWords) {
if (string != null && string.length() != 0) {
if (result.length() > 50) {
result.append("...");
break;
}
if (result.length() != 0) result.append(", ");
result.append(string);
}
}
progress.setText(PsiBundle.message("psi.search.for.word.progress", result.toString()));
}
return processPsiFileRoots(new ArrayList<VirtualFile>(candidateFiles.keySet()), new Processor<PsiElement>() {