@SuppressWarnings({"HardCodedStringLiteral"}) public void showEmpty() { myCurrentEntity = null; try { myHTMLViewer.read(new StringReader("<html><body></body></html>"), null); } catch (IOException e) { // can't be } }
public void showPageFor(RefEntity refEntity, CommonProblemDescriptor descriptor) { try { String html = generateHTML(refEntity, descriptor); myHTMLViewer.read(new StringReader(html), null); setupStyle(); myHTMLViewer.setCaretPosition(0); } catch (Exception e) { showEmpty(); } finally { myCurrentEntity = refEntity; myCurrentDescriptor = descriptor; } }
private void showPageFromHistory(RefEntity newEntity) { InspectionTool tool = getTool(newEntity); try { if (tool instanceof DescriptorProviderInspection && !(tool instanceof CommonInspectionToolWrapper)) { showEmpty(); } else { try { String html = generateHTML(newEntity, tool); myHTMLViewer.read(new StringReader(html), null); setupStyle(); myHTMLViewer.setCaretPosition(0); } catch (Exception e) { showEmpty(); } } } finally { myCurrentEntity = newEntity; myCurrentDescriptor = null; } }