private void addJavacMessageImpl(AntMessage message) { MutableTreeNode parentNode = (MutableTreeNode) myParentPath.getLastPathComponent(); MessageNode messageNode = new MessageNode(message, myProject, false); myTreeModel.insertNodeInto(messageNode, parentNode, parentNode.getChildCount()); myMessageItems.add(messageNode); handleExpansion(); }
public Object addMessage(AntMessage message) { MessageNode messageNode = createMessageNode(message); MutableTreeNode parentNode = (MutableTreeNode) myParentPath.getLastPathComponent(); myTreeModel.insertNodeInto(messageNode, parentNode, parentNode.getChildCount()); myMessageItems.add(messageNode); handleExpansion(); return messageNode; }
public void addException(AntMessage exception, boolean showFullTrace) { MessageNode exceptionRootNode = null; StringTokenizer tokenizer = new StringTokenizer(exception.getText(), "\r\n"); while (tokenizer.hasMoreElements()) { String line = (String) tokenizer.nextElement(); if (exceptionRootNode == null) { AntMessage newMessage = new AntMessage( exception.getType(), exception.getPriority(), line, exception.getFile(), exception.getLine(), exception.getColumn()); exceptionRootNode = new MessageNode(newMessage, myProject, true); myMessageItems.add(exceptionRootNode); } else if (showFullTrace) { if (StringUtil.startsWithChar(line, '\t')) { line = line.substring(1); } HyperlinkUtil.PlaceInfo info = HyperlinkUtil.parseStackLine(myProject, '\t' + line); VirtualFile file = info != null ? info.getFile() : null; int lineNumber = info != null ? info.getLine() : 0; int column = info != null ? info.getColumn() : 1; AntMessage newMessage = new AntMessage( exception.getType(), exception.getPriority(), line, file, lineNumber, column); MessageNode child = new MessageNode(newMessage, myProject, false); exceptionRootNode.add(child); myMessageItems.add(child); } } if (exceptionRootNode == null) return; MutableTreeNode parentNode = (MutableTreeNode) myParentPath.getLastPathComponent(); myTreeModel.insertNodeInto(exceptionRootNode, parentNode, parentNode.getChildCount()); handleExpansion(); }