Debug tooltips on hover

When in Debug mode and stopped at a breakpoint, hovering over dientifiers will show up their name and value in a tooltip. All matching locals will be shown, one on each line.
This commit is contained in:
AL
2017-11-30 11:06:36 +00:00
parent cdf72b6798
commit 0a0ecf8112
5 changed files with 85 additions and 5 deletions

View File

@@ -85,6 +85,8 @@ public class DebugPanel extends JPanel {
private boolean loading = false;
public ABCPanel.VariablesTableModel localsTable;
public static enum SelectedTab {
LOG, STACK, SCOPECHAIN, LOCALS, REGISTERS, CALLSTACK, CONSTANTPOOL
@@ -346,6 +348,7 @@ public class DebugPanel extends JPanel {
synchronized (DebugPanel.this) {
SelectedTab oldSel = selectedTab;
localsTable = null;
InFrame f = Main.getDebugHandler().getFrame();
if (f != null) {
@@ -362,7 +365,8 @@ public class DebugPanel extends JPanel {
localIds.addAll(f.argumentFrameIds);
localIds.addAll(f.frameIds);
safeSetTreeModel(debugLocalsTable, new ABCPanel.VariablesTableModel(debugLocalsTable, locals, localIds));
localsTable = new ABCPanel.VariablesTableModel(debugLocalsTable, locals, localIds);
safeSetTreeModel(debugLocalsTable, localsTable);
safeSetTreeModel(debugScopeTable, new ABCPanel.VariablesTableModel(debugScopeTable, f.scopeChain, f.scopeChainFrameIds));
/*TableModelListener refreshListener = new TableModelListener() {