From 76e9b3490c3fa00c4d5784070747166f07e0bc92 Mon Sep 17 00:00:00 2001 From: benfry Date: Wed, 5 Dec 2012 01:26:54 +0000 Subject: [PATCH] prevent errors on first line of a new tab from highlighting on previous tab --- android/todo.txt | 1 - app/src/processing/mode/java/JavaBuild.java | 4 +++- .../mode/java/preproc/PdePreprocessor.java | 4 +++- build/shared/revisions.txt | 18 ++++++++++++------ todo.txt | 8 ++++---- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/android/todo.txt b/android/todo.txt index 02cfdd64b..8d332f8b0 100644 --- a/android/todo.txt +++ b/android/todo.txt @@ -154,7 +154,6 @@ _ check out andres' changes for PShape _ re: android libraries, from shawn van every The most powerful part were the libraries (and the ease with which they could be developed). Location, SMS, Camera/Video, Bluetooth (for Arduino integration) and PClient/PRequest were by far the most used. The ones that came with it, plus the ones from MJSoft were good though I ended up making a couple of very specific ones for my students: http://www.mobvcasting.com/wp/?cat=4 -_ separate activity and view _ process trackball events (they're only deltas) _ handle repeat key events _ implement link() diff --git a/app/src/processing/mode/java/JavaBuild.java b/app/src/processing/mode/java/JavaBuild.java index 837773229..483899782 100644 --- a/app/src/processing/mode/java/JavaBuild.java +++ b/app/src/processing/mode/java/JavaBuild.java @@ -285,7 +285,9 @@ public class JavaBuild { // then search through for anyone else whose preprocName is null, // since they've also been combined into the main pde. int errorFile = findErrorFile(errorLine); +// System.out.println("error line is " + errorLine + ", file is " + errorFile); errorLine -= sketch.getCode(errorFile).getPreprocOffset(); +// System.out.println(" preproc offset for that file: " + sketch.getCode(errorFile).getPreprocOffset()); // System.out.println("i found this guy snooping around.."); // System.out.println("whatcha want me to do with 'im boss?"); @@ -543,7 +545,7 @@ public class JavaBuild { protected int findErrorFile(int errorLine) { for (int i = sketch.getCodeCount() - 1; i > 0; i--) { SketchCode sc = sketch.getCode(i); - if (sc.isExtension("pde") && (sc.getPreprocOffset() < errorLine)) { + if (sc.isExtension("pde") && (sc.getPreprocOffset() <= errorLine)) { // keep looping until the errorLine is past the offset return i; } diff --git a/app/src/processing/mode/java/preproc/PdePreprocessor.java b/app/src/processing/mode/java/preproc/PdePreprocessor.java index 7f01553f4..2d4ac8945 100644 --- a/app/src/processing/mode/java/preproc/PdePreprocessor.java +++ b/app/src/processing/mode/java/preproc/PdePreprocessor.java @@ -260,7 +260,7 @@ public class PdePreprocessor { "values (not variables) for the size() command.\n" + "See the size() reference for an explanation."; Base.showWarning("Could not find sketch size", message, null); - new Exception().printStackTrace(System.out); +// new Exception().printStackTrace(System.out); return null; } @@ -563,6 +563,7 @@ public class PdePreprocessor { write(program, stream), programImports); } + static String substituteUnicode(String program) { // check for non-ascii chars (these will be/must be in unicode format) char p[] = program.toCharArray(); @@ -688,6 +689,7 @@ public class PdePreprocessor { return className; } + private PdeRecognizer createParser(final String program) { // create a lexer with the stream reader, and tell it to handle diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 6eebcccc6..d0ddc19f8 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -93,11 +93,6 @@ PROCESSING 2.0b7 (REV 0215) - 25 November 2012 [ bug fixes ] -+ Debug information wasn't being passed through to the console. - In addition, on Windows, error reporting wasn't working properly - (couldn't find the right line or report the error correctly). - http://code.google.com/p/processing/issues/detail?id=1440 - + mouseButton not being set properly in mouseClicked. http://code.google.com/p/processing/issues/detail?id=1350 @@ -113,6 +108,15 @@ PROCESSING 2.0b7 (REV 0215) - 25 November 2012 + 32-bit mode / 64-bit mode preference was ignored on OS X. http://code.google.com/p/processing/issues/detail?id=1426 ++ Prevent errors on first line of a new tab from highlighting the last + line of the previous tab. In particular, a single letter on a new tab + was highlighting the last line of the tab to its left. + ++ Android debug information wasn't being passed through to the console. + In addition, on Windows, error reporting wasn't working properly + (couldn't find the right line or report the error correctly). + http://code.google.com/p/processing/issues/detail?id=1440 + + Fix ugly results from resize() command on PImage: http://code.google.com/p/processing/issues/detail?id=332 and similar on Android: @@ -121,7 +125,9 @@ PROCESSING 2.0b7 (REV 0215) - 25 November 2012 + P2D/P3D PGraphics buffer failing to draw if larger than main surface. http://code.google.com/p/processing/issues/detail?id=1255 -+ Fix double error report when textMode(SCREEN) was used. ++ Fix double error report when textMode(SCREEN) was used: + textMode(SCREEN) has been removed from Processing 2.0. + textMode(256) is not supported by this renderer. + image(pgraphics, x, y, w, h) was only drawing once when shrinking. http://code.google.com/p/processing/issues/detail?id=1382 diff --git a/todo.txt b/todo.txt index 34c1109f3..c74198dcc 100644 --- a/todo.txt +++ b/todo.txt @@ -57,6 +57,10 @@ X change output from processing-java to be UTF-8 encoded X http://code.google.com/p/processing/issues/detail?id=1418 X Lauch programs in 32-bit mode / 64-bit mode ignored X http://code.google.com/p/processing/issues/detail?id=1426 +X double textMode() error message with P3D: +X textMode(SCREEN) has been removed from Processing 2.0. +X textMode(256) is not supported by this renderer. +X prevent errors on first line of a new tab from highlighting on previous tab earlier X The sketch name can't begin with '_' (underscore) @@ -73,10 +77,6 @@ _ insert "@SuppressWarnings({"unused", "cast"})" into _ JavaLexer, JavaRecognizer, PdeLexer, PdeRecognizer _ from processing/mode/java/preproc/ -_ double textMode() error message with P3D: -textMode(SCREEN) has been removed from Processing 2.0. -textMode(256) is not supported by this renderer. - 2.0 FINAL / casey requests _ errors that cannot be placed (i.e. missing brace) _ this makes things to jump to the last tab