WEB-8245 Debugger: Chrome extension connection message: provide balloon or clickable link

This commit is contained in:
Vladimir Krivosheev
2013-06-25 16:50:58 +02:00
parent 4664769ee6
commit f5911184ed
2 changed files with 7 additions and 4 deletions
@@ -41,7 +41,7 @@ import java.util.regex.Pattern;
* @author nik
*/
public class MessageTreeNode extends XDebuggerTreeNode {
private boolean myEllipsis;
private final boolean myEllipsis;
private XDebuggerTreeNodeHyperlink myLink;
private MessageTreeNode(XDebuggerTree tree, @Nullable final XDebuggerTreeNode parent, final String message, final SimpleTextAttributes attributes,
@@ -68,6 +68,7 @@ public class MessageTreeNode extends XDebuggerTreeNode {
myEllipsis = false;
}
@Override
protected List<? extends TreeNode> getChildren() {
return Collections.emptyList();
}
@@ -82,6 +83,7 @@ public class MessageTreeNode extends XDebuggerTreeNode {
return myLink;
}
@Override
public List<? extends XDebuggerTreeNode> getLoadedChildren() {
return null;
}
@@ -144,7 +146,7 @@ public class MessageTreeNode extends XDebuggerTreeNode {
}
while (matcher.find());
if (prev < (message.length() - 1)) {
if (prev < message.length()) {
objects.add(message.substring(prev));
}
return new MessageTreeNodeWithLinks(tree, objects);
@@ -24,6 +24,7 @@ import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.Conditions;
import com.intellij.util.PlatformIcons;
import org.jetbrains.annotations.NotNull;
@@ -34,11 +35,11 @@ import java.awt.event.MouseEvent;
* @author nik
*/
public class OpenUrlHyperlinkInfo implements HyperlinkWithPopupMenuInfo {
private String myUrl;
private final String myUrl;
private final Condition<BrowsersConfiguration.BrowserFamily> mySuitableBrowsers;
public OpenUrlHyperlinkInfo(@NotNull String url) {
this(url, Condition.TRUE);
this(url, Conditions.<BrowsersConfiguration.BrowserFamily>alwaysTrue());
}
public OpenUrlHyperlinkInfo(@NotNull String url, @NotNull Condition<BrowsersConfiguration.BrowserFamily> suitableBrowsers) {