diff --git a/android/theme/theme.txt b/android/theme/theme.txt
index 27aed3f05..4898d1648 100644
--- a/android/theme/theme.txt
+++ b/android/theme/theme.txt
@@ -82,6 +82,9 @@ editor.brackethighlight.color = #006699
# TEXT - syntax highlighting
+editor.function1.style = #627516,plain
+editor.function2.style = #627516,bold
+
# e.g abstract, final, private
editor.keyword1.style = #627516,plain
# e.g. beginShape, point, line
diff --git a/app/src/processing/app/syntax/KeywordMap.java b/app/src/processing/app/syntax/KeywordMap.java
index d91268b2a..b8b66871d 100644
--- a/app/src/processing/app/syntax/KeywordMap.java
+++ b/app/src/processing/app/syntax/KeywordMap.java
@@ -76,7 +76,7 @@ public class KeywordMap {
// continue;
// }
if (length == k.keyword.length) {
- if (SyntaxUtilities.regionMatches(ignoreCase,text,offset, k.keyword)) {
+ if (SyntaxUtilities.regionMatches(ignoreCase, text, offset, k.keyword)) {
return k.id;
}
}
diff --git a/app/src/processing/app/syntax/PdeKeywords.java b/app/src/processing/app/syntax/PdeKeywords.java
index bead5d4e4..b7779f764 100644
--- a/app/src/processing/app/syntax/PdeKeywords.java
+++ b/app/src/processing/app/syntax/PdeKeywords.java
@@ -48,14 +48,17 @@ public class PdeKeywords extends TokenMarker {
if (keywordColoring == null) {
keywordColoring = new KeywordMap(false);
}
- // text will be KEYWORD or LITERAL
- boolean isKey = (coloring.charAt(0) == 'K');
// KEYWORD1 -> 0, KEYWORD2 -> 1, etc
int num = coloring.charAt(coloring.length() - 1) - '1';
- byte id = (byte) ((isKey ? Token.KEYWORD1 : Token.LITERAL1) + num);
- // Making an assumption (..., you, me) that KEYWORD2 and KEYWORD3
- // are the functions (at least that's what we're doing in P5 right now)
- keywordColoring.add(keyword, id, id == Token.KEYWORD2 || id == Token.KEYWORD3);
+// byte id = (byte) ((isKey ? Token.KEYWORD1 : Token.LITERAL1) + num);
+ int id = 0;
+ boolean paren = false;
+ switch (coloring.charAt(0)) {
+ case 'K': id = Token.KEYWORD1 + num; break;
+ case 'L': id = Token.LITERAL1 + num; break;
+ case 'F': id = Token.FUNCTION1 + num; paren = true; break;
+ }
+ keywordColoring.add(keyword, (byte) id, paren);
}
diff --git a/app/src/processing/app/syntax/PdeTextAreaDefaults.java b/app/src/processing/app/syntax/PdeTextAreaDefaults.java
index 62eec1bec..6bb0e5dc4 100644
--- a/app/src/processing/app/syntax/PdeTextAreaDefaults.java
+++ b/app/src/processing/app/syntax/PdeTextAreaDefaults.java
@@ -212,6 +212,12 @@ public class PdeTextAreaDefaults extends TextAreaDefaults {
// byte, char, short, color
styles[Token.KEYWORD3] = theme.getStyle("keyword3");
+ // beginShape, point, line
+ styles[Token.FUNCTION1] = theme.getStyle("function1");
+
+ // byte, char, short, color
+ styles[Token.FUNCTION2] = theme.getStyle("function2");
+
// constants: null, true, this, RGB, TWO_PI
styles[Token.LITERAL1] = theme.getStyle("literal1");
diff --git a/app/src/processing/app/syntax/SyntaxUtilities.java b/app/src/processing/app/syntax/SyntaxUtilities.java
index 80b3ac770..1e40ac831 100644
--- a/app/src/processing/app/syntax/SyntaxUtilities.java
+++ b/app/src/processing/app/syntax/SyntaxUtilities.java
@@ -20,8 +20,8 @@ import java.awt.*;
* @author Slava Pestov
* @version $Id$
*/
-public class SyntaxUtilities
-{
+public class SyntaxUtilities {
+
/**
* Checks if a subregion of a Segment is equal to a
* string.
@@ -31,8 +31,7 @@ public class SyntaxUtilities
* @param match The string to match
*/
public static boolean regionMatches(boolean ignoreCase, Segment text,
- int offset, String match)
- {
+ int offset, String match) {
int length = offset + match.length();
char[] textArray = text.array;
if(length > text.offset + text.count)
@@ -62,8 +61,7 @@ public class SyntaxUtilities
* @param match The character array to match
*/
public static boolean regionMatches(boolean ignoreCase, Segment text,
- int offset, char[] match)
- {
+ int offset, char[] match) {
int length = offset + match.length;
char[] textArray = text.array;
if(length > text.offset + text.count)
@@ -84,28 +82,29 @@ public class SyntaxUtilities
}
- /**
- * Returns the default style table. This can be passed to the
- * setStyles() method of SyntaxDocument
- * to use the default syntax styles.
- */
- public static SyntaxStyle[] getDefaultSyntaxStyles()
- {
- SyntaxStyle[] styles = new SyntaxStyle[Token.ID_COUNT];
-
- styles[Token.COMMENT1] = new SyntaxStyle(Color.black,true,false);
- styles[Token.COMMENT2] = new SyntaxStyle(new Color(0x990033),true,false);
- styles[Token.KEYWORD1] = new SyntaxStyle(Color.black,false,true);
- styles[Token.KEYWORD2] = new SyntaxStyle(Color.magenta,false,false);
- styles[Token.KEYWORD3] = new SyntaxStyle(new Color(0x009600),false,false);
- styles[Token.LITERAL1] = new SyntaxStyle(new Color(0x650099),false,false);
- styles[Token.LITERAL2] = new SyntaxStyle(new Color(0x650099),false,true);
- styles[Token.LABEL] = new SyntaxStyle(new Color(0x990033),false,true);
- styles[Token.OPERATOR] = new SyntaxStyle(Color.black,false,true);
- styles[Token.INVALID] = new SyntaxStyle(Color.red,false,true);
-
- return styles;
- }
+// /**
+// * Returns the default style table. This can be passed to the
+// * setStyles() method of SyntaxDocument
+// * to use the default syntax styles.
+// */
+// public static SyntaxStyle[] getDefaultSyntaxStyles() {
+// SyntaxStyle[] styles = new SyntaxStyle[Token.ID_COUNT];
+//
+// styles[Token.COMMENT1] = new SyntaxStyle(Color.black,true,false);
+// styles[Token.COMMENT2] = new SyntaxStyle(new Color(0x990033),true,false);
+// styles[Token.KEYWORD1] = new SyntaxStyle(Color.black,false,true);
+// styles[Token.KEYWORD2] = new SyntaxStyle(Color.magenta,false,false);
+// styles[Token.KEYWORD3] = new SyntaxStyle(new Color(0x009600),false,false);
+// styles[Token.FUNCTION1] = new SyntaxStyle(Color.magenta,false,false);
+// styles[Token.FUNCTION2] = new SyntaxStyle(new Color(0x009600),false,false);
+// styles[Token.LITERAL1] = new SyntaxStyle(new Color(0x650099),false,false);
+// styles[Token.LITERAL2] = new SyntaxStyle(new Color(0x650099),false,true);
+// styles[Token.LABEL] = new SyntaxStyle(new Color(0x990033),false,true);
+// styles[Token.OPERATOR] = new SyntaxStyle(Color.black,false,true);
+// styles[Token.INVALID] = new SyntaxStyle(Color.red,false,true);
+//
+// return styles;
+// }
/**
diff --git a/app/src/processing/app/syntax/Token.java b/app/src/processing/app/syntax/Token.java
index 403e263b3..a18ea9e8c 100644
--- a/app/src/processing/app/syntax/Token.java
+++ b/app/src/processing/app/syntax/Token.java
@@ -76,9 +76,9 @@ public class Token
*/
public static final byte KEYWORD3 = 8;
- public static final byte KEYWORD4 = 9;
+ public static final byte FUNCTION1 = 9;
- public static final byte KEYWORD5 = 10;
+ public static final byte FUNCTION2 = 10;
/**
* Operator token id. This can be used to mark an
diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt
index ca5be0c08..afa0dae10 100644
--- a/build/shared/revisions.txt
+++ b/build/shared/revisions.txt
@@ -88,8 +88,8 @@ PROCESSING 2.0b7 (REV 0215) - 25 November 2012
+ mousePressed() coloring now different from mousePressed
http://code.google.com/p/processing/issues/detail?id=41
Still not necessarily perfect, but it's a big improvement.
- Note for people implementing their own Modes: KEYWORD2 and
- KEYWORD3 are now reserved for functions with parens.
+ Note for people implementing their own Modes: FUNCTION1 and
+ FUNCTION2 have now been added for functions with parens.
+ Fix ugly results from resize() command on PImage:
http://code.google.com/p/processing/issues/detail?id=332
@@ -102,7 +102,7 @@ PROCESSING 2.0b7 (REV 0215) - 25 November 2012
+ image(pgraphics, x, y, w, h) was only drawing once when shrinking.
http://code.google.com/p/processing/issues/detail?id=1382
-+ beginShape(QUAD) was not working with Java2D
++ beginShape(QUAD) was not working with Java2D.
http://code.google.com/p/processing/issues/detail?id=1365
+ Relative coordinates not updated properly on closepath with SVG files.
@@ -179,6 +179,12 @@ PROCESSING 2.0b7 (REV 0215) - 25 November 2012
+ Resizeable frame crashes sketch with AMD video card.
http://code.google.com/p/processing/issues/detail?id=1175
++ set(x, y, PImage) doesn't work with P2D/P3D.
+ http://code.google.com/p/processing/issues/detail?id=1185
+
++ begin/endShape with a single vertex causing crash on P2D/P3D.
+ http://code.google.com/p/processing/issues/detail?id=1421
+
[ android ]
+ Like the desktop release, removed default imports. This includes:
diff --git a/core/todo.txt b/core/todo.txt
index 3cc1f5a64..f5fe8cb7f 100644
--- a/core/todo.txt
+++ b/core/todo.txt
@@ -74,6 +74,10 @@ A ortho() displays strange line widths
A http://code.google.com/p/processing/issues/detail?id=1285
A resizeable frame crashes sketch with AMD video card
A http://code.google.com/p/processing/issues/detail?id=1175
+A set(x, y, PImage) doesn't work with P2D/P3D
+A http://code.google.com/p/processing/issues/detail?id=1185
+A Processing 2.0b6 p2d / p3d arraylist pvector display issues
+A http://code.google.com/p/processing/issues/detail?id=1421
_ implement mousePressed(Event) etc
_ better to do this instead of bringing back the magic event
diff --git a/java/keywords.txt b/java/keywords.txt
index 9954ac22b..924623629 100644
--- a/java/keywords.txt
+++ b/java/keywords.txt
@@ -3,7 +3,7 @@
# LITERAL2 - constants
# KEYWORD1 - Java datatypes and keywords
# KEYWORD2 - functions
-# KEYWORD3 - methods (functions inside a class)
+# FUNCTION2 - methods (functions inside a class)
# KEYWORD4 - fields (variables inside a class)
# KEYWORD5 - Processing variables (width, height, focused, etc.)
@@ -240,72 +240,72 @@ volatile KEYWORD1
# Formerly KEYWORD1, but changed to paren handling (2.0b7)
-for KEYWORD2 for
-if KEYWORD2 if
-switch KEYWORD2 switch
-synchronized KEYWORD2
-while KEYWORD2 while
+for FUNCTION1 for
+if FUNCTION1 if
+switch FUNCTION1 switch
+synchronized FUNCTION1
+while FUNCTION1 while
# Deprecated API (commented these out for 2.0b7)
-#arraycopy KEYWORD2 arrayCopy_
-#openStream KEYWORD2 openStream_
+#arraycopy FUNCTION1 arrayCopy_
+#openStream FUNCTION1 openStream_
#OPENGL LITERAL2 size_
#JAVA2D LITERAL2 size_
-# KEYWORD2 specifies functions and KEYWORD3 specifies methods
+# FUNCTION1 specifies functions and FUNCTION2 specifies methods
# These items are a part of Processing but are not included in the reference
-boolean KEYWORD2 booleanconvert_
-byte KEYWORD2 byteconvert_
-cache KEYWORD2
-char KEYWORD2 charconvert_
+boolean FUNCTION1 booleanconvert_
+byte FUNCTION1 byteconvert_
+cache FUNCTION1
+char FUNCTION1 charconvert_
color KEYWORD1 color_datatype
-start KEYWORD2
-stop KEYWORD2
-breakShape KEYWORD2
-createPath KEYWORD2
-float KEYWORD2 floatconvert_
-int KEYWORD2 intconvert_
-str KEYWORD2 strconvert_
-loadMatrix KEYWORD2
-noHint KEYWORD2
-parseBoolean KEYWORD2
-parseByte KEYWORD2
-parseChar KEYWORD2
-parseFloat KEYWORD2
-parseInt KEYWORD2
-saveFile KEYWORD2
-savePath KEYWORD2
-sketchFile KEYWORD2
-sketchPath KEYWORD2
-string KEYWORD2 strconvert_
+start FUNCTION1
+stop FUNCTION1
+breakShape FUNCTION1
+createPath FUNCTION1
+float FUNCTION1 floatconvert_
+int FUNCTION1 intconvert_
+str FUNCTION1 strconvert_
+loadMatrix FUNCTION1
+noHint FUNCTION1
+parseBoolean FUNCTION1
+parseByte FUNCTION1
+parseChar FUNCTION1
+parseFloat FUNCTION1
+parseInt FUNCTION1
+saveFile FUNCTION1
+savePath FUNCTION1
+sketchFile FUNCTION1
+sketchPath FUNCTION1
+string FUNCTION1 strconvert_
-#KEYWORD3 is an experimental designation for methods
-readLine KEYWORD3 BufferedReader_readLine_
-close KEYWORD3 PrintWriter_close_
-flush KEYWORD3 PrintWriter_flush_
-print KEYWORD3 PrintWriter_print_
-println KEYWORD3 PrintWriter_println_
-charAt KEYWORD3 String_charAt_
-equals KEYWORD3 String_equals_
-indexOf KEYWORD3 String_indexOf_
-length KEYWORD3 String_length_
-substring KEYWORD3 String_substring_
-toLowerCase KEYWORD3 String_toLowerCase_
-toUpperCase KEYWORD3 String_toUpperCase_
+#FUNCTION2 is an experimental designation for methods
+readLine FUNCTION2 BufferedReader_readLine_
+close FUNCTION2 PrintWriter_close_
+flush FUNCTION2 PrintWriter_flush_
+print FUNCTION2 PrintWriter_print_
+println FUNCTION2 PrintWriter_println_
+charAt FUNCTION2 String_charAt_
+equals FUNCTION2 String_equals_
+indexOf FUNCTION2 String_indexOf_
+length FUNCTION2 String_length_
+substring FUNCTION2 String_substring_
+toLowerCase FUNCTION2 String_toLowerCase_
+toUpperCase FUNCTION2 String_toUpperCase_
# Temporary additions 3 September 2012 as the reference is getting updated
-beginContour KEYWORD2
-endContour KEYWORD2
-end KEYWORD2
-addChild KEYWORD2
+beginContour FUNCTION1
+endContour FUNCTION1
+end FUNCTION1
+addChild FUNCTION1
-clip KEYWORD2
-noClip KEYWORD2
+clip FUNCTION1
+noClip FUNCTION1
# Operators are without KEYWORDS
@@ -351,342 +351,342 @@ noClip KEYWORD2
# THE TEXT BELOW IS AUTO-GENERATED
-abs KEYWORD2 abs_
-acos KEYWORD2 acos_
-alpha KEYWORD2 alpha_
-ambient KEYWORD2 ambient_
-ambientLight KEYWORD2 ambientLight_
-append KEYWORD2 append_
-applyMatrix KEYWORD2 applyMatrix_
-arc KEYWORD2 arc_
-arrayCopy KEYWORD2 arrayCopy_
-asin KEYWORD2 asin_
-atan KEYWORD2 atan_
-atan2 KEYWORD2 atan2_
-background KEYWORD2 background_
-beginCamera KEYWORD2 beginCamera_
-beginRaw KEYWORD2 beginRaw_
-beginRecord KEYWORD2 beginRecord_
-beginShape KEYWORD2 beginShape_
-bezier KEYWORD2 bezier_
-bezierDetail KEYWORD2 bezierDetail_
-bezierPoint KEYWORD2 bezierPoint_
-bezierTangent KEYWORD2 bezierTangent_
-bezierVertex KEYWORD2 bezierVertex_
-binary KEYWORD2 binary_
-blend KEYWORD2 blend_
-blendColor KEYWORD2 blendColor_
-blendMode KEYWORD2 blendMode_
-blue KEYWORD2 blue_
-box KEYWORD2 box_
-brightness KEYWORD2 brightness_
-camera KEYWORD2 camera_
-ceil KEYWORD2 ceil_
-clip KEYWORD2 clip_
-color KEYWORD2 color_
-colorMode KEYWORD2 colorMode_
-concat KEYWORD2 concat_
-constrain KEYWORD2 constrain_
-copy KEYWORD2 copy_
-cos KEYWORD2 cos_
-createFont KEYWORD2 createFont_
-createGraphics KEYWORD2 createGraphics_
-createImage KEYWORD2 createImage_
-createInput KEYWORD2 createInput_
-createOutput KEYWORD2 createOutput_
-createReader KEYWORD2 createReader_
-createShape KEYWORD2 createShape_
-createWriter KEYWORD2 createWriter_
-cursor KEYWORD2 cursor_
-curve KEYWORD2 curve_
-curveDetail KEYWORD2 curveDetail_
-curvePoint KEYWORD2 curvePoint_
-curveTangent KEYWORD2 curveTangent_
-curveTightness KEYWORD2 curveTightness_
-curveVertex KEYWORD2 curveVertex_
-day KEYWORD2 day_
-degrees KEYWORD2 degrees_
-directionalLight KEYWORD2 directionalLight_
+abs FUNCTION1 abs_
+acos FUNCTION1 acos_
+alpha FUNCTION1 alpha_
+ambient FUNCTION1 ambient_
+ambientLight FUNCTION1 ambientLight_
+append FUNCTION1 append_
+applyMatrix FUNCTION1 applyMatrix_
+arc FUNCTION1 arc_
+arrayCopy FUNCTION1 arrayCopy_
+asin FUNCTION1 asin_
+atan FUNCTION1 atan_
+atan2 FUNCTION1 atan2_
+background FUNCTION1 background_
+beginCamera FUNCTION1 beginCamera_
+beginRaw FUNCTION1 beginRaw_
+beginRecord FUNCTION1 beginRecord_
+beginShape FUNCTION1 beginShape_
+bezier FUNCTION1 bezier_
+bezierDetail FUNCTION1 bezierDetail_
+bezierPoint FUNCTION1 bezierPoint_
+bezierTangent FUNCTION1 bezierTangent_
+bezierVertex FUNCTION1 bezierVertex_
+binary FUNCTION1 binary_
+blend FUNCTION1 blend_
+blendColor FUNCTION1 blendColor_
+blendMode FUNCTION1 blendMode_
+blue FUNCTION1 blue_
+box FUNCTION1 box_
+brightness FUNCTION1 brightness_
+camera FUNCTION1 camera_
+ceil FUNCTION1 ceil_
+clip FUNCTION1 clip_
+color FUNCTION1 color_
+colorMode FUNCTION1 colorMode_
+concat FUNCTION1 concat_
+constrain FUNCTION1 constrain_
+copy FUNCTION1 copy_
+cos FUNCTION1 cos_
+createFont FUNCTION1 createFont_
+createGraphics FUNCTION1 createGraphics_
+createImage FUNCTION1 createImage_
+createInput FUNCTION1 createInput_
+createOutput FUNCTION1 createOutput_
+createReader FUNCTION1 createReader_
+createShape FUNCTION1 createShape_
+createWriter FUNCTION1 createWriter_
+cursor FUNCTION1 cursor_
+curve FUNCTION1 curve_
+curveDetail FUNCTION1 curveDetail_
+curvePoint FUNCTION1 curvePoint_
+curveTangent FUNCTION1 curveTangent_
+curveTightness FUNCTION1 curveTightness_
+curveVertex FUNCTION1 curveVertex_
+day FUNCTION1 day_
+degrees FUNCTION1 degrees_
+directionalLight FUNCTION1 directionalLight_
displayHeight LITERAL2 displayHeight
displayWidth LITERAL2 displayWidth
-dist KEYWORD2 dist_
-draw KEYWORD2 draw_
-ellipse KEYWORD2 ellipse_
-ellipseMode KEYWORD2 ellipseMode_
-emissive KEYWORD2 emissive_
-endCamera KEYWORD2 endCamera_
-endRaw KEYWORD2 endRaw_
-endRecord KEYWORD2 endRecord_
-endShape KEYWORD2 endShape_
-exit KEYWORD2 exit_
-exp KEYWORD2 exp_
-expand KEYWORD2 expand_
-fill KEYWORD2 fill_
-filter KEYWORD2 filter_
-floor KEYWORD2 floor_
+dist FUNCTION1 dist_
+draw FUNCTION1 draw_
+ellipse FUNCTION1 ellipse_
+ellipseMode FUNCTION1 ellipseMode_
+emissive FUNCTION1 emissive_
+endCamera FUNCTION1 endCamera_
+endRaw FUNCTION1 endRaw_
+endRecord FUNCTION1 endRecord_
+endShape FUNCTION1 endShape_
+exit FUNCTION1 exit_
+exp FUNCTION1 exp_
+expand FUNCTION1 expand_
+fill FUNCTION1 fill_
+filter FUNCTION1 filter_
+floor FUNCTION1 floor_
focused LITERAL2 focused
frameCount LITERAL2 frameCount
frameRate LITERAL2 frameRate
-frameRate KEYWORD2 frameRate_
-frustum KEYWORD2 frustum_
-get KEYWORD2 get_
-green KEYWORD2 green_
+frameRate FUNCTION1 frameRate_
+frustum FUNCTION1 frustum_
+get FUNCTION1 get_
+green FUNCTION1 green_
HALF_PI LITERAL2 HALF_PI
height LITERAL2 height
-hex KEYWORD2 hex_
-hint KEYWORD2 hint_
-hour KEYWORD2 hour_
-hue KEYWORD2 hue_
-image KEYWORD2 image_
-imageMode KEYWORD2 imageMode_
-join KEYWORD2 join_
+hex FUNCTION1 hex_
+hint FUNCTION1 hint_
+hour FUNCTION1 hour_
+hue FUNCTION1 hue_
+image FUNCTION1 image_
+imageMode FUNCTION1 imageMode_
+join FUNCTION1 join_
key LITERAL2 key
keyCode LITERAL2 keyCode
-keyPressed KEYWORD2 keyPressed_
+keyPressed FUNCTION1 keyPressed_
keyPressed LITERAL2 keyPressed
-keyReleased KEYWORD2 keyReleased_
-keyTyped KEYWORD2 keyTyped_
-lerp KEYWORD2 lerp_
-lerpColor KEYWORD2 lerpColor_
-lightFalloff KEYWORD2 lightFalloff_
-lights KEYWORD2 lights_
-lightSpecular KEYWORD2 lightSpecular_
-line KEYWORD2 line_
-loadBytes KEYWORD2 loadBytes_
-loadFont KEYWORD2 loadFont_
-loadImage KEYWORD2 loadImage_
-loadPixels KEYWORD2 loadPixels_
-loadShader KEYWORD2 loadShader_
-loadShape KEYWORD2 loadShape_
-loadStrings KEYWORD2 loadStrings_
-loadTable KEYWORD2 loadTable_
-loadXML KEYWORD2 loadXML_
-log KEYWORD2 log_
-loop KEYWORD2 loop_
-mag KEYWORD2 mag_
-map KEYWORD2 map_
-match KEYWORD2 match_
-matchAll KEYWORD2 matchAll_
-max KEYWORD2 max_
-millis KEYWORD2 millis_
-min KEYWORD2 min_
-minute KEYWORD2 minute_
-modelX KEYWORD2 modelX_
-modelY KEYWORD2 modelY_
-modelZ KEYWORD2 modelZ_
-month KEYWORD2 month_
+keyReleased FUNCTION1 keyReleased_
+keyTyped FUNCTION1 keyTyped_
+lerp FUNCTION1 lerp_
+lerpColor FUNCTION1 lerpColor_
+lightFalloff FUNCTION1 lightFalloff_
+lights FUNCTION1 lights_
+lightSpecular FUNCTION1 lightSpecular_
+line FUNCTION1 line_
+loadBytes FUNCTION1 loadBytes_
+loadFont FUNCTION1 loadFont_
+loadImage FUNCTION1 loadImage_
+loadPixels FUNCTION1 loadPixels_
+loadShader FUNCTION1 loadShader_
+loadShape FUNCTION1 loadShape_
+loadStrings FUNCTION1 loadStrings_
+loadTable FUNCTION1 loadTable_
+loadXML FUNCTION1 loadXML_
+log FUNCTION1 log_
+loop FUNCTION1 loop_
+mag FUNCTION1 mag_
+map FUNCTION1 map_
+match FUNCTION1 match_
+matchAll FUNCTION1 matchAll_
+max FUNCTION1 max_
+millis FUNCTION1 millis_
+min FUNCTION1 min_
+minute FUNCTION1 minute_
+modelX FUNCTION1 modelX_
+modelY FUNCTION1 modelY_
+modelZ FUNCTION1 modelZ_
+month FUNCTION1 month_
mouseButton LITERAL2 mouseButton
-mouseClicked KEYWORD2 mouseClicked_
-mouseDragged KEYWORD2 mouseDragged_
-mouseMoved KEYWORD2 mouseMoved_
-mousePressed KEYWORD2 mousePressed_
+mouseClicked FUNCTION1 mouseClicked_
+mouseDragged FUNCTION1 mouseDragged_
+mouseMoved FUNCTION1 mouseMoved_
+mousePressed FUNCTION1 mousePressed_
mousePressed LITERAL2 mousePressed
-mouseReleased KEYWORD2 mouseReleased_
+mouseReleased FUNCTION1 mouseReleased_
mouseX LITERAL2 mouseX
mouseY LITERAL2 mouseY
-nf KEYWORD2 nf_
-nfc KEYWORD2 nfc_
-nfp KEYWORD2 nfp_
-nfs KEYWORD2 nfs_
-noClip KEYWORD2 noClip_
-noCursor KEYWORD2 noCursor_
-noFill KEYWORD2 noFill_
-noise KEYWORD2 noise_
-noiseDetail KEYWORD2 noiseDetail_
-noiseSeed KEYWORD2 noiseSeed_
-noLights KEYWORD2 noLights_
-noLoop KEYWORD2 noLoop_
-norm KEYWORD2 norm_
-normal KEYWORD2 normal_
-noSmooth KEYWORD2 noSmooth_
-noStroke KEYWORD2 noStroke_
-noTint KEYWORD2 noTint_
-open KEYWORD2 open_
-ortho KEYWORD2 ortho_
-perspective KEYWORD2 perspective_
+nf FUNCTION1 nf_
+nfc FUNCTION1 nfc_
+nfp FUNCTION1 nfp_
+nfs FUNCTION1 nfs_
+noClip FUNCTION1 noClip_
+noCursor FUNCTION1 noCursor_
+noFill FUNCTION1 noFill_
+noise FUNCTION1 noise_
+noiseDetail FUNCTION1 noiseDetail_
+noiseSeed FUNCTION1 noiseSeed_
+noLights FUNCTION1 noLights_
+noLoop FUNCTION1 noLoop_
+norm FUNCTION1 norm_
+normal FUNCTION1 normal_
+noSmooth FUNCTION1 noSmooth_
+noStroke FUNCTION1 noStroke_
+noTint FUNCTION1 noTint_
+open FUNCTION1 open_
+ortho FUNCTION1 ortho_
+perspective FUNCTION1 perspective_
PFont KEYWORD1 PFont
-list KEYWORD2 PFont_list_
-PGraphics KEYWORD2 PGraphics_
-beginDraw KEYWORD3 PGraphics_beginDraw_
-endDraw KEYWORD3 PGraphics_endDraw_
+list FUNCTION1 PFont_list_
+PGraphics FUNCTION1 PGraphics_
+beginDraw FUNCTION2 PGraphics_beginDraw_
+endDraw FUNCTION2 PGraphics_endDraw_
PI LITERAL2 PI
PImage KEYWORD1 PImage
-alpha KEYWORD3 PImage_alpha_
-blend KEYWORD3 PImage_blend_
-copy KEYWORD3 PImage_copy_
-filter KEYWORD3 PImage_filter_
-get KEYWORD3 PImage_get_
-height KEYWORD3 PImage_height_
-loadPixels KEYWORD3 PImage_loadPixels_
-mask KEYWORD3 PImage_mask_
-pixels KEYWORD3 PImage_pixels_
-resize KEYWORD3 PImage_resize_
-save KEYWORD3 PImage_save_
-set KEYWORD3 PImage_set_
-updatePixels KEYWORD3 PImage_updatePixels_
-width KEYWORD3 PImage_width_
+alpha FUNCTION2 PImage_alpha_
+blend FUNCTION2 PImage_blend_
+copy FUNCTION2 PImage_copy_
+filter FUNCTION2 PImage_filter_
+get FUNCTION2 PImage_get_
+height FUNCTION2 PImage_height_
+loadPixels FUNCTION2 PImage_loadPixels_
+mask FUNCTION2 PImage_mask_
+pixels FUNCTION2 PImage_pixels_
+resize FUNCTION2 PImage_resize_
+save FUNCTION2 PImage_save_
+set FUNCTION2 PImage_set_
+updatePixels FUNCTION2 PImage_updatePixels_
+width FUNCTION2 PImage_width_
pixels LITERAL2 pixels
pmouseX LITERAL2 pmouseX
pmouseY LITERAL2 pmouseY
-point KEYWORD2 point_
-pointLight KEYWORD2 pointLight_
-popMatrix KEYWORD2 popMatrix_
-popStyle KEYWORD2 popStyle_
-pow KEYWORD2 pow_
-print KEYWORD2 print_
-printCamera KEYWORD2 printCamera_
-println KEYWORD2 println_
-printMatrix KEYWORD2 printMatrix_
-printProjection KEYWORD2 printProjection_
-PShader KEYWORD2 PShader_
-PShader KEYWORD3 PShader_set_
+point FUNCTION1 point_
+pointLight FUNCTION1 pointLight_
+popMatrix FUNCTION1 popMatrix_
+popStyle FUNCTION1 popStyle_
+pow FUNCTION1 pow_
+print FUNCTION1 print_
+printCamera FUNCTION1 printCamera_
+println FUNCTION1 println_
+printMatrix FUNCTION1 printMatrix_
+printProjection FUNCTION1 printProjection_
+PShader FUNCTION1 PShader_
+PShader FUNCTION2 PShader_set_
PShape KEYWORD1 PShape
-addChild KEYWORD3 PShape_addChild_
-beginContour KEYWORD3 PShape_beginContour_
-disableStyle KEYWORD3 PShape_disableStyle_
-enableStyle KEYWORD3 PShape_enableStyle_
-end KEYWORD3 PShape_end_
-endContour KEYWORD3 PShape_endContour_
-getChild KEYWORD3 PShape_getChild_
-getVertex KEYWORD3 PShape_getVertex_
-getVertexCount KEYWORD3 PShape_getVertexCount_
-height KEYWORD3 PShape_height_
-isVisible KEYWORD3 PShape_isVisible_
-resetMatrix KEYWORD3 PShape_resetMatrix_
-rotate KEYWORD3 PShape_rotate_
-rotateX KEYWORD3 PShape_rotateX_
-rotateY KEYWORD3 PShape_rotateY_
-rotateZ KEYWORD3 PShape_rotateZ_
-scale KEYWORD3 PShape_scale_
-setVertex KEYWORD3 PShape_setVertex_
-setVisible KEYWORD3 PShape_setVisible_
-translate KEYWORD3 PShape_translate_
-width KEYWORD3 PShape_width_
-pushMatrix KEYWORD2 pushMatrix_
-pushStyle KEYWORD2 pushStyle_
+addChild FUNCTION2 PShape_addChild_
+beginContour FUNCTION2 PShape_beginContour_
+disableStyle FUNCTION2 PShape_disableStyle_
+enableStyle FUNCTION2 PShape_enableStyle_
+end FUNCTION2 PShape_end_
+endContour FUNCTION2 PShape_endContour_
+getChild FUNCTION2 PShape_getChild_
+getVertex FUNCTION2 PShape_getVertex_
+getVertexCount FUNCTION2 PShape_getVertexCount_
+height FUNCTION2 PShape_height_
+isVisible FUNCTION2 PShape_isVisible_
+resetMatrix FUNCTION2 PShape_resetMatrix_
+rotate FUNCTION2 PShape_rotate_
+rotateX FUNCTION2 PShape_rotateX_
+rotateY FUNCTION2 PShape_rotateY_
+rotateZ FUNCTION2 PShape_rotateZ_
+scale FUNCTION2 PShape_scale_
+setVertex FUNCTION2 PShape_setVertex_
+setVisible FUNCTION2 PShape_setVisible_
+translate FUNCTION2 PShape_translate_
+width FUNCTION2 PShape_width_
+pushMatrix FUNCTION1 pushMatrix_
+pushStyle FUNCTION1 pushStyle_
PVector KEYWORD1 PVector
-add KEYWORD3 PVector_add_
-angleBetween KEYWORD3 PVector_angleBetween_
-array KEYWORD3 PVector_array_
-copy KEYWORD3 PVector_copy_
-cross KEYWORD3 PVector_cross_
-dist KEYWORD3 PVector_dist_
-div KEYWORD3 PVector_div_
-dot KEYWORD3 PVector_dot_
-get KEYWORD3 PVector_get_
-limit KEYWORD3 PVector_limit_
-mag KEYWORD3 PVector_mag_
-mult KEYWORD3 PVector_mult_
-normalize KEYWORD3 PVector_normalize_
-set KEYWORD3 PVector_set_
-setMag KEYWORD3 PVector_setMag_
-sub KEYWORD3 PVector_sub_
-quad KEYWORD2 quad_
-quadraticVertex KEYWORD2 quadraticVertex_
+add FUNCTION2 PVector_add_
+angleBetween FUNCTION2 PVector_angleBetween_
+array FUNCTION2 PVector_array_
+copy FUNCTION2 PVector_copy_
+cross FUNCTION2 PVector_cross_
+dist FUNCTION2 PVector_dist_
+div FUNCTION2 PVector_div_
+dot FUNCTION2 PVector_dot_
+get FUNCTION2 PVector_get_
+limit FUNCTION2 PVector_limit_
+mag FUNCTION2 PVector_mag_
+mult FUNCTION2 PVector_mult_
+normalize FUNCTION2 PVector_normalize_
+set FUNCTION2 PVector_set_
+setMag FUNCTION2 PVector_setMag_
+sub FUNCTION2 PVector_sub_
+quad FUNCTION1 quad_
+quadraticVertex FUNCTION1 quadraticVertex_
QUARTER_PI LITERAL2 QUARTER_PI
-radians KEYWORD2 radians_
-random KEYWORD2 random_
-randomSeed KEYWORD2 randomSeed_
-rect KEYWORD2 rect_
-rectMode KEYWORD2 rectMode_
-red KEYWORD2 red_
-redraw KEYWORD2 redraw_
-requestImage KEYWORD2 requestImage_
-resetMatrix KEYWORD2 resetMatrix_
-resetShader KEYWORD2 resetShader_
-reverse KEYWORD2 reverse_
-rotate KEYWORD2 rotate_
-rotateX KEYWORD2 rotateX_
-rotateY KEYWORD2 rotateY_
-rotateZ KEYWORD2 rotateZ_
-round KEYWORD2 round_
-saturation KEYWORD2 saturation_
-save KEYWORD2 save_
-saveBytes KEYWORD2 saveBytes_
-saveFrame KEYWORD2 saveFrame_
-saveStream KEYWORD2 saveStream_
-saveStrings KEYWORD2 saveStrings_
-scale KEYWORD2 scale_
+radians FUNCTION1 radians_
+random FUNCTION1 random_
+randomSeed FUNCTION1 randomSeed_
+rect FUNCTION1 rect_
+rectMode FUNCTION1 rectMode_
+red FUNCTION1 red_
+redraw FUNCTION1 redraw_
+requestImage FUNCTION1 requestImage_
+resetMatrix FUNCTION1 resetMatrix_
+resetShader FUNCTION1 resetShader_
+reverse FUNCTION1 reverse_
+rotate FUNCTION1 rotate_
+rotateX FUNCTION1 rotateX_
+rotateY FUNCTION1 rotateY_
+rotateZ FUNCTION1 rotateZ_
+round FUNCTION1 round_
+saturation FUNCTION1 saturation_
+save FUNCTION1 save_
+saveBytes FUNCTION1 saveBytes_
+saveFrame FUNCTION1 saveFrame_
+saveStream FUNCTION1 saveStream_
+saveStrings FUNCTION1 saveStrings_
+scale FUNCTION1 scale_
screenHeight LITERAL2 screenHeight
screenWidth LITERAL2 screenWidth
-screenX KEYWORD2 screenX_
-screenY KEYWORD2 screenY_
-screenZ KEYWORD2 screenZ_
-second KEYWORD2 second_
-selectFolder KEYWORD2 selectFolder_
-selectInput KEYWORD2 selectInput_
-selectOutput KEYWORD2 selectOutput_
-set KEYWORD2 set_
-setup KEYWORD2 setup_
-shader KEYWORD2 shader_
-shape KEYWORD2 shape_
-shapeMode KEYWORD2 shapeMode_
-shearX KEYWORD2 shearX_
-shearY KEYWORD2 shearY_
-shininess KEYWORD2 shininess_
-shorten KEYWORD2 shorten_
-sin KEYWORD2 sin_
-size KEYWORD2 size_
-smooth KEYWORD2 smooth_
-sort KEYWORD2 sort_
-specular KEYWORD2 specular_
-sphere KEYWORD2 sphere_
-sphereDetail KEYWORD2 sphereDetail_
-splice KEYWORD2 splice_
-split KEYWORD2 split_
-splitTokens KEYWORD2 splitTokens_
-spotLight KEYWORD2 spotLight_
-sq KEYWORD2 sq_
-sqrt KEYWORD2 sqrt_
-stroke KEYWORD2 stroke_
-strokeCap KEYWORD2 strokeCap_
-strokeJoin KEYWORD2 strokeJoin_
-strokeWeight KEYWORD2 strokeWeight_
-subset KEYWORD2 subset_
-Table KEYWORD2 Table_
-tan KEYWORD2 tan_
-text KEYWORD2 text_
-textAlign KEYWORD2 textAlign_
-textAscent KEYWORD2 textAscent_
-textDescent KEYWORD2 textDescent_
-textFont KEYWORD2 textFont_
-textLeading KEYWORD2 textLeading_
-textMode KEYWORD2 textMode_
-textSize KEYWORD2 textSize_
-texture KEYWORD2 texture_
-textureMode KEYWORD2 textureMode_
-textureWrap KEYWORD2 textureWrap_
-textWidth KEYWORD2 textWidth_
-tint KEYWORD2 tint_
-translate KEYWORD2 translate_
-triangle KEYWORD2 triangle_
-trim KEYWORD2 trim_
+screenX FUNCTION1 screenX_
+screenY FUNCTION1 screenY_
+screenZ FUNCTION1 screenZ_
+second FUNCTION1 second_
+selectFolder FUNCTION1 selectFolder_
+selectInput FUNCTION1 selectInput_
+selectOutput FUNCTION1 selectOutput_
+set FUNCTION1 set_
+setup FUNCTION1 setup_
+shader FUNCTION1 shader_
+shape FUNCTION1 shape_
+shapeMode FUNCTION1 shapeMode_
+shearX FUNCTION1 shearX_
+shearY FUNCTION1 shearY_
+shininess FUNCTION1 shininess_
+shorten FUNCTION1 shorten_
+sin FUNCTION1 sin_
+size FUNCTION1 size_
+smooth FUNCTION1 smooth_
+sort FUNCTION1 sort_
+specular FUNCTION1 specular_
+sphere FUNCTION1 sphere_
+sphereDetail FUNCTION1 sphereDetail_
+splice FUNCTION1 splice_
+split FUNCTION1 split_
+splitTokens FUNCTION1 splitTokens_
+spotLight FUNCTION1 spotLight_
+sq FUNCTION1 sq_
+sqrt FUNCTION1 sqrt_
+stroke FUNCTION1 stroke_
+strokeCap FUNCTION1 strokeCap_
+strokeJoin FUNCTION1 strokeJoin_
+strokeWeight FUNCTION1 strokeWeight_
+subset FUNCTION1 subset_
+Table FUNCTION1 Table_
+tan FUNCTION1 tan_
+text FUNCTION1 text_
+textAlign FUNCTION1 textAlign_
+textAscent FUNCTION1 textAscent_
+textDescent FUNCTION1 textDescent_
+textFont FUNCTION1 textFont_
+textLeading FUNCTION1 textLeading_
+textMode FUNCTION1 textMode_
+textSize FUNCTION1 textSize_
+texture FUNCTION1 texture_
+textureMode FUNCTION1 textureMode_
+textureWrap FUNCTION1 textureWrap_
+textWidth FUNCTION1 textWidth_
+tint FUNCTION1 tint_
+translate FUNCTION1 translate_
+triangle FUNCTION1 triangle_
+trim FUNCTION1 trim_
TWO_PI LITERAL2 TWO_PI
-unbinary KEYWORD2 unbinary_
-unhex KEYWORD2 unhex_
-updatePixels KEYWORD2 updatePixels_
-vertex KEYWORD2 vertex_
+unbinary FUNCTION1 unbinary_
+unhex FUNCTION1 unhex_
+updatePixels FUNCTION1 updatePixels_
+vertex FUNCTION1 vertex_
width LITERAL2 width
-XML KEYWORD2 XML_
-addChild KEYWORD3 XML_addChild_
-getAttributeCount KEYWORD3 XML_getAttributeCount_
-getChild KEYWORD3 XML_getChild_
-getChildCount KEYWORD3 XML_getChildCount_
-getChildren KEYWORD3 XML_getChildren_
-getContent KEYWORD3 XML_getContent_
-getFloat KEYWORD3 XML_getFloat_
-getInt KEYWORD3 XML_getInt_
-getName KEYWORD3 XML_getName_
-getParent KEYWORD3 XML_getParent_
-getString KEYWORD3 XML_getString_
-hasAttribute KEYWORD3 XML_hasAttribute_
-hasChildren KEYWORD3 XML_hasChildren_
-listAttributes KEYWORD3 XML_listAttributes_
-listChildren KEYWORD3 XML_listChildren_
-removeChild KEYWORD3 XML_removeChild_
-setContent KEYWORD3 XML_setContent_
-setFloat KEYWORD3 XML_setFloat_
-setInt KEYWORD3 XML_setInt_
-setName KEYWORD3 XML_setName_
-setString KEYWORD3 XML_setString_
-year KEYWORD2 year_
+XML FUNCTION1 XML_
+addChild FUNCTION2 XML_addChild_
+getAttributeCount FUNCTION2 XML_getAttributeCount_
+getChild FUNCTION2 XML_getChild_
+getChildCount FUNCTION2 XML_getChildCount_
+getChildren FUNCTION2 XML_getChildren_
+getContent FUNCTION2 XML_getContent_
+getFloat FUNCTION2 XML_getFloat_
+getInt FUNCTION2 XML_getInt_
+getName FUNCTION2 XML_getName_
+getParent FUNCTION2 XML_getParent_
+getString FUNCTION2 XML_getString_
+hasAttribute FUNCTION2 XML_hasAttribute_
+hasChildren FUNCTION2 XML_hasChildren_
+listAttributes FUNCTION2 XML_listAttributes_
+listChildren FUNCTION2 XML_listChildren_
+removeChild FUNCTION2 XML_removeChild_
+setContent FUNCTION2 XML_setContent_
+setFloat FUNCTION2 XML_setFloat_
+setInt FUNCTION2 XML_setInt_
+setName FUNCTION2 XML_setName_
+setString FUNCTION2 XML_setString_
+year FUNCTION1 year_
diff --git a/java/theme/theme.txt b/java/theme/theme.txt
index 7e3a3332c..d4a17dd4f 100644
--- a/java/theme/theme.txt
+++ b/java/theme/theme.txt
@@ -74,6 +74,10 @@ editor.brackethighlight.color = #006699
# TEXT - KEYWORDS
+editor.function1.style = #cc6600,plain
+
+editor.function2.style = #cc6600,bold
+
# e.g abstract, final, private
editor.keyword1.style = #cc6600,plain
@@ -83,10 +87,6 @@ editor.keyword2.style = #cc6600,plain
# e.g. byte, char, short, color
editor.keyword3.style = #cc6600,bold
-editor.keyword4.style = #006699,plain
-
-editor.keyword5.style = #006699,plain
-
# TEXT - LITERALS
diff --git a/javascript/theme/theme.txt b/javascript/theme/theme.txt
index c81bb8957..b9fcb31ef 100644
--- a/javascript/theme/theme.txt
+++ b/javascript/theme/theme.txt
@@ -74,6 +74,9 @@ editor.brackethighlight.color = #006699
# TEXT - KEYWORDS
+editor.function1.style = #cc6600,plain
+editor.function2.style = #cc6600,bold
+
# e.g abstract, final, private
editor.keyword1.style = #cc6600,plain