Skip to content

Commit e93ffe7

Browse files
committed
2 parents 886c375 + fabeb64 commit e93ffe7

12 files changed

Lines changed: 330 additions & 60 deletions

File tree

app/src/processing/app/Language.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,11 @@ void read(File additions) {
300300
if (equals != -1) {
301301
String key = line.substring(0, equals).trim();
302302
String value = line.substring(equals + 1).trim();
303+
304+
// fix \n and \'
305+
value = value.replaceAll("\\\\n", "\n");
306+
value = value.replaceAll("\\\\'", "'");
307+
303308
table.put(key, value);
304309
}
305310
}

app/src/processing/app/syntax/PdeKeywords.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,24 @@ public void addColoring(String keyword, String coloring) {
5050
int num = coloring.charAt(coloring.length() - 1) - '1';
5151
// byte id = (byte) ((isKey ? Token.KEYWORD1 : Token.LITERAL1) + num);
5252
int id = 0;
53-
boolean paren = false;
5453
switch (coloring.charAt(0)) {
55-
case 'K': id = Token.KEYWORD1 + num; break;
56-
case 'L': id = Token.LITERAL1 + num; break;
57-
case 'F': id = Token.FUNCTION1 + num; paren = true; break;
54+
case 'K':
55+
id = Token.KEYWORD1 + num;
56+
keywordColoring.add(keyword, (byte) id, false);
57+
if (id == Token.KEYWORD6) {
58+
// these can be followed by parens
59+
keywordColoring.add(keyword, (byte) id, true);
60+
}
61+
break;
62+
case 'L':
63+
id = Token.LITERAL1 + num;
64+
keywordColoring.add(keyword, (byte) id, false);
65+
break;
66+
case 'F':
67+
id = Token.FUNCTION1 + num;
68+
keywordColoring.add(keyword, (byte) id, true);
69+
break;
5870
}
59-
keywordColoring.add(keyword, (byte) id, paren);
6071
}
6172

6273

