Skip to content

Commit 531c384

Browse files
committed
todo notes and clean up a few warnings
1 parent 1f568b0 commit 531c384

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import processing.app.*;
2222
import processing.app.contrib.*;
2323
import processing.app.syntax.JEditTextArea;
24+
import processing.app.syntax.PdeTextArea;
2425
import processing.app.syntax.PdeTextAreaDefaults;
2526
import processing.app.ui.*;
2627
import processing.app.ui.Toolkit;
@@ -2078,7 +2079,7 @@ public void setCurrentLine(LineID line) {
20782079
cursorToLineStart(line.lineIdx());
20792080
// highlight line
20802081
currentLine = new LineHighlight(line.lineIdx(), this);
2081-
currentLine.setMarker(JavaTextArea.STEP_MARKER);
2082+
currentLine.setMarker(PdeTextArea.STEP_MARKER);
20822083
currentLine.setPriority(10); // fixes current line being hidden by the breakpoint when moved down
20832084
}
20842085

@@ -2107,7 +2108,7 @@ public void clearCurrentLine() {
21072108
*/
21082109
public void addBreakpointedLine(LineID lineID) {
21092110
LineHighlight hl = new LineHighlight(lineID, this);
2110-
hl.setMarker(JavaTextArea.BREAK_MARKER);
2111+
hl.setMarker(PdeTextArea.BREAK_MARKER);
21112112
breakpointedLines.add(hl);
21122113
// repaint current line if it's on this line
21132114
if (currentLine != null && currentLine.getLineID().equals(lineID)) {
@@ -2350,7 +2351,7 @@ private void showImportSuggestion(String[] list, int x, int y) {
23502351
frmImportSuggest = new JFrame();
23512352

23522353
frmImportSuggest.setUndecorated(true);
2353-
frmImportSuggest.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
2354+
frmImportSuggest.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
23542355
JPanel panel = new JPanel();
23552356
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
23562357
panel.setBackground(Color.WHITE);

java/src/processing/mode/java/pdex/DebugTree.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import java.util.function.Consumer;
1010

1111
import javax.swing.JDialog;
12-
import javax.swing.JFrame;
1312
import javax.swing.JScrollPane;
1413
import javax.swing.JTree;
14+
import javax.swing.WindowConstants;
1515
import javax.swing.tree.DefaultMutableTreeNode;
1616
import javax.swing.tree.DefaultTreeModel;
1717

@@ -24,6 +24,7 @@
2424
import processing.mode.java.JavaEditor;
2525
import processing.mode.java.pdex.PreprocessedSketch.SketchInterval;
2626

27+
2728
class DebugTree {
2829
final JDialog window;
2930
final JTree tree;
@@ -59,7 +60,7 @@ public void componentHidden(ComponentEvent e) {
5960
tree.setModel(null);
6061
}
6162
});
62-
window.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
63+
window.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
6364
window.setBounds(new Rectangle(680, 100, 460, 620));
6465
window.setTitle("AST View - " + editor.getSketch().getName());
6566
JScrollPane sp = new JScrollPane();

java/src/processing/mode/java/pdex/Rename.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
import javax.swing.Box;
1818
import javax.swing.JButton;
1919
import javax.swing.JDialog;
20-
import javax.swing.JFrame;
2120
import javax.swing.JLabel;
2221
import javax.swing.JMenuItem;
2322
import javax.swing.JOptionPane;
2423
import javax.swing.JRootPane;
2524
import javax.swing.JTextField;
25+
import javax.swing.WindowConstants;
2626
import javax.swing.text.BadLocationException;
2727

2828
import org.eclipse.jdt.core.dom.ASTNode;
@@ -73,7 +73,7 @@ class Rename {
7373
window = new JDialog(editor);
7474
JRootPane rootPane = window.getRootPane();
7575
window.setTitle("Rename");
76-
window.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
76+
window.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
7777
Toolkit.registerWindowCloseKeys(rootPane, new ActionListener() {
7878
@Override
7979
public void actionPerformed(ActionEvent e) {

java/src/processing/mode/java/pdex/ShowUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import java.util.stream.Collectors;
1717

1818
import javax.swing.JDialog;
19-
import javax.swing.JFrame;
2019
import javax.swing.JMenuItem;
2120
import javax.swing.JScrollPane;
2221
import javax.swing.JTree;
22+
import javax.swing.WindowConstants;
2323
import javax.swing.tree.DefaultMutableTreeNode;
2424
import javax.swing.tree.DefaultTreeModel;
2525
import javax.swing.tree.TreeModel;
@@ -63,7 +63,7 @@ class ShowUsage {
6363

6464
{ // Show Usage window
6565
window = new JDialog(editor);
66-
window.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
66+
window.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
6767
window.setAutoRequestFocus(false);
6868
window.addComponentListener(new ComponentAdapter() {
6969
@Override

todo.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ X update to Java 8u172
2727
_ Examples dialog causes high CPU load
2828
_ https://github.com/processing/processing/issues/5246
2929

30+
3031
contrib
3132
X updates to Japanese translation
3233
X https://github.com/processing/processing/pull/5263
@@ -37,6 +38,7 @@ X https://github.com/processing/processing/pull/5144
3738
X Update java.lang.UnsupportedClassVersionError message
3839
X https://github.com/processing/processing/pull/5459
3940

41+
4042
welcome
4143
o just remove the welcome dialog; but what should the default behavior be?
4244
o or should it only show up for people who have used <=2 but not 3?
@@ -98,6 +100,8 @@ _ https://github.com/processing/processing/pull/5126
98100

99101

100102
nasty ones
103+
_ errors inside setup() aren't coming through at all?
104+
_ seen in Eclipse; have to turn on the debugger
101105
_ "Sketch disappeared" infinite pop up dialogs
102106
_ https://github.com/processing/processing/pull/4808
103107
_ https://github.com/processing/processing/issues/4805

0 commit comments

Comments
 (0)