UI: empty texts in debugger

This commit is contained in:
Anton Makeev
2010-11-22 09:56:37 +03:00
parent e1f9d3c560
commit 726d098597
19 changed files with 90 additions and 31 deletions
@@ -19,7 +19,7 @@ import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.settings.DebuggerDataViewsConfigurable;
import com.intellij.debugger.settings.NodeRendererSettings;
import com.intellij.debugger.settings.UserRenderersConfigurable;
import com.intellij.debugger.ui.impl.FrameDebuggerTree;
import com.intellij.debugger.ui.impl.FrameVariablesTree;
import com.intellij.debugger.ui.impl.watch.DebuggerTree;
import com.intellij.idea.ActionsBundle;
import com.intellij.openapi.Disposable;
@@ -80,7 +80,7 @@ public class CustomizeContextViewAction extends DebuggerAction{
public void update(AnActionEvent e) {
DebuggerTree tree = getTree(e.getDataContext());
e.getPresentation().setVisible(tree instanceof FrameDebuggerTree);
e.getPresentation().setVisible(tree instanceof FrameVariablesTree);
e.getPresentation().setText(ActionsBundle.actionText(DebuggerActions.CUSTOMIZE_VIEWS));
}
}
@@ -26,7 +26,9 @@ import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiField;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.SideBorder;
import com.intellij.ui.TableUtil;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
import com.intellij.xdebugger.impl.breakpoints.ui.AbstractBreakpointPanel;
import gnu.trove.TIntArrayList;
@@ -83,7 +85,9 @@ public class BreakpointPanel extends AbstractBreakpointPanel<Breakpoint> {
myTree = new BreakpointTree(project);
myTablePlace.setLayout(new CardLayout());
myTablePlace.add(ScrollPaneFactory.createScrollPane(myTable), TABLE_VIEW);
JScrollPane pane = ScrollPaneFactory.createScrollPane(myTable);
pane.putClientProperty(UIUtil.KEEP_BORDER_SIDES, SideBorder.ALL);
myTablePlace.add(pane, TABLE_VIEW);
final ListSelectionListener listSelectionListener = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
@@ -192,7 +196,9 @@ public class BreakpointPanel extends AbstractBreakpointPanel<Breakpoint> {
}
});
myTablePlace.add(ScrollPaneFactory.createScrollPane(myTree), TREE_VIEW);
pane = ScrollPaneFactory.createScrollPane(myTree);
pane.putClientProperty(UIUtil.KEEP_BORDER_SIDES, SideBorder.ALL);
myTablePlace.add(pane, TREE_VIEW);
updateCurrentBreakpointPropertiesPanel();
@@ -17,6 +17,7 @@ package com.intellij.debugger.ui.breakpoints;
import com.intellij.openapi.project.Project;
import com.intellij.util.ui.Table;
import com.intellij.xdebugger.XDebuggerBundle;
import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer;
@@ -88,6 +89,8 @@ public class BreakpointTable extends Table {
}
});
columnModel.getColumn(BreakpointTableModel.NAME).setCellRenderer(new BreakpointNameCellRenderer());
getEmptyText().setText(XDebuggerBundle.message("debugger.no.breakpoints"));
}
public BreakpointTableModel getModel() {
@@ -24,6 +24,7 @@ import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.Convertor;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
import com.intellij.xdebugger.XDebuggerBundle;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -394,6 +395,7 @@ public class BreakpointTree extends CheckboxTree {
}
};
myBreakpointManager.addBreakpointManagerListener(myNodeUpdateListener);
getEmptyText().setText(XDebuggerBundle.message("debugger.no.breakpoints"));
}
public boolean isGroupByMethods() {
@@ -53,6 +53,7 @@ import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.text.CharArrayUtil;
import com.intellij.util.ui.tree.TreeModelAdapter;
import com.intellij.xdebugger.XDebuggerBundle;
import com.sun.jdi.AbsentInformationException;
import com.sun.jdi.ObjectCollectedException;
import com.sun.jdi.Value;
@@ -62,13 +63,14 @@ import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
import java.util.*;
public class FrameDebuggerTree extends DebuggerTree {
public class FrameVariablesTree extends DebuggerTree {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.ui.impl.FrameDebuggerTree");
private boolean myAnyNewLocals;
private boolean myAutoWatchMode = false;
public FrameDebuggerTree(Project project) {
public FrameVariablesTree(Project project) {
super(project);
getEmptyText().setText(XDebuggerBundle.message("debugger.variables.not.available"));
}
public boolean isAutoWatchMode() {
@@ -32,6 +32,7 @@ import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.util.ui.tree.TreeModelAdapter;
import com.intellij.xdebugger.XDebuggerBundle;
import javax.swing.*;
import javax.swing.event.TreeModelEvent;
@@ -51,6 +52,7 @@ public class ThreadsDebuggerTree extends DebuggerTree {
public ThreadsDebuggerTree(Project project) {
super(project);
getEmptyText().setText(XDebuggerBundle.message("debugger.threads.not.available"));
}
protected NodeManagerImpl createNodeManager(Project project) {
@@ -40,7 +40,7 @@ public class VariablesPanel extends DebuggerTreePanel implements DataProvider{
setBorder(null);
final FrameDebuggerTree frameTree = getFrameTree();
final FrameVariablesTree frameTree = getFrameTree();
add(ScrollPaneFactory.createScrollPane(frameTree), BorderLayout.CENTER);
registerDisposable(DebuggerAction.installEditAction(frameTree, DebuggerActions.EDIT_NODE_SOURCE));
@@ -52,7 +52,7 @@ public class VariablesPanel extends DebuggerTreePanel implements DataProvider{
}
protected DebuggerTree createTreeView() {
return new FrameDebuggerTree(getProject());
return new FrameVariablesTree(getProject());
}
protected void changeEvent(DebuggerContextImpl newContext, int event) {
@@ -74,8 +74,8 @@ public class VariablesPanel extends DebuggerTreePanel implements DataProvider{
}
public FrameDebuggerTree getFrameTree() {
return (FrameDebuggerTree) getTree();
public FrameVariablesTree getFrameTree() {
return (FrameVariablesTree) getTree();
}
}
@@ -23,6 +23,7 @@ import com.intellij.debugger.ui.impl.watch.WatchItemDescriptor;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.xdebugger.XDebuggerBundle;
import javax.swing.tree.TreePath;
import java.util.Enumeration;
@@ -32,6 +33,7 @@ public class WatchDebuggerTree extends DebuggerTree {
public WatchDebuggerTree(Project project) {
super(project);
getEmptyText().setText(XDebuggerBundle.message("debugger.no.watches"));
}
public DebuggerTreeNodeImpl[] getWatches() {