app/src/processing/app/syntax/PdeTextAreaDefaults.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ public PdeTextAreaDefaults(Mode mode) {
215215
styles[Token.KEYWORD3] = mode.getStyle("keyword3");
216216
styles[Token.KEYWORD4] = mode.getStyle("keyword4");
217217
styles[Token.KEYWORD5] = mode.getStyle("keyword5");
218+
styles[Token.KEYWORD6] = mode.getStyle("keyword6");
218219

219220
styles[Token.FUNCTION1] = mode.getStyle("function1");
220221
styles[Token.FUNCTION2] = mode.getStyle("function2");

app/src/processing/app/syntax/Token.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,35 @@ public class Token {
5656

5757
/** Datatypes (int, boolean, etc.) */
5858
public static final byte KEYWORD5 = 10;
59+
60+
/** Keywords which can be followed by parenthesis */
61+
public static final byte KEYWORD6 = 11;
5962

6063
/** Functions */
61-
public static final byte FUNCTION1 = 11;
64+
public static final byte FUNCTION1 = 12;
6265

6366
/** Methods (functions inside a class) */
64-
public static final byte FUNCTION2 = 12;
67+
public static final byte FUNCTION2 = 13;
6568

6669
/** Loop/function-like blocks (for, while, etc.) */
67-
public static final byte FUNCTION3 = 13;
70+
public static final byte FUNCTION3 = 14;
6871

6972
/** Built-in Processing functions (setup, draw, mouseDragged). */
70-
public static final byte FUNCTION4 = 14;
73+
public static final byte FUNCTION4 = 15;
7174

7275
/**
7376
* Operator token id. This can be used to mark an
7477
* operator. (eg, SQL mode marks +, -, etc with this
7578
* token type)
7679
*/
77-
public static final byte OPERATOR = 15;
80+
public static final byte OPERATOR = 16;
7881

7982
/**
8083
* Invalid token id. This can be used to mark invalid
8184
* or incomplete tokens, so the user can easily spot
8285
* syntax errors.
8386
*/
84-
public static final byte INVALID = 16;
87+
public static final byte INVALID = 17;
8588

8689
/** The total number of defined token ids. */
8790
public static final byte ID_COUNT = INVALID + 1;

build/build.xml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,25 @@
3434
<property name="examples.dir"
3535
value="../../processing-docs/content/examples" />
3636

37+
<property name="jdk.version" value="7" />
38+
<property name="jdk.update" value="72" />
39+
<property name="jdk.build" value="14" />
40+
<property name="jdk.stuff" value="${jdk.version}u${jdk.update}" />
41+
<property name="jdk.esoteric" value="1.${jdk.version}.0_${jdk.update}" />
42+
3743
<!-- Figure out the JRE download location for Linux and Windows. -->
38-
<condition property="jre.file" value="jre-7u40-${platform}-i586.tgz">
44+
<condition property="jre.file"
45+
value="jre-${jdk.stuff}-${platform}-i586.tar.gz">
3946
<equals arg1="${sun.arch.data.model}" arg2="32" />
4047
</condition>
41-
<condition property="jre.file" value="jre-7u40-${platform}-x64.tgz">
48+
<condition property="jre.file"
49+
value="jre-${jdk.stuff}-${platform}-x64.tar.gz">
4250
<equals arg1="${sun.arch.data.model}" arg2="64" />
4351
</condition>
52+
<!-- JDK location for Mac OS X -->
53+
<condition property="jdk.file" value="jdk-${jdk.stuff}-macosx-x64.dmg">
54+
<equals arg1="${platform}" arg2="macosx" />
55+
</condition>
4456

4557
<fileset dir="windows/work/java" id="jre-optional-windows">
4658
<include name="bin/dtplugin" />
@@ -154,13 +166,13 @@
154166
</condition>
155167

156168
<!-- Set the version of Java that must be present to build. -->
157-
<property name="jdk.update.macosx" value="72" />
158-
<property name="jdk.path.macosx" value="/Library/Java/JavaVirtualMachines/jdk1.7.0_${jdk.update.macosx}.jdk" />
169+
<property name="jdk.path.macosx"
170+
value="/Library/Java/JavaVirtualMachines/jdk${jdk.esoteric}.jdk" />
159171

160172
<available file="${jdk.path.macosx}" property="macosx_jdk_found" />
161173

162174
<fail if="macosx" unless="macosx_jdk_found"
163-
message="JDK 7u${jdk.update.macosx} required.${line.separator}To build on OS X, you must install Oracle's JDK 7u${jdk.update.macosx} from${line.separator}http://www.oracle.com/technetwork/java/javase/downloads${line.separator}Note that only 7u${jdk.update.macosx} (not a later or earlier version) will work. ${line.separator}And it must be the JDK, not the JRE. And do not try to defy me again." />
175+
message="JDK ${jdk.stuff} required.${line.separator}To build on OS X, you must install Oracle's JDK ${jdk.stuff} from${line.separator}http://www.oracle.com/technetwork/java/javase/downloads${line.separator}or http://download.processing.org/java/${jdk.file}${line.separator}Note that only ${jdk.stuff} (not a later or earlier version) will work. ${line.separator}And it must be the JDK, not the JRE. And do not try to defy me again." />
164176
<!--
165177
<fail if="linux" unless="java_tools_found"
166178
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Ubuntu Linux, this might be /usr/lib/jvm/java-6-sun." />
@@ -475,7 +487,7 @@
475487
Also, because Ant's copy task does not retain file permissions on Unix systems,
476488
we need to use <exec executable="cp" ... > instead -->
477489
<exec executable="cp">
478-
<arg line="${jdk.path.macosx}/Contents/Home/bin/keytool macosx/work/Processing.app/Contents/PlugIns/jdk1.7.0_${jdk.update.macosx}.jdk/Contents/Home/jre/bin"/>
490+
<arg line="${jdk.path.macosx}/Contents/Home/bin/keytool macosx/work/Processing.app/Contents/PlugIns/jdk${jdk.esoteric}.jdk/Contents/Home/jre/bin"/>
479491
</exec>
480492

481493
<copy todir="macosx/work/Processing.app/Contents/Java">
@@ -488,7 +500,7 @@
488500
<!--
489501
Processing.app/Contents/PlugIns/jdk1.7.0_40.jdk/Contents/Home/jre/lib/fonts
490502
-->
491-
<copy todir="macosx/work/Processing.app/Contents/PlugIns/jdk1.7.0_${jdk.update.macosx}.jdk/Contents/Home/jre/lib/fonts">
503+
<copy todir="macosx/work/Processing.app/Contents/PlugIns/jdk${jdk.esoteric}.jdk/Contents/Home/jre/lib/fonts">
492504
<fileset dir="shared/lib/fonts" includes="*" />
493505
</copy>
494506

@@ -543,7 +555,7 @@
543555
<arg value="--force" />
544556
<arg value="--sign" />
545557
<arg value="Developer ID Application" />
546-
<arg value="Processing.app/Contents/PlugIns/jdk1.7.0_${jdk.update.macosx}.jdk" />
558+
<arg value="Processing.app/Contents/PlugIns/jdk${jdk.esoteric}.jdk" />
547559
</exec>
548560

549561
<exec executable="/usr/bin/codesign" dir="macosx/work">
@@ -649,12 +661,7 @@
649661
<copy file="linux/processing" tofile="linux/work/processing-java" />
650662
<chmod perm="ugo+x" file="linux/work/processing-java" />
651663

652-
<!--
653-
<property name="jre.file"
654-
value="jre-tools-6u37-linux${sun.arch.data.model}.tgz" />
655-
-->
656-
657-
<get src="http://processing.googlecode.com/files/${jre.file}"
664+
<get src="http://download.processing.org/java/${jre.file}"
658665
dest="linux/jre.tgz"
659666
usetimestamp="true" />
660667

@@ -687,10 +694,10 @@
687694
<exec executable="rsync" dir="linux">
688695
<arg value="-a" />
689696
<arg value="--delete" />
690-
<arg value="jre1.7.0_40/" />
697+
<arg value="jre${jdk.esoteric}/" />
691698
<arg value="work/java" />
692699
</exec>
693-
<delete dir="linux/jre1.7.0_40" />
700+
<delete dir="linux/jre${jdk.esoteric}" />
694701

695702
<!-- Remove unused JRE bloat. -->
696703
<delete failonerror="true">
@@ -820,7 +827,7 @@
820827
</chmod>
821828

822829
<!-- starting with 2.0a7, require the local JRE + tools.jar -->
823-
<get src="http://processing.googlecode.com/files/${jre.file}"
830+
<get src="http://download.processing.org/java/${jre.file}"
824831
dest="windows/jre.tgz"
825832
usetimestamp="true" />
826833

@@ -833,7 +840,8 @@
833840
dest="windows/work"
834841
src="windows/jre.tgz"
835842
overwrite="false" />
836-
<move file="windows/work/jre1.7.0_40" tofile="windows/work/java" />
843+
<move file="windows/work/jre${jdk.esoteric}"
844+
tofile="windows/work/java" />
837845

838846
<!-- Remove space-wasting JavaFX garbage. -->
839847
<delete failonerror="true">

build/shared/lib/defaults.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ editor.token.keyword2.style = #33997e,plain
248248
editor.token.keyword3.style = #669900,plain
249249
editor.token.keyword4.style = #d94a7a,plain
250250
editor.token.keyword5.style = #e2661a,plain
251+
editor.token.keyword6.style = #33997e,plain
251252

252253
editor.token.literal1.style = #7D4793,plain
253254
editor.token.literal2.style = #718a62,plain

build/shared/revisions.txt

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,161 @@
1+
PROCESSING 3.0a5 (REV 0232) - 16 November 2014
2+
3+
Hello from the University of Denver! This release has tons of bug fixing
4+
and incorporating various pull requests.
5+
6+
7+
[ changes ]
8+
9+
+ Removed the sound library, it's now available as its own library
10+
from the Library Manager.
11+
12+
+ Change how languages are loaded, adding a local override.
13+
14+
+ Update to use JRE/JDK 7u72 .
15+
16+
+ Implement the active() method for Serial and Server
17+
https://github.com/processing/processing/issues/2364
18+
https://github.com/processing/processing/pull/2588
19+
20+
+ Detect CMYK JPEG images and return null
21+
https://community.oracle.com/thread/1272045?start=0&tstart=0
22+
23+
+ Fix XML.getString() with a default when no attrs are present at all.
24+
It was causing a NullPointerException; this also fixes getInt(), et al.
25+
26+
+ Fix how dictionary classes return '0' for missing values. Add optional
27+
second parameter so that it's possible to avoid the exceptions.
28+
29+
+ Fix how nulls are handled with Table.replace()
30+
31+
+ Add (simple) ODS writer to Table
32+
33+
+ Add addRows(Table) method (more efficient, one resize)
34+
35+
+ Support "header" option with ODS files
36+
37+
38+
[ bug fixes ]
39+
40+
+ Remove debug message printed to the console when the control key
41+
is pressed, when using the new editor.
42+
43+
+ size(640,360 , P3D) doesn't work properly (strange spacing)
44+
https://github.com/processing/processing/issues/2924
45+
https://github.com/processing/processing/pull/2925
46+
47+
+ Fix the shortcut keybindings in editor tab popup menu
48+
https://github.com/processing/processing/issues/179
49+
https://github.com/processing/processing/pull/2821
50+
51+
+ Fix for ToolTipManager error
52+
https://github.com/processing/processing/issues/2926
53+
54+
+ Confusing message: The shader doesn't have a uniform called "foo"
55+
https://github.com/processing/processing/issues/2593
56+
57+
+ Exceptions in P3D / P2D not showing up properly
58+
https://github.com/processing/processing/issues/2930
59+
60+
61+
[ contributed fixes ]
62+
63+
+ Cmd + H runs sketch instead of hiding the PDE (OS X)
64+
https://github.com/processing/processing/issues/2881
65+
66+
+ Migrate to unsynchronized data structures
67+
https://github.com/processing/processing/pull/2863
68+
69+
+ Improve contrib manager localization
70+
https://github.com/processing/processing/pull/2870
71+
72+
+ Fix typo in spanish translation
73+
https://github.com/processing/processing/pull/2906
74+
75+
+ Update ECJ, use 1.7 as source and target Java version
76+
https://github.com/processing/processing/pull/2907
77+
78+
+ Fix infinite recursion in sound library
79+
https://github.com/processing/processing/pull/2897
80+
81+
+ Add missing generic type parameters
82+
https://github.com/processing/processing/pull/2899
83+
84+
+ Remove unused Base.builtOnce instance variable
85+
https://github.com/processing/processing/pull/2864
86+
87+
+ Other miscellaneous fixes
88+
https://github.com/processing/processing/pull/2865
89+
90+
+ Moved the language stuff to its own separate folder
91+
https://github.com/processing/processing/pull/2941
92+
93+
+ Some minor UpdateChecker refactorings
94+
https://github.com/processing/processing/pull/2830
95+
96+
+ Minor improvements to the Contribution Manager's updates check
97+
https://github.com/processing/processing/pull/2861
98+
99+
+ Make Cut and Copy in the edit menu active only if some text is selected
100+
https://github.com/processing/processing/pull/2834
101+
102+
+ Fix renaming from RGB to Rgb.java and others
103+
https://github.com/processing/processing/pull/2825
104+
105+
+ Sketches should only write to the console of their editor window
106+
https://github.com/processing/processing/issues/153
107+
https://github.com/processing/processing/issues/2858
108+
https://github.com/processing/processing/pull/2827
109+
110+
+ Extend translations and update German language
111+
https://github.com/processing/processing/pull/2949
112+
113+
+ NullPointerException message when Server writes to a disconnected client
114+
https://github.com/processing/processing/issues/2577
115+
https://github.com/processing/processing/pull/2578
116+
117+
+ Fix check in loadShader()
118+
https://github.com/processing/processing/pull/2867
119+
120+
+ Refined PShader uniform missing message fixes
121+
https://github.com/processing/processing/pull/2869
122+
123+
+ Use correct parameter types in FloatList methods
124+
https://github.com/processing/processing/pull/2902
125+
126+
+ Pass correct offset to glCopyTexSubImage2D
127+
https://github.com/processing/processing/pull/2898
128+
129+
+ beginShape(POINTS) not working for PShape
130+
https://github.com/processing/processing/issues/2912
131+
https://github.com/processing/processing/pull/2915
132+
133+
+ Multiple blending fixes & improvements
134+
https://github.com/processing/processing/pull/2921
135+
https://github.com/processing/processing/issues/2807
136+
https://github.com/processing/processing/issues/1224
137+
https://github.com/processing/processing/pull/2601
138+
https://github.com/processing/processing/issues/1844
139+
140+
+ Prevent lerpColor from always rounding down
141+
https://github.com/processing/processing/issues/2812
142+
https://github.com/processing/processing/pull/2813
143+
144+
+ Allow mask() with PGraphicsJava2D
145+
https://github.com/processing/processing/pull/2910
146+
147+
+ OpenGL renderers ignore vertex winding in contours
148+
https://github.com/processing/processing/issues/2665
149+
https://github.com/processing/processing/pull/2927
150+
151+
+ NPE when calling Client.ip() after the connection has been closed
152+
https://github.com/processing/processing/issues/2576
153+
https://github.com/processing/processing/pull/2922
154+
155+
156+
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
157+
158+
1159
PROCESSING 3.0a4 (REV 0231) - 12 September 2014
2160

3161
Another release to deal with a handful of bugs found in the last alpha.

0 commit comments

Comments
 (0)