Skip to content

Commit 9d051cd

Browse files
committed
fix copyrights, remove authors per guidelines, replace logging
1 parent 992738e commit 9d051cd

File tree

9 files changed

+979
-970
lines changed

9 files changed

+979
-970
lines changed

app/src/processing/app/Messages.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ static public void logf(String message, Object... args) {
327327

328328
static public void loge(String message, Throwable e) {
329329
if (Base.DEBUG) {
330-
System.err.println(message);
330+
if (message != null) {
331+
System.err.println(message);
332+
}
331333
e.printStackTrace();
332334
}
333335
}
Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
22

33
/*
4-
Part of the Processing project - http://processing.org
5-
Copyright (c) 2012-15 The Processing Foundation
4+
Part of the Processing project - http://processing.org
65
7-
This program is free software; you can redistribute it and/or modify
8-
it under the terms of the GNU General Public License version 2
9-
as published by the Free Software Foundation.
6+
Copyright (c) 2012-16 The Processing Foundation
107
11-
This program is distributed in the hope that it will be useful,
12-
but WITHOUT ANY WARRANTY; without even the implied warranty of
13-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-
GNU General Public License for more details.
8+
This program is free software; you can redistribute it and/or
9+
modify it under the terms of the GNU General Public License
10+
version 2, as published by the Free Software Foundation.
1511
16-
You should have received a copy of the GNU General Public License
17-
along with this program; if not, write to the Free Software Foundation, Inc.
18-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12+
This program is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program; if not, write to the Free Software Foundation,
19+
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1920
*/
2021

2122
package processing.mode.java.debug;
@@ -24,45 +25,38 @@
2425
import com.sun.jdi.ClassNotLoadedException;
2526
import com.sun.jdi.InvalidTypeException;
2627
import com.sun.jdi.Value;
27-
import java.util.logging.Level;
28-
import java.util.logging.Logger;
28+
29+
import processing.app.Messages;
2930

3031
/**
3132
* Specialized {@link VariableNode} for representing single fields in an array.
3233
* Overrides {@link #setValue} to properly change the value of the encapsulated
3334
* array field.
34-
*
35-
* @author Martin Leopold <m@martinleopold.com>
3635
*/
3736
public class ArrayFieldNode extends VariableNode {
38-
39-
protected ArrayReference array;
40-
protected int index;
41-
42-
/**
43-
* Construct an {@link ArrayFieldNode}.
44-
*
45-
* @param name the name
46-
* @param type the type
47-
* @param value the value
48-
* @param array a reference to the array
49-
* @param index the index inside the array
50-
*/
51-
public ArrayFieldNode(String name, String type, Value value, ArrayReference array, int index) {
52-
super(name, type, value);
53-
this.array = array;
54-
this.index = index;
55-
}
56-
57-
@Override
58-
public void setValue(Value value) {
59-
try {
60-
array.setValue(index, value);
61-
} catch (InvalidTypeException ex) {
62-
Logger.getLogger(ArrayFieldNode.class.getName()).log(Level.SEVERE, null, ex);
63-
} catch (ClassNotLoadedException ex) {
64-
Logger.getLogger(ArrayFieldNode.class.getName()).log(Level.SEVERE, null, ex);
65-
}
66-
this.value = value;
37+
protected ArrayReference array;
38+
protected int index;
39+
40+
41+
/**
42+
* Construct an {@link ArrayFieldNode}.
43+
*/
44+
public ArrayFieldNode(String name, String type, Value value, ArrayReference array, int index) {
45+
super(name, type, value);
46+
this.array = array;
47+
this.index = index;
48+
}
49+
50+
51+
@Override
52+
public void setValue(Value value) {
53+
try {
54+
array.setValue(index, value);
55+
} catch (InvalidTypeException ex) {
56+
Messages.loge(null, ex);
57+
} catch (ClassNotLoadedException ex) {
58+
Messages.loge(null, ex);
6759
}
60+
this.value = value;
61+
}
6862
}
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
22

33
/*
4-
Part of the Processing project - http://processing.org
5-
Copyright (c) 2012-15 The Processing Foundation
4+
Part of the Processing project - http://processing.org
65
7-
This program is free software; you can redistribute it and/or modify
8-
it under the terms of the GNU General Public License version 2
9-
as published by the Free Software Foundation.
6+
Copyright (c) 2012-16 The Processing Foundation
107
11-
This program is distributed in the hope that it will be useful,
12-
but WITHOUT ANY WARRANTY; without even the implied warranty of
13-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-
GNU General Public License for more details.
8+
This program is free software; you can redistribute it and/or
9+
modify it under the terms of the GNU General Public License
10+
version 2, as published by the Free Software Foundation.
1511
16-
You should have received a copy of the GNU General Public License
17-
along with this program; if not, write to the Free Software Foundation, Inc.
18-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12+
This program is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program; if not, write to the Free Software Foundation,
19+
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1920
*/
2021

2122
package processing.mode.java.debug;
2223

2324
import com.sun.jdi.ReferenceType;
2425

26+
2527
/**
2628
* Listener to be notified when a class is loaded in the debugger. Used by
2729
* {@link LineBreakpoint}s to activate themselves as soon as the respective
2830
* class is loaded.
29-
*
30-
* @author Martin Leopold <m@martinleopold.com>
3131
*/
3232
public interface ClassLoadListener {
3333

34-
/**
35-
* Event handler called when a class is loaded.
36-
*
37-
* @param theClass the class
38-
*/
39-
public void classLoaded(ReferenceType theClass);
34+
/**
35+
* Event handler called when a class is loaded.
36+
*/
37+
public void classLoaded(ReferenceType theClass);
4038
}

java/src/processing/mode/java/debug/FieldNode.java

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22

33
/*
44
Part of the Processing project - http://processing.org
5-
Copyright (c) 2012-15 The Processing Foundation
65
7-
This program is free software; you can redistribute it and/or modify
8-
it under the terms of the GNU General Public License version 2
9-
as published by the Free Software Foundation.
6+
Copyright (c) 2012-16 The Processing Foundation
7+
8+
This program is free software; you can redistribute it and/or
9+
modify it under the terms of the GNU General Public License
10+
version 2, as published by the Free Software Foundation.
1011
1112
This program is distributed in the hope that it will be useful,
1213
but WITHOUT ANY WARRANTY; without even the implied warranty of
1314
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1415
GNU General Public License for more details.
1516
1617
You should have received a copy of the GNU General Public License
17-
along with this program; if not, write to the Free Software Foundation, Inc.
18-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18+
along with this program; if not, write to the Free Software Foundation,
19+
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1920
*/
2021

2122
package processing.mode.java.debug;
@@ -25,46 +26,40 @@
2526
import com.sun.jdi.InvalidTypeException;
2627
import com.sun.jdi.ObjectReference;
2728
import com.sun.jdi.Value;
28-
import java.util.logging.Level;
29-
import java.util.logging.Logger;
29+
30+
import processing.app.Messages;
3031

3132

3233
/**
3334
* Specialized {@link VariableNode} for representing fields. Overrides
3435
* {@link #setValue} to properly change the value of the encapsulated field.
35-
*
36-
* @author Martin Leopold <m@martinleopold.com>
3736
*/
3837
public class FieldNode extends VariableNode {
39-
protected Field field;
40-
protected ObjectReference obj;
38+
protected Field field;
39+
protected ObjectReference obj;
40+
41+
42+
/**
43+
* Construct a {@link FieldNode}.
44+
* @param obj a reference to the object containing the field
45+
*/
46+
public FieldNode(String name, String type, Value value, Field field,
47+
ObjectReference obj) {
48+
super(name, type, value);
49+
this.field = field;
50+
this.obj = obj;
51+
}
4152

42-
43-
/**
44-
* Construct a {@link FieldNode}.
45-
*
46-
* @param name the name
47-
* @param type the type
48-
* @param value the value
49-
* @param field the field
50-
* @param obj a reference to the object containing the field
51-
*/
52-
public FieldNode(String name, String type, Value value, Field field, ObjectReference obj) {
53-
super(name, type, value);
54-
this.field = field;
55-
this.obj = obj;
56-
}
5753

58-
59-
@Override
60-
public void setValue(Value value) {
61-
try {
62-
obj.setValue(field, value);
63-
} catch (InvalidTypeException ex) {
64-
Logger.getLogger(FieldNode.class.getName()).log(Level.SEVERE, null, ex);
65-
} catch (ClassNotLoadedException ex) {
66-
Logger.getLogger(FieldNode.class.getName()).log(Level.SEVERE, null, ex);
67-
}
68-
this.value = value;
54+
@Override
55+
public void setValue(Value value) {
56+
try {
57+
obj.setValue(field, value);
58+
} catch (InvalidTypeException ite) {
59+
Messages.loge(null, ite);
60+
} catch (ClassNotLoadedException cnle) {
61+
Messages.loge(null, cnle);
6962
}
63+
this.value = value;
64+
}
7065
}

0 commit comments

Comments
 (0)