From ac9e62462eb7ba9b7271ecbc7e354f1c9b6a9d54 Mon Sep 17 00:00:00 2001 From: Manindra Moharana Date: Fri, 1 Feb 2013 20:04:50 +0530 Subject: [PATCH 1/9] textarea painter bug fix. --- .../mode/experimental/ErrorCheckerService.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/experimental/src/processing/mode/experimental/ErrorCheckerService.java b/experimental/src/processing/mode/experimental/ErrorCheckerService.java index c3419aacb..69803cc65 100755 --- a/experimental/src/processing/mode/experimental/ErrorCheckerService.java +++ b/experimental/src/processing/mode/experimental/ErrorCheckerService.java @@ -243,6 +243,8 @@ public class ErrorCheckerService implements Runnable{ if (pauseThread) continue; + updatePaintedThingy(); + if(textModified.get() == 0) continue; @@ -281,7 +283,7 @@ public class ErrorCheckerService implements Runnable{ updateErrorTable(); editor.updateErrorBar(problemsList); updateEditorStatus(); - updateTextAreaPainter(); + // updatePaintedThingy(); int x = textModified.get(); //System.out.println("TM " + x); if(x>=3){ @@ -673,15 +675,14 @@ public class ErrorCheckerService implements Runnable{ /** * Repaints the textarea if required */ - public void updateTextAreaPainter() { - // TODO: Make this function of some use + public void updatePaintedThingy() { editor.getTextArea().repaint(); currentTab = editor.getSketch().getCodeIndex( editor.getSketch().getCurrentCode()); if (currentTab != lastTab) { lastTab = currentTab; - // editor.getTextArea().repaint(); - // System.out.println("1 Repaint " + System.currentTimeMillis()); + editor.updateErrorBar(problemsList); + updateEditorStatus(); return; } From 7ced2a6a9e3bfa5fad1a9a97ea462ed640c3ca4a Mon Sep 17 00:00:00 2001 From: Manindra Moharana Date: Fri, 1 Feb 2013 20:11:15 +0530 Subject: [PATCH 2/9] editor status repaint --- .../src/processing/mode/experimental/ErrorCheckerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experimental/src/processing/mode/experimental/ErrorCheckerService.java b/experimental/src/processing/mode/experimental/ErrorCheckerService.java index 69803cc65..b196bbf26 100755 --- a/experimental/src/processing/mode/experimental/ErrorCheckerService.java +++ b/experimental/src/processing/mode/experimental/ErrorCheckerService.java @@ -677,12 +677,12 @@ public class ErrorCheckerService implements Runnable{ */ public void updatePaintedThingy() { editor.getTextArea().repaint(); + updateEditorStatus(); currentTab = editor.getSketch().getCodeIndex( editor.getSketch().getCurrentCode()); if (currentTab != lastTab) { lastTab = currentTab; - editor.updateErrorBar(problemsList); - updateEditorStatus(); + editor.updateErrorBar(problemsList); return; } From ed1c8cca7648b24e693635cf429c955f42d183a7 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Feb 2013 10:18:32 -0500 Subject: [PATCH 3/9] add build warnings for JAVA_HOME, improve platform detection, misc todo notes --- app/build.xml | 3 +++ build/build.xml | 48 +++++++++++++++++++++++++++++++++++++----------- todo.txt | 9 ++++++--- 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/app/build.xml b/app/build.xml index c57136817..05d181e34 100644 --- a/app/build.xml +++ b/app/build.xml @@ -78,11 +78,13 @@ + + - - - - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/todo.txt b/todo.txt index a6478f2eb..14c2586e7 100644 --- a/todo.txt +++ b/todo.txt @@ -54,6 +54,9 @@ X Library manager leaves temporary folders in sketchbook folder X http://code.google.com/p/processing/issues/detail?id=1527 X "Auto format" should not scroll current line to first line X http://code.google.com/p/processing/issues/detail?id=1533 +X add to build instructions for OS X: +X ant won't work w/ Java 1.7 until you set JAVA_HOME +X export JAVA_HOME=`/usr/libexec/java_home` manindra M bug that was causing the Debugger to point to wrong break point line numbers @@ -78,9 +81,9 @@ o if sketch was open, then restart by dragging the .pde to p5.app https://processing-js.lighthouseapp.com/ -_ add to build instructions for OS X: -_ ant won't work w/ Java 1.7 until you set JAVA_HOME -_ export JAVA_HOME=`/usr/libexec/java_home` +Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Bounds out of range: 5374,5376 [5375] + at processing.app.syntax.JEditTextArea.select(JEditTextArea.java:1214) + at processing.app.Editor.handleIndentOutdent(Editor.java:1819) _ add Iterator as an import? From 063e66eb3664af4546bbd943dd8331c479326867 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Feb 2013 10:56:23 -0500 Subject: [PATCH 4/9] fix "Bounds out of range" when outdenting a block of text --- app/src/processing/app/Editor.java | 3 ++- todo.txt | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 90b50b88b..923045253 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1816,7 +1816,8 @@ public abstract class Editor extends JFrame implements RunnerListener { textarea.setSelectedText(tabString); } else { // outdent - textarea.select(location, location + tabSize); + int last = Math.min(location + tabSize, textarea.getDocumentLength()); + textarea.select(location, last); // Don't eat code if it's not indented if (textarea.getSelectedText().equals(tabString)) { textarea.setSelectedText(""); diff --git a/todo.txt b/todo.txt index 14c2586e7..8653f2e3c 100644 --- a/todo.txt +++ b/todo.txt @@ -57,6 +57,10 @@ X http://code.google.com/p/processing/issues/detail?id=1533 X add to build instructions for OS X: X ant won't work w/ Java 1.7 until you set JAVA_HOME X export JAVA_HOME=`/usr/libexec/java_home` +X fix "Bounds out of range" when outdenting a block of text +X Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Bounds out of range: 5374,5376 [5375] +X at processing.app.syntax.JEditTextArea.select(JEditTextArea.java:1214) +X at processing.app.Editor.handleIndentOutdent(Editor.java:1819) manindra M bug that was causing the Debugger to point to wrong break point line numbers @@ -81,10 +85,6 @@ o if sketch was open, then restart by dragging the .pde to p5.app https://processing-js.lighthouseapp.com/ -Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Bounds out of range: 5374,5376 [5375] - at processing.app.syntax.JEditTextArea.select(JEditTextArea.java:1214) - at processing.app.Editor.handleIndentOutdent(Editor.java:1819) - _ add Iterator as an import? _ remove sketch.properties when moving back to the default? From ad38b7d7967a5c4b46858143fb913ca889746c43 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Feb 2013 11:29:58 -0500 Subject: [PATCH 5/9] add patch for Play Button not working (issue #688) --- app/src/processing/app/EditorToolbar.java | 11 ++++++----- app/src/processing/mode/java/JavaEditor.java | 6 ++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index 1855dfe42..d77f8ff97 100644 --- a/app/src/processing/app/EditorToolbar.java +++ b/app/src/processing/app/EditorToolbar.java @@ -310,7 +310,6 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList int x = e.getX(); int y = e.getY(); - // if (currentRollover != -1) { if (rollover != null) { // if ((x > x1[currentRollover]) && (y > y1) && // (x < x2[currentRollover]) && (y < y2)) { @@ -319,9 +318,9 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList return; } else { - // setState(currentRollover, INACTIVE, true); - rollover.setState(INACTIVE, true); - // currentRollover = -1; + if (rollover.state == ROLLOVER) { + rollover.setState(INACTIVE, true); + } rollover = null; } } @@ -429,7 +428,9 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList // there is no more rollover, make sure that the rollover text goes away // currentRollover = -1; if (rollover != null) { - rollover.setState(INACTIVE, true); + if (rollover.state == ROLLOVER) { + rollover.setState(INACTIVE, true); + } rollover = null; } } diff --git a/app/src/processing/mode/java/JavaEditor.java b/app/src/processing/mode/java/JavaEditor.java index 2390570f1..1b576e447 100644 --- a/app/src/processing/mode/java/JavaEditor.java +++ b/app/src/processing/mode/java/JavaEditor.java @@ -464,12 +464,11 @@ public class JavaEditor extends Editor { public void handleRun() { - toolbar.activate(JavaToolbar.RUN); - new Thread(new Runnable() { public void run() { prepareRun(); try { + toolbar.activate(JavaToolbar.RUN); runtime = jmode.handleRun(sketch, JavaEditor.this); // System.out.println("runtime now " + runtime); } catch (Exception e) { @@ -481,12 +480,11 @@ public class JavaEditor extends Editor { public void handlePresent() { - toolbar.activate(JavaToolbar.RUN); - new Thread(new Runnable() { public void run() { prepareRun(); try { + toolbar.activate(JavaToolbar.RUN); runtime = jmode.handlePresent(sketch, JavaEditor.this); } catch (Exception e) { statusError(e); From 7a096ca6e5eab92210d1c091fca75dbaa0ca2eac Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Feb 2013 08:47:21 -0800 Subject: [PATCH 6/9] Create README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..0000cc6c4 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +Processing +========== + +This is the official source code for the Processing Development Environment (PDE), +the 'core' and the libraries that are included with the download. + +If you have found a bug in the Processing software, you can file it here under the “issues” tab. +If it relates to JavaScript mode, please use [their issue tracker https://processing-js.lighthouseapp.com/]. + +The processing-web repository contains reference, examples, and the site. +(Please file issues there if they're in regard to anyonthing on the site, +the examples, or the reference.) + +Someday maybe I'll even take the time to update the build instructions, write code style guidelines, +fix all these bugs, throw together hundreds of unit tests, and solve the Israeli-Palestinian conflict. + +But in the meantime, I ask for your patience, participation, and patches. + +Ben Fry, 3 February 2013 From d9b10ceca0e812a1ddea3312d5fceab6d864b1c4 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Feb 2013 11:47:58 -0500 Subject: [PATCH 7/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0000cc6c4..c41800f05 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is the official source code for the Processing Development Environment (PDE the 'core' and the libraries that are included with the download. If you have found a bug in the Processing software, you can file it here under the “issues” tab. -If it relates to JavaScript mode, please use [their issue tracker https://processing-js.lighthouseapp.com/]. +If it relates to JavaScript mode, please use [their issue tracker](https://processing-js.lighthouseapp.com/). The processing-web repository contains reference, examples, and the site. (Please file issues there if they're in regard to anyonthing on the site, From c075ba52d20a2b8eb0160e328d56a694229288df Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Feb 2013 12:28:11 -0500 Subject: [PATCH 8/9] fix Linux readlink error when running processing-java (issue #1578) --- build/linux/processing | 18 +++++++++--------- todo.txt | 12 +++++++++--- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/build/linux/processing b/build/linux/processing index 541b53497..50aab89e5 100755 --- a/build/linux/processing +++ b/build/linux/processing @@ -98,14 +98,6 @@ log CLASSPATH export PATH="$JDKDIR/bin":"$PATH" log PATH -# Start Processing in the same directory as this script -if [ "$1" ]; then - SKETCH=`readlink -f $1` -else - SKETCH= -fi -cd "$APPDIR" - current_name=`basename $0` cmd_name='processing-java' @@ -113,5 +105,13 @@ if [ $current_name = $cmd_name ] then java processing.mode.java.Commander "$@" else - java processing.app.Base "$SKETCH" & + # Start Processing in the same directory as this script + if [ "$1" ]; then + SKETCH=`readlink -f $1` + else + SKETCH= + fi + cd "$APPDIR" + + java processing.app.Base "$SKETCH" & fi diff --git a/todo.txt b/todo.txt index 8653f2e3c..ab1ccb01f 100644 --- a/todo.txt +++ b/todo.txt @@ -61,6 +61,13 @@ X fix "Bounds out of range" when outdenting a block of text X Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Bounds out of range: 5374,5376 [5375] X at processing.app.syntax.JEditTextArea.select(JEditTextArea.java:1214) X at processing.app.Editor.handleIndentOutdent(Editor.java:1819) +X play button (and others) no longer highlighting +X http://code.google.com/p/processing/issues/detail?id=688 +X run button not properly unhighlighting +X patch from John Li (jli@circularly.org) +X readlink error when running processing-java +X patch from richard@crash.net.nz +X http://code.google.com/p/processing/issues/detail?id=1578 manindra M bug that was causing the Debugger to point to wrong break point line numbers @@ -96,6 +103,7 @@ _ "To use this library, you must use the 32-bit version of Processing." 2.0 FINAL / library/tool/mode manager cleanup +_ boogers still being left around _ make already installed libraries distinguishable in the list _ http://code.google.com/p/processing/issues/detail?id=1212 _ excessive CPU usage of PDE after using library manager @@ -606,9 +614,7 @@ _ http://code.google.com/p/processing/issues/detail?id=174 PDE / Editor Toolbar (Buttons) -_ play button (and others) no longer highlighting -_ http://code.google.com/p/processing/issues/detail?id=688 -_ run button not properly unhighlighting +_ run button issues (unconfirmed) _ does it unhighlight after compile or runtime errors? _ also when using draw() instead of loop() _ applet needs to notify runner that it has terminated From 19e892126bcd4cbb6f98b2a624549e64b1646940 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Feb 2013 13:03:17 -0500 Subject: [PATCH 9/9] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c41800f05..4dc287f57 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ Processing ========== -This is the official source code for the Processing Development Environment (PDE), -the 'core' and the libraries that are included with the download. +This is the official source code for the [Processing](http://processing.org) Development Environment (PDE), +the “core” and the libraries that are included with the [download](http://processing.org/download). -If you have found a bug in the Processing software, you can file it here under the “issues” tab. -If it relates to JavaScript mode, please use [their issue tracker](https://processing-js.lighthouseapp.com/). +If you have found a bug in the Processing software, you can file it here under the [“issues” tab](https://github.com/processing/processing/issues). +If it relates to the [JavaScript](http://processingjs.org) version, please use [their issue tracker](https://processing-js.lighthouseapp.com/). -The processing-web repository contains reference, examples, and the site. -(Please file issues there if they're in regard to anyonthing on the site, -the examples, or the reference.) +The [processing-web](https://github.com/processing/processing-web/) repository +contains reference, examples, and the site. +(Please use that link to file issues regarding the web site, the examples, or the reference.) Someday maybe I'll even take the time to update the build instructions, write code style guidelines, fix all these bugs, throw together hundreds of unit tests, and solve the Israeli-Palestinian conflict.