mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -50,13 +50,24 @@ public class PdeKeywords extends TokenMarker {
|
||||
int num = coloring.charAt(coloring.length() - 1) - '1';
|
||||
// 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;
|
||||
case 'K':
|
||||
id = Token.KEYWORD1 + num;
|
||||
keywordColoring.add(keyword, (byte) id, false);
|
||||
if (id == Token.KEYWORD6) {
|
||||
// these can be followed by parens
|
||||
keywordColoring.add(keyword, (byte) id, true);
|
||||
}
|
||||
break;
|
||||
case 'L':
|
||||
id = Token.LITERAL1 + num;
|
||||
keywordColoring.add(keyword, (byte) id, false);
|
||||
break;
|
||||
case 'F':
|
||||
id = Token.FUNCTION1 + num;
|
||||
keywordColoring.add(keyword, (byte) id, true);
|
||||
break;
|
||||
}
|
||||
keywordColoring.add(keyword, (byte) id, paren);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -215,6 +215,7 @@ public class PdeTextAreaDefaults extends TextAreaDefaults {
|
||||
styles[Token.KEYWORD3] = mode.getStyle("keyword3");
|
||||
styles[Token.KEYWORD4] = mode.getStyle("keyword4");
|
||||
styles[Token.KEYWORD5] = mode.getStyle("keyword5");
|
||||
styles[Token.KEYWORD6] = mode.getStyle("keyword6");
|
||||
|
||||
styles[Token.FUNCTION1] = mode.getStyle("function1");
|
||||
styles[Token.FUNCTION2] = mode.getStyle("function2");
|
||||
|
||||
@@ -56,32 +56,35 @@ public class Token {
|
||||
|
||||
/** Datatypes (int, boolean, etc.) */
|
||||
public static final byte KEYWORD5 = 10;
|
||||
|
||||
/** Keywords which can be followed by parenthesis */
|
||||
public static final byte KEYWORD6 = 11;
|
||||
|
||||
/** Functions */
|
||||
public static final byte FUNCTION1 = 11;
|
||||
public static final byte FUNCTION1 = 12;
|
||||
|
||||
/** Methods (functions inside a class) */
|
||||
public static final byte FUNCTION2 = 12;
|
||||
public static final byte FUNCTION2 = 13;
|
||||
|
||||
/** Loop/function-like blocks (for, while, etc.) */
|
||||
public static final byte FUNCTION3 = 13;
|
||||
public static final byte FUNCTION3 = 14;
|
||||
|
||||
/** Built-in Processing functions (setup, draw, mouseDragged). */
|
||||
public static final byte FUNCTION4 = 14;
|
||||
public static final byte FUNCTION4 = 15;
|
||||
|
||||
/**
|
||||
* Operator token id. This can be used to mark an
|
||||
* operator. (eg, SQL mode marks +, -, etc with this
|
||||
* token type)
|
||||
*/
|
||||
public static final byte OPERATOR = 15;
|
||||
public static final byte OPERATOR = 16;
|
||||
|
||||
/**
|
||||
* Invalid token id. This can be used to mark invalid
|
||||
* or incomplete tokens, so the user can easily spot
|
||||
* syntax errors.
|
||||
*/
|
||||
public static final byte INVALID = 16;
|
||||
public static final byte INVALID = 17;
|
||||
|
||||
/** The total number of defined token ids. */
|
||||
public static final byte ID_COUNT = INVALID + 1;
|
||||
|
||||
@@ -248,6 +248,7 @@ editor.token.keyword2.style = #33997e,plain
|
||||
editor.token.keyword3.style = #669900,plain
|
||||
editor.token.keyword4.style = #d94a7a,plain
|
||||
editor.token.keyword5.style = #e2661a,plain
|
||||
editor.token.keyword6.style = #33997e,plain
|
||||
|
||||
editor.token.literal1.style = #7D4793,plain
|
||||
editor.token.literal2.style = #718a62,plain
|
||||
|
||||
@@ -1,3 +1,169 @@
|
||||
PROCESSING 3.0a5 (REV 0232) - 16 November 2014
|
||||
|
||||
Hello from the University of Denver! This release has tons of bug fixing
|
||||
and incorporating various pull requests.
|
||||
|
||||
|
||||
[ changes ]
|
||||
|
||||
+ Removed the sound library. It's now available as its own library
|
||||
from the Library Manager.
|
||||
|
||||
+ Change how languages are loaded, adding a local override.
|
||||
|
||||
+ Update to use JRE/JDK 7u72
|
||||
|
||||
+ Implement the active() method for Serial and Server
|
||||
https://github.com/processing/processing/issues/2364
|
||||
https://github.com/processing/processing/pull/2588
|
||||
|
||||
+ Detect CMYK JPEG images and return null
|
||||
https://community.oracle.com/thread/1272045?start=0&tstart=0
|
||||
|
||||
+ Fix XML.getString() with a default when no attrs are present at all.
|
||||
It was causing a NullPointerException; this also fixes getInt(), et al.
|
||||
|
||||
+ Fix how dictionary classes return '0' for missing values. Add optional
|
||||
second parameter so that it's possible to avoid the exceptions.
|
||||
|
||||
+ Fix how nulls are handled with Table.replace()
|
||||
|
||||
+ Add (simple) ODS writer to Table
|
||||
|
||||
+ Add addRows(Table) method (more efficient, one resize)
|
||||
|
||||
+ Support "header" option with ODS files
|
||||
|
||||
+ Show a warning when calling getVertexCount() on GROUP or PRIMITIVE shapes
|
||||
https://github.com/processing/processing/issues/2873
|
||||
https://github.com/processing/processing-docs/issues/167
|
||||
|
||||
|
||||
[ bug fixes ]
|
||||
|
||||
+ Remove debug message printed to the console when the control key
|
||||
is pressed, when using the new editor.
|
||||
|
||||
+ size(640,360 , P3D) doesn't work properly (strange spacing)
|
||||
https://github.com/processing/processing/issues/2924
|
||||
https://github.com/processing/processing/pull/2925
|
||||
|
||||
+ Fix the shortcut keybindings in editor tab popup menu
|
||||
https://github.com/processing/processing/issues/179
|
||||
https://github.com/processing/processing/pull/2821
|
||||
|
||||
+ Fix for ToolTipManager error
|
||||
https://github.com/processing/processing/issues/2926
|
||||
|
||||
+ Confusing message: The shader doesn't have a uniform called "foo"
|
||||
https://github.com/processing/processing/issues/2593
|
||||
|
||||
+ Exceptions in P3D / P2D not showing up properly
|
||||
https://github.com/processing/processing/issues/2930
|
||||
|
||||
|
||||
[ contributed fixes ]
|
||||
|
||||
+ Cmd + H runs sketch instead of hiding the PDE (OS X)
|
||||
https://github.com/processing/processing/issues/2881
|
||||
|
||||
+ Migrate to unsynchronized data structures
|
||||
https://github.com/processing/processing/pull/2863
|
||||
|
||||
+ Improve contrib manager localization
|
||||
https://github.com/processing/processing/pull/2870
|
||||
|
||||
+ Fix typo in spanish translation
|
||||
https://github.com/processing/processing/pull/2906
|
||||
|
||||
+ Update ECJ, use 1.7 as source and target Java version
|
||||
https://github.com/processing/processing/pull/2907
|
||||
|
||||
+ Fix infinite recursion in sound library
|
||||
https://github.com/processing/processing/pull/2897
|
||||
|
||||
+ Add missing generic type parameters
|
||||
https://github.com/processing/processing/pull/2899
|
||||
|
||||
+ Remove unused Base.builtOnce instance variable
|
||||
https://github.com/processing/processing/pull/2864
|
||||
|
||||
+ Other miscellaneous fixes
|
||||
https://github.com/processing/processing/pull/2865
|
||||
|
||||
+ Moved the language stuff to its own separate folder
|
||||
https://github.com/processing/processing/pull/2941
|
||||
|
||||
+ Some minor UpdateChecker refactorings
|
||||
https://github.com/processing/processing/pull/2830
|
||||
|
||||
+ Minor improvements to the Contribution Manager's updates check
|
||||
https://github.com/processing/processing/pull/2861
|
||||
|
||||
+ Make Cut and Copy in the edit menu active only if some text is selected
|
||||
https://github.com/processing/processing/pull/2834
|
||||
|
||||
+ Fix renaming from RGB to Rgb.java and others
|
||||
https://github.com/processing/processing/pull/2825
|
||||
|
||||
+ Sketches should only write to the console of their editor window
|
||||
https://github.com/processing/processing/issues/153
|
||||
https://github.com/processing/processing/issues/2858
|
||||
https://github.com/processing/processing/pull/2827
|
||||
|
||||
+ Extend translations and update German language
|
||||
https://github.com/processing/processing/pull/2949
|
||||
|
||||
+ NullPointerException message when Server writes to a disconnected client
|
||||
https://github.com/processing/processing/issues/2577
|
||||
https://github.com/processing/processing/pull/2578
|
||||
|
||||
+ Fix check in loadShader()
|
||||
https://github.com/processing/processing/pull/2867
|
||||
|
||||
+ Refined PShader uniform missing message fixes
|
||||
https://github.com/processing/processing/pull/2869
|
||||
|
||||
+ Use correct parameter types in FloatList methods
|
||||
https://github.com/processing/processing/pull/2902
|
||||
|
||||
+ Pass correct offset to glCopyTexSubImage2D
|
||||
https://github.com/processing/processing/pull/2898
|
||||
|
||||
+ beginShape(POINTS) not working for PShape
|
||||
https://github.com/processing/processing/issues/2912
|
||||
https://github.com/processing/processing/pull/2915
|
||||
|
||||
+ Multiple blending fixes & improvements
|
||||
https://github.com/processing/processing/pull/2921
|
||||
https://github.com/processing/processing/issues/2807
|
||||
https://github.com/processing/processing/issues/1224
|
||||
https://github.com/processing/processing/pull/2601
|
||||
https://github.com/processing/processing/issues/1844
|
||||
|
||||
+ Prevent lerpColor from always rounding down
|
||||
https://github.com/processing/processing/issues/2812
|
||||
https://github.com/processing/processing/pull/2813
|
||||
|
||||
+ Allow mask() with PGraphicsJava2D
|
||||
https://github.com/processing/processing/pull/2910
|
||||
|
||||
+ OpenGL renderers ignore vertex winding in contours
|
||||
https://github.com/processing/processing/issues/2665
|
||||
https://github.com/processing/processing/pull/2927
|
||||
|
||||
+ NPE when calling Client.ip() after the connection has been closed
|
||||
https://github.com/processing/processing/issues/2576
|
||||
https://github.com/processing/processing/pull/2922
|
||||
|
||||
+ 'return' keyword not treated as such when followed by a bracket
|
||||
https://github.com/processing/processing/issues/2099
|
||||
https://github.com/processing/processing/pull/2958
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
PROCESSING 3.0a4 (REV 0231) - 12 September 2014
|
||||
|
||||
Another release to deal with a handful of bugs found in the last alpha.
|
||||
|
||||
@@ -530,7 +530,7 @@ public class PGraphicsJava2D extends PGraphics {
|
||||
} else if (type == PShape.GEOMETRY) {
|
||||
shape = new PShape(pg, PShape.GEOMETRY);
|
||||
}
|
||||
shape.is3D(false);
|
||||
shape.set3D(false);
|
||||
return shape;
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ public class PGraphicsJava2D extends PGraphics {
|
||||
shape.setParams(p);
|
||||
}
|
||||
|
||||
shape.is3D(false);
|
||||
shape.set3D(false);
|
||||
return shape;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,9 @@ public class PShape implements PConstants {
|
||||
public static final String NO_SUCH_VERTEX_ERROR =
|
||||
"%1$s vertex index does not exist";
|
||||
|
||||
static public final String NO_VERTICES_ERROR =
|
||||
"getVertexCount() only works with PATH or GEOMETRY shapes";
|
||||
|
||||
// boundary box of this shape
|
||||
//protected float x;
|
||||
//protected float y;
|
||||
@@ -539,7 +542,7 @@ public class PShape implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
public void is3D(boolean val) {
|
||||
public void set3D(boolean val) {
|
||||
is3D = val;
|
||||
}
|
||||
|
||||
@@ -2051,6 +2054,9 @@ public class PShape implements PConstants {
|
||||
* @see PShape#setVertex(int, float, float)
|
||||
*/
|
||||
public int getVertexCount() {
|
||||
if (family == GROUP || family == PRIMITIVE) {
|
||||
PGraphics.showWarning(NO_VERTICES_ERROR);
|
||||
}
|
||||
return vertexCount;
|
||||
}
|
||||
|
||||
@@ -2100,6 +2106,7 @@ public class PShape implements PConstants {
|
||||
return vertices[index][Z];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @webref pshape:method
|
||||
* @brief Sets the vertex at the index position
|
||||
@@ -2119,6 +2126,7 @@ public class PShape implements PConstants {
|
||||
vertices[index][Y] = y;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param z the z value for the vertex
|
||||
*/
|
||||
@@ -2133,6 +2141,7 @@ public class PShape implements PConstants {
|
||||
vertices[index][Z] = z;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param vec the PVector to define the x, y, z coordinates
|
||||
*/
|
||||
|
||||
@@ -308,7 +308,7 @@ public class PGraphics2D extends PGraphicsOpenGL {
|
||||
} else if (type == PShape.GEOMETRY) {
|
||||
shape = new PShapeOpenGL(pg, PShape.GEOMETRY);
|
||||
}
|
||||
shape.is3D(false);
|
||||
shape.set3D(false);
|
||||
return shape;
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ public class PGraphics2D extends PGraphicsOpenGL {
|
||||
shape.setParams(p);
|
||||
}
|
||||
|
||||
shape.is3D(false);
|
||||
shape.set3D(false);
|
||||
return shape;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ public class PGraphics3D extends PGraphicsOpenGL {
|
||||
} else if (type == PShape.GEOMETRY) {
|
||||
shape = new PShapeOpenGL(pg, PShape.GEOMETRY);
|
||||
}
|
||||
shape.is3D(true);
|
||||
shape.set3D(true);
|
||||
return shape;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ public class PGraphics3D extends PGraphicsOpenGL {
|
||||
shape.setParams(p);
|
||||
}
|
||||
|
||||
shape.is3D(true);
|
||||
shape.set3D(true);
|
||||
return shape;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
0232 core (3.0a5)
|
||||
X detect CMYK JPEG images and return null
|
||||
X https://community.oracle.com/thread/1272045?start=0&tstart=0
|
||||
X show a warning when calling getVertexCount() on GROUP or PRIMITIVE shapes
|
||||
X https://github.com/processing/processing/issues/2873
|
||||
X https://github.com/processing/processing-docs/issues/167
|
||||
X replace is3D(boolean) with set3D()
|
||||
|
||||
data
|
||||
X fix XML.getString() with a default when no attrs are present at all
|
||||
|
||||
+11
-7
@@ -180,9 +180,7 @@ WHITESPACE LITERAL2
|
||||
# Java keywords (void, import, , etc.)
|
||||
|
||||
abstract KEYWORD1
|
||||
assert KEYWORD1
|
||||
break KEYWORD1 break
|
||||
case KEYWORD1 case
|
||||
class KEYWORD1 class
|
||||
continue KEYWORD1 continue
|
||||
default KEYWORD1 default
|
||||
@@ -202,12 +200,8 @@ package KEYWORD1
|
||||
private KEYWORD1 private
|
||||
protected KEYWORD1
|
||||
public KEYWORD1 public
|
||||
return KEYWORD1 return
|
||||
static KEYWORD1 static
|
||||
strictfp KEYWORD1
|
||||
super KEYWORD1 super
|
||||
this KEYWORD1 this
|
||||
throw KEYWORD1
|
||||
strictfp KEYWORD1
|
||||
throws KEYWORD1
|
||||
transient KEYWORD1
|
||||
true KEYWORD1 true
|
||||
@@ -215,6 +209,16 @@ void KEYWORD1 void
|
||||
volatile KEYWORD1
|
||||
|
||||
|
||||
# Java keywords which can be followed by a parenthesis
|
||||
|
||||
assert KEYWORD6
|
||||
case KEYWORD6 case
|
||||
return KEYWORD6 return
|
||||
super KEYWORD6 super
|
||||
this KEYWORD6 this
|
||||
throw KEYWORD6
|
||||
|
||||
|
||||
# Datatypes
|
||||
|
||||
Array KEYWORD5 Array
|
||||
|
||||
+11
-7
@@ -180,9 +180,7 @@ WHITESPACE LITERAL2
|
||||
# Java keywords (void, import, , etc.)
|
||||
|
||||
abstract KEYWORD1
|
||||
assert KEYWORD1
|
||||
break KEYWORD1 break
|
||||
case KEYWORD1 case
|
||||
class KEYWORD1 class
|
||||
continue KEYWORD1 continue
|
||||
default KEYWORD1 default
|
||||
@@ -202,12 +200,8 @@ package KEYWORD1
|
||||
private KEYWORD1 private
|
||||
protected KEYWORD1
|
||||
public KEYWORD1 public
|
||||
return KEYWORD1 return
|
||||
static KEYWORD1 static
|
||||
strictfp KEYWORD1
|
||||
super KEYWORD1 super
|
||||
this KEYWORD1 this
|
||||
throw KEYWORD1
|
||||
strictfp KEYWORD1
|
||||
throws KEYWORD1
|
||||
transient KEYWORD1
|
||||
true KEYWORD1 true
|
||||
@@ -215,6 +209,16 @@ void KEYWORD1 void
|
||||
volatile KEYWORD1
|
||||
|
||||
|
||||
# Java keywords which can be followed by a parenthesis
|
||||
|
||||
assert KEYWORD6
|
||||
case KEYWORD6 case
|
||||
return KEYWORD6 return
|
||||
super KEYWORD6 super
|
||||
this KEYWORD6 this
|
||||
throw KEYWORD6
|
||||
|
||||
|
||||
# Datatypes
|
||||
|
||||
Array KEYWORD5 Array
|
||||
|
||||
@@ -988,10 +988,9 @@ public class ASTGenerator {
|
||||
continue;
|
||||
|
||||
matchedClass = matchedClass.substring(d + 1); //class name
|
||||
candidates.add(new CompletionCandidate(matchedClass, "<html>"
|
||||
+ matchedClass + " : " + "<font color=#777777>"
|
||||
+ matchedClass2.substring(0, d) + "</font>", matchedClass
|
||||
+ "</html>", CompletionCandidate.PREDEF_CLASS)); // display package name in grey
|
||||
candidates.add(new CompletionCandidate(matchedClass,
|
||||
matchedClass + " : "
|
||||
+ matchedClass2.substring(0, d) , matchedClass, CompletionCandidate.PREDEF_CLASS)); // display package name in grey
|
||||
//log("-> " + className);
|
||||
}
|
||||
}
|
||||
@@ -1082,8 +1081,10 @@ public class ASTGenerator {
|
||||
|| candidates.get(i).getType() == CompletionCandidate.PREDEF_METHOD) {
|
||||
CompletionCandidate cc = candidates.get(i - 1);
|
||||
String label = cc.getLabel();
|
||||
log(label);
|
||||
int x = label.lastIndexOf(')');
|
||||
cc.setLabel(cc.getElementName() + "(...)" + label.substring(x + 1));
|
||||
cc.setLabel((cc.getLabel().contains("<html>") ? "" : "")
|
||||
+ cc.getElementName() + "(...)" + label.substring(x + 1));
|
||||
cc.setCompletionString(cc.getElementName() + "(");
|
||||
ignoredSome = true;
|
||||
continue;
|
||||
|
||||
@@ -117,6 +117,10 @@ public class CompletionCandidate implements Comparable<CompletionCandidate>{
|
||||
f.getDeclaringClass().getName();
|
||||
elementName = f.getName();
|
||||
type = PREDEF_FIELD;
|
||||
// "<html>"
|
||||
// + matchedClass + " : " + "<font color=#777777>"
|
||||
// + matchedClass2.substring(0, d) + "</font>", matchedClass
|
||||
// + "</html>"
|
||||
label = f.getName() + " : " + f.getType().getSimpleName()
|
||||
+ " - " + f.getDeclaringClass().getSimpleName();
|
||||
completionString = elementName;
|
||||
|
||||
@@ -1017,10 +1017,6 @@ public class ErrorCheckerService implements Runnable{
|
||||
//astGenerator.suggestImports(missingClass);
|
||||
String[] si = astGenerator.getSuggestImports(missingClass);
|
||||
if(si != null && si.length > 0){
|
||||
// log("Suggested imps");
|
||||
// for (int j = 0; j < si.length; j++) {
|
||||
// log(si[j]);
|
||||
// }
|
||||
p.setImportSuggestions(si);
|
||||
errorData[i][0] = "<html>"
|
||||
+ problemsList.get(i).getMessage()
|
||||
|
||||
@@ -14,9 +14,10 @@ X add local override (needs documentation)
|
||||
X figure out copyDir() problems before pull
|
||||
o moving window to a new location is broken due to the pull
|
||||
X update to use new 7u72 version of JRE (and JDK) stuff
|
||||
|
||||
manindra
|
||||
X ToolTipManager error
|
||||
X `return` keyword not treated as such when followed by a bracket
|
||||
X https://github.com/processing/processing/issues/2099
|
||||
X https://github.com/processing/processing/pull/2958
|
||||
X ToolTipManager error fix from Manindra
|
||||
X https://github.com/processing/processing/issues/2926
|
||||
|
||||
pulls
|
||||
@@ -114,8 +115,6 @@ _ https://github.com/processing/processing/issues/1898
|
||||
|
||||
|
||||
help me
|
||||
_ `return` keyword not treated as such when followed by a bracket
|
||||
_ https://github.com/processing/processing/issues/2099
|
||||
_ IllegalArgumentException when clicking between editor windows
|
||||
_ https://github.com/processing/processing/issues/2530
|
||||
_ "String index out of range" error
|
||||
|
||||
Reference in New Issue
Block a user