mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
clean up a few warnings
This commit is contained in:
@@ -34,16 +34,18 @@ import processing.mode.java.JavaToolbar;
|
||||
*
|
||||
* @author Martin Leopold <m@martinleopold.com>
|
||||
*/
|
||||
@SuppressWarnings("hiding")
|
||||
public class DebugToolbar extends JavaToolbar {
|
||||
// preserve original button id's, but re-define so they are accessible (they are protected)
|
||||
// preserve original button id's, but re-define so they are accessible
|
||||
// (they are used by DebugEditor, so they want to be public)
|
||||
|
||||
static protected final int RUN = 100; // change this, to be able to get it's name via getTitle()
|
||||
static protected final int STOP = JavaToolbar.STOP;
|
||||
static protected final int RUN = 100; // change this, to be able to get it's name via getTitle()
|
||||
static protected final int STOP = JavaToolbar.STOP;
|
||||
|
||||
static protected final int NEW = JavaToolbar.NEW;
|
||||
static protected final int OPEN = JavaToolbar.OPEN;
|
||||
static protected final int SAVE = JavaToolbar.SAVE;
|
||||
static protected final int EXPORT = JavaToolbar.EXPORT;
|
||||
static protected final int NEW = JavaToolbar.NEW;
|
||||
static protected final int OPEN = JavaToolbar.OPEN;
|
||||
static protected final int SAVE = JavaToolbar.SAVE;
|
||||
static protected final int EXPORT = JavaToolbar.EXPORT;
|
||||
|
||||
static protected final int DEBUG = JavaToolbar.RUN;
|
||||
static protected final int CONTINUE = 101;
|
||||
|
||||
@@ -19,10 +19,7 @@ package processing.mode.java2;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
import com.sun.jdi.event.*;
|
||||
import com.sun.jdi.request.BreakpointRequest;
|
||||
import com.sun.jdi.request.ClassPrepareRequest;
|
||||
import com.sun.jdi.request.EventRequestManager;
|
||||
import com.sun.jdi.request.StepRequest;
|
||||
import com.sun.jdi.request.*;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -534,7 +531,7 @@ public class Debugger implements VMEventListener {
|
||||
Logger.getLogger(Debugger.class.getName()).log(Level.INFO, "*** VM Event: {0}", e.toString());
|
||||
if (e instanceof VMStartEvent) {
|
||||
//initialThread = ((VMStartEvent) e).thread();
|
||||
ThreadReference t = ((VMStartEvent) e).thread();
|
||||
// ThreadReference t = ((VMStartEvent) e).thread();
|
||||
//printStackTrace(t);
|
||||
|
||||
// break on main class load
|
||||
@@ -582,7 +579,7 @@ public class Debugger implements VMEventListener {
|
||||
} else if (e instanceof BreakpointEvent) {
|
||||
BreakpointEvent be = (BreakpointEvent) e;
|
||||
currentThread = be.thread(); // save this thread
|
||||
BreakpointRequest br = (BreakpointRequest) be.request();
|
||||
// BreakpointRequest br = (BreakpointRequest) be.request();
|
||||
|
||||
//printSourceLocation(currentThread);
|
||||
updateVariableInspector(currentThread); // this is already on the EDT
|
||||
@@ -730,7 +727,7 @@ public class Debugger implements VMEventListener {
|
||||
System.out.println("stack trace for thread " + t.name() + ":");
|
||||
int i = 0;
|
||||
for (StackFrame f : t.frames()) {
|
||||
Location l = f.location();
|
||||
// Location l = f.location();
|
||||
System.out.println(i++ + ": " + f.toString());
|
||||
}
|
||||
} catch (IncompatibleThreadStateException ex) {
|
||||
@@ -1078,7 +1075,7 @@ public class Debugger implements VMEventListener {
|
||||
protected List<DefaultMutableTreeNode> getStackTrace(ThreadReference t) {
|
||||
List<DefaultMutableTreeNode> stack = new ArrayList();
|
||||
try {
|
||||
int i = 0;
|
||||
// int i = 0;
|
||||
for (StackFrame f : t.frames()) {
|
||||
stack.add(new DefaultMutableTreeNode(locationToString(f.location())));
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ import javax.swing.UIManager;
|
||||
import javax.swing.event.TreeExpansionEvent;
|
||||
import javax.swing.event.TreeExpansionListener;
|
||||
import javax.swing.table.TableColumn;
|
||||
import javax.swing.tree.AbstractLayoutCache;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
import javax.swing.tree.ExpandVetoException;
|
||||
@@ -359,8 +358,8 @@ public class VariableInspector extends javax.swing.JFrame {
|
||||
}
|
||||
} else {
|
||||
if (o instanceof TreeNode) {
|
||||
TreeNode node = (TreeNode) o;
|
||||
AbstractLayoutCache layout = tree.getLayoutCache();
|
||||
// TreeNode node = (TreeNode) o;
|
||||
// AbstractLayoutCache layout = tree.getLayoutCache();
|
||||
UIDefaults defaults = UIManager.getDefaults();
|
||||
|
||||
boolean isLeaf = model.isLeaf(o);
|
||||
@@ -896,6 +895,7 @@ public class VariableInspector extends javax.swing.JFrame {
|
||||
* Prefix a this-fields name with "this." if hidden by a local.
|
||||
*/
|
||||
public static final int MODE_PREFIX = 1; // prefix hidden this fields with "this."
|
||||
@SuppressWarnings("hiding")
|
||||
protected List<VariableNode> locals;
|
||||
protected int mode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user