handle PCE in lookup painting (EA-65924)

This commit is contained in:
peter
2015-03-05 18:28:36 +01:00
parent 165253fbdb
commit 63c749d1f8
@@ -26,6 +26,7 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.colors.EditorFontType;
import com.intellij.openapi.editor.ex.util.EditorUtil;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.util.TextRange;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.codeStyle.MinusculeMatcher;
@@ -144,6 +145,11 @@ public class LookupCellRenderer implements ListCellRenderer {
try {
item.renderElement(presentation);
}
catch (ProcessCanceledException e) {
LOG.info(e);
presentation.setItemTextForeground(JBColor.RED);
presentation.setItemText("Error occurred, see the log in Help | Show Log");
}
catch (Exception e) {
LOG.error(e);
}