Skip to content

Commit 6268f6c

Browse files
committed
remove other logging references
1 parent 212ae6a commit 6268f6c

File tree

3 files changed

+15
-26
lines changed

3 files changed

+15
-26
lines changed

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import java.util.Iterator;
1010
import java.util.List;
1111
import java.util.Map;
12-
import java.util.logging.Level;
13-
import java.util.logging.Logger;
1412

1513
import javax.swing.*;
1614
import javax.swing.border.*;
@@ -220,7 +218,7 @@ public void actionPerformed(ActionEvent e) {
220218
stopItem.addActionListener(new ActionListener() {
221219
public void actionPerformed(ActionEvent e) {
222220
if (isDebuggerEnabled()) {
223-
Logger.getLogger(JavaEditor.class.getName()).log(Level.INFO, "Invoked 'Stop' menu item");
221+
Messages.log("Invoked 'Stop' menu item");
224222
debugger.stopDebug();
225223
} else {
226224
handleStop();
@@ -1144,22 +1142,22 @@ public void handleStop() {
11441142

11451143
public void handleStep(int modifiers) {
11461144
if (modifiers == 0) {
1147-
Logger.getLogger(getClass().getName()).log(Level.INFO, "Invoked 'Step Over' menu item");
1145+
Messages.log("Invoked 'Step Over' menu item");
11481146
debugger.stepOver();
11491147

11501148
} else if ((modifiers & ActionEvent.SHIFT_MASK) != 0) {
1151-
Logger.getLogger(getClass().getName()).log(Level.INFO, "Invoked 'Step Into' menu item");
1149+
Messages.log("Invoked 'Step Into' menu item");
11521150
debugger.stepInto();
11531151

11541152
} else if ((modifiers & ActionEvent.ALT_MASK) != 0) {
1155-
Logger.getLogger(getClass().getName()).log(Level.INFO, "Invoked 'Step Out' menu item");
1153+
Messages.log("Invoked 'Step Out' menu item");
11561154
debugger.stepOut();
11571155
}
11581156
}
11591157

11601158

11611159
public void handleContinue() {
1162-
Logger.getLogger(JavaEditor.class.getName()).log(Level.INFO, "Invoked 'Continue' menu item");
1160+
Messages.log("Invoked 'Continue' menu item");
11631161
debugger.continueDebug();
11641162
}
11651163

@@ -1399,7 +1397,7 @@ public void actionPerformed(ActionEvent e) {
13991397
Toolkit.newJMenuItem(Language.text("menu.debug.toggle_breakpoint"), 'B');
14001398
item.addActionListener(new ActionListener() {
14011399
public void actionPerformed(ActionEvent e) {
1402-
Logger.getLogger(JavaEditor.class.getName()).log(Level.INFO, "Invoked 'Toggle Breakpoint' menu item");
1400+
Messages.log("Invoked 'Toggle Breakpoint' menu item");
14031401
// TODO wouldn't getCaretLine() do the same thing with less effort?
14041402
toggleBreakpoint(getCurrentLineID().lineIdx());
14051403
}
@@ -1603,7 +1601,7 @@ protected void addBreakpointComments(String tabFilename) {
16031601
tab.setProgram(code);
16041602
tab.save();
16051603
} catch (IOException ex) {
1606-
Logger.getLogger(JavaEditor.class.getName()).log(Level.SEVERE, null, ex);
1604+
Messages.loge(null, ex);
16071605
}
16081606
}
16091607

java/src/processing/mode/java/JavaMode.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
import java.util.HashSet;
3131
import java.util.Map;
3232
import java.util.Set;
33-
import java.util.logging.FileHandler;
34-
import java.util.logging.Handler;
35-
import java.util.logging.Level;
36-
import java.util.logging.Logger;
3733

3834
import javax.swing.SwingUtilities;
3935

@@ -56,7 +52,7 @@ public Editor createEditor(Base base, String path,
5652
public JavaMode(Base base, File folder) {
5753
super(base, folder);
5854

59-
initLogger();
55+
// initLogger();
6056
loadPreferences();
6157
}
6258

@@ -263,7 +259,7 @@ public String getSearchPath() {
263259

264260
// Merged from ExperimentalMode
265261

266-
262+
/*
267263
void initLogger() {
268264
final boolean VERBOSE_LOGGING = true;
269265
final int LOG_SIZE = 512 * 1024; // max log file size (in bytes)
@@ -293,6 +289,7 @@ void initLogger() {
293289
Logger.getLogger(JavaMode.class.getName()).log(Level.SEVERE, null, ex);
294290
}
295291
}
292+
*/
296293

297294

298295
//ImageIcon classIcon, fieldIcon, methodIcon, localVarIcon;

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

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import java.util.ArrayList;
2727
import java.util.Arrays;
2828
import java.util.List;
29-
import java.util.logging.Level;
30-
import java.util.logging.Logger;
3129

3230
import javax.swing.*;
3331
import javax.swing.event.TreeExpansionEvent;
@@ -40,17 +38,12 @@
4038
import com.sun.jdi.Value;
4139

4240
import processing.app.Language;
41+
import processing.app.Messages;
4342
import processing.app.Mode;
4443
import processing.mode.java.debug.VariableNode;
4544

4645

4746
public class VariableInspector extends JDialog {
48-
// static public final int GAP = 13;
49-
50-
// EditorButton continueButton;
51-
// EditorButton stepButton;
52-
// EditorButton breakpointButton;
53-
5447
// The tray will be placed at this amount from the top of the editor window,
5548
// and extend to this amount from the bottom of the editor window.
5649
static final int VERTICAL_OFFSET = 64;
@@ -441,11 +434,12 @@ public void setValueFor(Object o, int i, Object o1) {
441434
break;
442435
}
443436
} catch (NumberFormatException ex) {
444-
Logger.getLogger(VariableRowModel.class.getName()).log(Level.INFO, "invalid value entered for {0}: {1}", new Object[]{var.getName(), stringValue});
437+
Messages.log(getClass().getName() + " invalid value entered for " +
438+
var.getName() + " -> " + stringValue);
445439
}
446440
if (value != null) {
447441
var.setValue(value);
448-
Logger.getLogger(VariableRowModel.class.getName()).log(Level.INFO, "new value set: {0}", var.getStringValue());
442+
Messages.log(getClass().getName() + " new value set: " + var.getStringValue());
449443
}
450444
}
451445

@@ -483,7 +477,7 @@ private ImageIcon[][] loadIcons(String fileName) {
483477
Mode mode = editor.getMode();
484478
File file = mode.getContentFile(fileName);
485479
if (!file.exists()) {
486-
Logger.getLogger(OutlineRenderer.class.getName()).log(Level.SEVERE, "icon file not found: {0}", file.getAbsolutePath());
480+
Messages.log(getClass().getName(), "icon file not found: " + file.getAbsolutePath());
487481
return null;
488482
}
489483
Image allIcons = mode.loadImage(fileName);

0 commit comments

Comments
 (0)