public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { Component renderer = null; if (value instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value; Object userObject = treeNode.getUserObject(); if (userObject instanceof ErrorDocument) { renderer = super.getTreeCellRendererComponent(tree, "<html><pre>" + StringEscapeUtils.escapeHtml(((ErrorDocument) userObject).getMessage()) + "</pre></html>", selected, expanded, leaf, row, hasFocus); } } if (renderer == null) { renderer = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); } if (renderer instanceof JLabel) { JLabel label = (JLabel) renderer; label.setIcon(null); } return renderer; } });
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { Component renderer = null; if (value instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value; Object userObject = treeNode.getUserObject(); if (userObject instanceof ErrorDocument) { ErrorDocument errorDocument = (ErrorDocument) userObject; renderer = super.getTreeCellRendererComponent(tree, errorDocument.getMessage(), selected, expanded, leaf, row, hasFocus); } } if (renderer == null) { renderer = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); } if (renderer instanceof JLabel) { JLabel label = (JLabel) renderer; label.setIcon(null); } return renderer; }
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { Component renderer = null; if (value instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value; Object userObject = treeNode.getUserObject(); if (userObject instanceof ErrorDocument) { renderer = super.getTreeCellRendererComponent(tree, "<html><pre>" + StringEscapeUtils.escapeHtml(((ErrorDocument) userObject).getMessage()) + "</pre></html>", selected, expanded, leaf, row, hasFocus); } } if (renderer == null) { renderer = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); } if (renderer instanceof JLabel) { JLabel label = (JLabel) renderer; label.setIcon(null); } return renderer; }
ErrorDocument errorDoc = (ErrorDocument) identified; System.err.println("ERROR: " + identified.getId()); System.err.println(" message: " + errorDoc.getMessage()); if (errorDoc.getStackTraceStrings().isEmpty()) { System.err.println(" errorMessage: "
if (identified instanceof ErrorDocument) { ErrorDocument errorDocument = (ErrorDocument) identified; return errorDocument.getMessage();
String message = errDocument.getMessage(); if (message != null && !message.isEmpty()) { errDocumentString = message + "\n";
if (identified instanceof ErrorDocument) { ErrorDocument errorDocument = (ErrorDocument) identified; return errorDocument.getMessage();