FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

only show inspector when debugger enabled, change inspector location · Jonham/processing@c68bd13 · GitHub

Repository navigation

Commit c68bd13

Browse files
committed
only show inspector when debugger enabled, change inspector location
1 parent 685a080 commit c68bd13

3 files changed

Lines changed: 23 additions & 14 deletions

File tree

‎java/src/processing/mode/java/JavaEditor.java‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,7 @@ public void actionPerformed(ActionEvent e) {
15221522
debugMenu.add(item);
15231523
item.setEnabled(false);
15241524

1525+
/*
15251526
inspectorItem = Toolkit.newJMenuItem(Language.text("menu.debug.show_variables"), 'Y');
15261527
inspectorItem.addActionListener(new ActionListener() {
15271528
public void actionPerformed(ActionEvent e) {
@@ -1530,6 +1531,7 @@ public void actionPerformed(ActionEvent e) {
15301531
});
15311532
debugMenu.add(inspectorItem);
15321533
inspectorItem.setEnabled(false);
1534+
*/
15331535

15341536
/*
15351537
item = new JMenuItem(Language.text("menu.debug.list_breakpoints"));
@@ -2188,10 +2190,12 @@ public void toggleDebug() {
21882190
debugItem.setText(Language.text("menu.debug.enable"));
21892191
}
21902192

2191-
// Hide the variable inspector if it's currently visible
2192-
if (!debugEnabled && inspector.isVisible()) {
2193-
toggleVariableInspector();
2194-
}
2193+
// // Hide the variable inspector if it's currently visible
2194+
// if (!debugEnabled && inspector.isVisible()) {
2195+
// toggleVariableInspector();
2196+
// }
2197+
inspector.setVisible(debugEnabled);
2198+
21952199
/*
21962200
if (enabled) {
21972201
inspector.setFocusableWindowState(false); // to not get focus when set visible
@@ -2209,6 +2213,7 @@ public void toggleDebug() {
22092213
}
22102214

22112215

2216+
/*
22122217
public void toggleVariableInspector() {
22132218
if (inspector.isVisible()) {
22142219
inspectorItem.setText(Language.text("menu.debug.show_variables"));
@@ -2220,6 +2225,7 @@ public void toggleVariableInspector() {
22202225
// inspector.setFocusableWindowState(true); // allow to get focus again
22212226
}
22222227
}
2228+
*/
22232229

22242230

22252231
// public void showVariableInspector() {

‎java/src/processing/mode/java/VariableInspector.java‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,15 @@ public VariableInspector(final JavaEditor editor) {
111111
getContentPane().add(box);
112112
pack();
113113

114-
// setLocation(editor.getX() + editor.getWidth() + HORIZONTAL_OFFSET,
115-
// editor.getY() + VERTICAL_OFFSET);
116-
setLocationRelativeTo(editor);
114+
int x = editor.getX() + editor.getWidth() + HORIZONTAL_OFFSET;
115+
if (x + getWidth() > getToolkit().getScreenSize().width) {
116+
// If it doesn't fit on screen, place it inside the editor window,
117+
// per the OS rules for window placement
118+
setLocationRelativeTo(editor);
119+
} else {
120+
// If it'll fit, place it to the right of the editor window
121+
setLocation(x, editor.getY() + VERTICAL_OFFSET);
122+
}
117123

118124
/*
119125
bgColor = mode.getColor("buttons.bgcolor");

‎todo.txt‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
0236 (3.0a9)
22
X show screen dimensions in the Preferences window
33

4-
gui
4+
gui/pdex/debugger
55
X implement the bottom half of the editor window
66
X editor window draws in stages (at least on OS X) on first view
77
X the console/bottom area stays white until an additional repaint?
88
X fixed these issues and replaced with footer
99
X remove EditorLineStatus (we have line numbers)
10-
11-
12-
pdex/debugger
10+
X automatically show the variables window when debugging, hide when not
11+
X ctrl-y shortcut duplicated
12+
X https://github.com/processing/processing/issues/3298
1313
X remove "Experimental Mode: Yikes!" messages
1414
o NullPointerException in initiateToolTip()
1515
X https://github.com/processing/processing/issues/3286
@@ -52,9 +52,6 @@ _ move Library to LibraryContribution and into contrib?
5252

5353
gui
5454
_ click a line number to toggle breakpoint
55-
_ automatically show the variables window when debugging, hide when not
56-
_ ctrl-y shortcut duplicated
57-
_ https://github.com/processing/processing/issues/3298
5855
_ need active state for the butterfly
5956
_ finish the gui
6057
_ https://github.com/processing/processing/issues/3072

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL