Merge pull request #1636 from Manindra29/jdiMod

Moving on to eclipse jdi, getting rid of tools.jar dependency
This commit is contained in:
Ben Fry
2013-04-11 05:14:58 -07:00
10 changed files with 47 additions and 19 deletions
+4
View File
@@ -21,5 +21,9 @@
<classpathentry kind="lib" path="lib/apple.jar"/>
<classpathentry kind="lib" path="test/lib/junit-4.8.1.jar"/>
<classpathentry kind="lib" path="lib/org-netbeans-swing-outline.jar"/>
<classpathentry kind="lib" path="lib/com.ibm.icu_4.4.2.v20110823.jar"/>
<classpathentry kind="lib" path="lib/jdi.jar"/>
<classpathentry kind="lib" path="lib/jdimodel.jar"/>
<classpathentry kind="lib" path="lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+1 -1
View File
@@ -116,7 +116,7 @@
excludes="**/tools/format/**"
encoding="UTF-8"
includeAntRuntime="false"
classpath="../core/library/core.jar; ${env.JAVA_HOME}/lib/tools.jar; lib/ant.jar; lib/ant-launcher.jar; lib/antlr.jar; lib/apple.jar; lib/jdt-core.jar; lib/jna.jar; lib/org-netbeans-swing-outline.jar"
classpath="../core/library/core.jar; lib/ant.jar; lib/ant-launcher.jar; lib/antlr.jar; lib/apple.jar; lib/jdt-core.jar; lib/jna.jar; lib/org-netbeans-swing-outline.jar;lib/com.ibm.icu_4.4.2.v20110823.jar;lib/jdi.jar;lib/jdimodel.jar;lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar"
debug="on">
<src path="src" />
<src path="generated" />
@@ -363,7 +363,9 @@ public class EventThread extends Thread {
// com.sun.jdi.ObjectReference or = event.exception();
// System.out.println("exceptionEvent() fired " + or);
// System.out.println("catch location " + event.catchLocation());
for (ThreadReference thread : vm.allThreads()) {
thread.suspend();
}
parent.exception(event);
/*
+12 -12
View File
@@ -290,8 +290,7 @@ public class Runner implements MessageConsumer {
}
params.add(PApplet.ARGS_DISPLAY + "=" + runDisplay);
params.add(PApplet.ARGS_SKETCH_FOLDER + "=" +
build.getSketchPath());
if (presenting) {
params.add(PApplet.ARGS_FULL_SCREEN);
@@ -305,6 +304,10 @@ public class Runner implements MessageConsumer {
}
params.add(build.getSketchClassName());
params.add(PApplet.ARGS_SKETCH_FOLDER + "=" +
build.getSketchPath());
// Adding sketch path in the end coz it's likely to
// contain spaces and things go wrong on UNIX systems.
}
// String outgoing[] = new String[params.size()];
@@ -329,16 +332,13 @@ public class Runner implements MessageConsumer {
// Using localhost instead of 127.0.0.1 sometimes causes a
// "Transport Error 202" error message when trying to run.
// http://dev.processing.org/bugs/show_bug.cgi?id=895
String addr = "127.0.0.1:" + (8000 + (int) (Math.random() * 1000));
// String addr = "127.0.0.1:" + (8000 + (int) (Math.random() * 1000));
//String addr = "localhost:" + (8000 + (int) (Math.random() * 1000));
//String addr = "" + (8000 + (int) (Math.random() * 1000));
String addr = "" + (8000 + (int) (Math.random() * 1000));
String commandArgs =
"java -Xrunjdwp:transport=dt_socket,address=" + addr + ",suspend=y ";
if (Base.isWindows()) {
commandArgs =
"java -Xrunjdwp:transport=dt_shmem,address=" + addr + ",suspend=y ";
} else if (Base.isMacOS()) {
if (Base.isMacOS()) {
// Decided to just set this to 1.6 only, because otherwise it's gonna
// be a shitshow if folks are getting Apple's 1.6 with 32-bit and
// Oracle's 1.7 when run in 64-bit mode. ("Why does my sketch suck in
@@ -484,7 +484,7 @@ public class Runner implements MessageConsumer {
//if (writer != null) {
eventThread = new EventThread(this, vm, excludes, writer);
eventThread.start();
eventThread.setEventRequests(watchFields);
//eventThread.setEventRequests(watchFields); //redundant?
//}
//redirectOutput();
@@ -538,9 +538,9 @@ public class Runner implements MessageConsumer {
protected Connector findConnector(String connectorName) {
List connectors = Bootstrap.virtualMachineManager().allConnectors();
// List connectors =
// org.eclipse.jdi.Bootstrap.virtualMachineManager().allConnectors();
// List connectors = Bootstrap.virtualMachineManager().allConnectors();
List connectors =
org.eclipse.jdi.Bootstrap.virtualMachineManager().allConnectors();
// debug: code to list available connectors
// Iterator iter2 = connectors.iterator();