MessageTreeNode (XDebuggerTree tree, @NotNull @Nls String message, @Nullable HyperlinkListener hyperlinkListener) { Matcher matcher = MessageTreeNodeWithLinks.HREF_PATTERN.matcher(message); if (hyperlinkListener == null || !matcher.find()) { return new MessageTreeNode(tree, null, message, SimpleTextAttributes.REGULAR_ATTRIBUTES, XDebuggerUIConstants.INFORMATION_MESSAGE_ICON); } List<Object> objects = new ArrayList<>(); int prev = 0; do { if (matcher.start() != prev) { objects.add(message.substring(prev, matcher.start())); } objects.add(new HyperlinkListenerDelegator(matcher.group(2), matcher.group(1), hyperlinkListener)); prev = matcher.end(); } while (matcher.find()); if (prev < message.length()) { objects.add(message.substring(prev)); } return new MessageTreeNodeWithLinks(tree, objects); }