mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge branch 'master' of github.com:processing/processing
This commit is contained in:
+10
-10
@@ -36,16 +36,7 @@
|
||||
<target name="check-linux-arm32" if="linux-arm32">
|
||||
<!-- there is currently no JRE available -->
|
||||
<property name="jre.download.jdk" value="true" />
|
||||
<!-- temporary special case since the URL changed between 8u51 and 8u60 -->
|
||||
<condition property="jre.downloader" value="linux-arm-vfp-hflt.tar.gz">
|
||||
<equals arg1="${jdk.update}" arg2="51" />
|
||||
</condition>
|
||||
<condition property="jre.downloader" value="linux-arm32-vfp-hflt.tar.gz">
|
||||
<not>
|
||||
<equals arg1="${jdk.update}" arg2="51" />
|
||||
</not>
|
||||
</condition>
|
||||
<!-- <property name="jre.downloader" value="linux-arm32-vfp-hflt.tar.gz" /> -->
|
||||
<property name="jre.downloader" value="linux-arm32-vfp-hflt.tar.gz" />
|
||||
<property name="linux.dist" value="linux/processing-${version}-linux-armv6hf.tgz" />
|
||||
</target>
|
||||
|
||||
@@ -940,6 +931,8 @@
|
||||
<move file="linux/work" tofile="linux/debian/opt/processing" />
|
||||
<symlink link="linux/debian/usr/bin/processing"
|
||||
resource="../../opt/processing/processing" />
|
||||
<symlink link="linux/debian/usr/bin/processing-java"
|
||||
resource="../../opt/processing/processing-java" />
|
||||
|
||||
<!-- place .desktop and .sharedmimeinfo file -->
|
||||
<copy file="linux/processing.desktop"
|
||||
@@ -954,8 +947,15 @@
|
||||
tofile="linux/debian/usr/share/mime/packages/processing.xml" />
|
||||
|
||||
<!-- Set properties for DEBIAN/control file -->
|
||||
<condition property="linux.deb" value="linux/processing-${version}-linux-armv6hf.deb">
|
||||
<equals arg1="linux-arm32" arg2="linux-arm32" />
|
||||
</condition>
|
||||
<property name="linux.deb" value="linux/processing-${version}-linux${sun.arch.data.model}.deb" />
|
||||
|
||||
<!-- Raspbian seems to borrow armhf for armv6hf, so this works -->
|
||||
<condition property="deb.arch" value="armhf">
|
||||
<equals arg1="linux-arm32" arg2="linux-arm32" />
|
||||
</condition>
|
||||
<condition property="deb.arch" value="i386">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="32" />
|
||||
</condition>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Version=@version@
|
||||
Name=Processing
|
||||
Comment=graphics and animation language
|
||||
Comment=Software sketchbook
|
||||
Exec=processing %F
|
||||
Icon=/opt/processing/lib/icons/pde-256.png
|
||||
Terminal=false
|
||||
|
||||
@@ -1870,8 +1870,9 @@ public class PApplet implements PConstants {
|
||||
|
||||
|
||||
/**
|
||||
* @param display the screen to run the sketch on (1, 2, 3, etc.)
|
||||
* @param display the screen to run the sketch on (1, 2, 3, etc. or on multiple screens using SPAN)
|
||||
*/
|
||||
|
||||
public void fullScreen(String renderer, int display) {
|
||||
if (!fullScreen ||
|
||||
!renderer.equals(this.renderer) ||
|
||||
|
||||
@@ -5171,7 +5171,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
x*modelview.m20 + y*modelview.m21 + z*modelview.m22 + modelview.m23;
|
||||
|
||||
// Used to indicate if the light is directional or not.
|
||||
lightPosition[4 * num + 3] = dir ? 1: 0;
|
||||
lightPosition[4 * num + 3] = dir ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ void main() {
|
||||
if (lightCount == i) break;
|
||||
|
||||
vec3 lightPos = lightPosition[i].xyz;
|
||||
bool isDir = zero_float < lightPosition[i].w;
|
||||
bool isDir = lightPosition[i].w < one_float;
|
||||
float spotCos = lightSpot[i].x;
|
||||
float spotExp = lightSpot[i].y;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ void main() {
|
||||
if (lightCount == i) break;
|
||||
|
||||
vec3 lightPos = lightPosition[i].xyz;
|
||||
bool isDir = zero_float < lightPosition[i].w;
|
||||
bool isDir = lightPosition[i].w < one_float;
|
||||
float spotCos = lightSpot[i].x;
|
||||
float spotExp = lightSpot[i].y;
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void main() {
|
||||
if (lightCount == i) break;
|
||||
|
||||
vec3 lightPos = lightPosition[i].xyz;
|
||||
bool isDir = zero_float < lightPosition[i].w;
|
||||
bool isDir = lightPosition[i].w < one_float;
|
||||
float spotCos = lightSpot[i].x;
|
||||
float spotExp = lightSpot[i].y;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ void main() {
|
||||
if (lightCount == i) break;
|
||||
|
||||
vec3 lightPos = lightPosition[i].xyz;
|
||||
bool isDir = zero_float < lightPosition[i].w;
|
||||
bool isDir = lightPosition[i].w < one_float;
|
||||
float spotCos = lightSpot[i].x;
|
||||
float spotExp = lightSpot[i].y;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ I2C i2c;
|
||||
|
||||
// HMC6352 is a digital compass module using I2C
|
||||
// datasheet: https://www.sparkfun.com/datasheets/Components/HMC6352.pdf
|
||||
// see setup.png in the sketch folder for wiring details
|
||||
|
||||
void setup() {
|
||||
//printArray(I2C.list());
|
||||
|
||||
@@ -3,6 +3,7 @@ color bgcolor = 0;
|
||||
|
||||
// GPIO numbers refer to different phyiscal pins on various boards
|
||||
// On the Raspberry Pi GPIO 4 is physical pin 7 on the header
|
||||
// see setup.png in the sketch folder for wiring details
|
||||
|
||||
void setup() {
|
||||
GPIO.pinMode(4, GPIO.INPUT);
|
||||
|
||||
@@ -3,6 +3,7 @@ SPI spi;
|
||||
|
||||
// MCP3001 is a Analog-to-Digital converter using SPI
|
||||
// datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21293C.pdf
|
||||
// see setup.png in the sketch folder for wiring details
|
||||
|
||||
void setup() {
|
||||
//printArray(SPI.list());
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import processing.io.*;
|
||||
MCP3001 adc;
|
||||
|
||||
// see setup.png in the sketch folder for wiring details
|
||||
|
||||
void setup() {
|
||||
//printArray(SPI.list());
|
||||
adc = new MCP3001(SPI.list()[0]);
|
||||
|
||||
@@ -2,6 +2,7 @@ import processing.io.*;
|
||||
|
||||
// GPIO numbers refer to different phyiscal pins on various boards
|
||||
// On the Raspberry Pi GPIO 4 is physical pin 7 on the header
|
||||
// see setup.png in the sketch folder for wiring details
|
||||
|
||||
void setup() {
|
||||
GPIO.pinMode(4, GPIO.INPUT);
|
||||
|
||||
@@ -3,6 +3,7 @@ boolean ledOn = false;
|
||||
|
||||
// GPIO numbers refer to different phyiscal pins on various boards
|
||||
// On the Raspberry Pi GPIO 4 is physical pin 7 on the header
|
||||
// see setup.png in the sketch folder for wiring details
|
||||
|
||||
void setup() {
|
||||
GPIO.pinMode(4, GPIO.OUTPUT);
|
||||
|
||||
@@ -33,6 +33,7 @@ import processing.mode.java.pdex.ErrorCheckerService;
|
||||
import processing.mode.java.pdex.LineMarker;
|
||||
import processing.mode.java.pdex.JavaTextArea;
|
||||
import processing.mode.java.pdex.Problem;
|
||||
import processing.mode.java.preproc.PdePreprocessor;
|
||||
import processing.mode.java.runner.Runner;
|
||||
import processing.mode.java.tweak.ColorControlBox;
|
||||
import processing.mode.java.tweak.Handle;
|
||||
@@ -136,17 +137,7 @@ public class JavaEditor extends Editor {
|
||||
hasJavaTabs = checkForJavaTabs();
|
||||
//initializeErrorChecker();
|
||||
|
||||
{ // Init error checker
|
||||
errorCheckerService = new ErrorCheckerService(this);
|
||||
for (SketchCode code : getSketch().getCode()) {
|
||||
Document document = code.getDocument();
|
||||
if (document != null) {
|
||||
errorCheckerService.addListener(document);
|
||||
}
|
||||
}
|
||||
errorCheckerService.start();
|
||||
errorCheckerService.request();
|
||||
}
|
||||
initErrorChecker();
|
||||
|
||||
// hack to add a JPanel to the right-hand side of the text area
|
||||
JPanel textAndError = new JPanel();
|
||||
@@ -180,7 +171,25 @@ public class JavaEditor extends Editor {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
public PdePreprocessor createPreprocessor(final String sketchName) {
|
||||
return new PdePreprocessor(sketchName);
|
||||
}
|
||||
|
||||
|
||||
protected void initErrorChecker() {
|
||||
errorCheckerService = new ErrorCheckerService(this);
|
||||
for (SketchCode code : getSketch().getCode()) {
|
||||
Document document = code.getDocument();
|
||||
if (document != null) {
|
||||
errorCheckerService.addListener(document);
|
||||
}
|
||||
}
|
||||
errorCheckerService.start();
|
||||
errorCheckerService.request();
|
||||
}
|
||||
|
||||
|
||||
protected JEditTextArea createTextArea() {
|
||||
return new JavaTextArea(new PdeTextAreaDefaults(mode), this);
|
||||
}
|
||||
|
||||
@@ -1296,8 +1296,16 @@ public class ASTGenerator {
|
||||
|
||||
for (ImportStatement impS : imports) {
|
||||
String temp = impS.getPackageName();
|
||||
if (impS.isStarredImport() && className.indexOf('.') == -1) {
|
||||
temp = impS.getPackageName() + "." + className;
|
||||
if (impS.isStarredImport()) { // case of starred import: pkg.foo.*
|
||||
if (className.indexOf('.') == -1) {
|
||||
temp = impS.getPackageName() + "." + className;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else { // case of class import: pkg.foo.MyClass
|
||||
if (!impS.getImportedClassName().equals(className)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
tehClass = loadClass(temp);
|
||||
if (tehClass != null) {
|
||||
@@ -1309,8 +1317,16 @@ public class ASTGenerator {
|
||||
|
||||
for (ImportStatement impS : errorCheckerService.codeFolderImports) {
|
||||
String temp = impS.getPackageName();
|
||||
if (impS.isStarredImport() && className.indexOf('.') == -1) {
|
||||
temp = impS.getPackageName() + "." + className;
|
||||
if (impS.isStarredImport()) { // case of starred import: pkg.foo.*
|
||||
if (className.indexOf('.') == -1) {
|
||||
temp = impS.getPackageName() + "." + className;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else { // case of class import: pkg.foo.MyClass
|
||||
if (!impS.getImportedClassName().equals(className)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
tehClass = loadClass(temp);
|
||||
if (tehClass != null) {
|
||||
@@ -1320,7 +1336,8 @@ public class ASTGenerator {
|
||||
//log("Doesn't exist in (code folder) imp package: " + impS.getImportName());
|
||||
}
|
||||
|
||||
PdePreprocessor p = new PdePreprocessor(null);
|
||||
// PdePreprocessor p = new PdePreprocessor(null);
|
||||
PdePreprocessor p = editor.createPreprocessor(null);
|
||||
for (String impS : p.getCoreImports()) {
|
||||
tehClass = loadClass(impS.substring(0,impS.length()-1) + className);
|
||||
if (tehClass != null) {
|
||||
|
||||
@@ -779,13 +779,13 @@ public class ErrorCheckerService {
|
||||
final String exclude = "exclude";
|
||||
|
||||
if (impName.startsWith("processing")) {
|
||||
if (JavaMode.suggestionsMap.get(include).contains(impName)) {
|
||||
if (JavaMode.suggestionsMap.containsKey(include) && JavaMode.suggestionsMap.get(include).contains(impName)) {
|
||||
return false;
|
||||
} else if (JavaMode.suggestionsMap.get(exclude).contains(impName)) {
|
||||
} else if (JavaMode.suggestionsMap.containsKey(exclude) && JavaMode.suggestionsMap.get(exclude).contains(impName)) {
|
||||
return true;
|
||||
}
|
||||
} else if (impName.startsWith("java")) {
|
||||
if (JavaMode.suggestionsMap.get(include).contains(impName)) {
|
||||
if (JavaMode.suggestionsMap.containsKey(include) && JavaMode.suggestionsMap.get(include).contains(impName)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,9 +78,26 @@ public class ImportStatement {
|
||||
}
|
||||
|
||||
public boolean isStarredImport() {
|
||||
String ret = new String(importName.trim());
|
||||
if(ret.endsWith(";"))
|
||||
String ret = importName.trim();
|
||||
if(ret.endsWith(";")) {
|
||||
ret = ret.substring(0, ret.length() - 1).trim();
|
||||
}
|
||||
return ret.endsWith(".*");
|
||||
}
|
||||
|
||||
public String getImportedClassName() {
|
||||
if (isStarredImport()) {
|
||||
return null;
|
||||
} else {
|
||||
String ret = importName.trim();
|
||||
if(ret.endsWith(";")) {
|
||||
ret = ret.substring(0, ret.length() - 1).trim();
|
||||
}
|
||||
if (ret.lastIndexOf('.') != -1) {
|
||||
return ret.substring(ret.lastIndexOf('.') + 1);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,9 +54,10 @@ public class XQPreprocessor {
|
||||
|
||||
public XQPreprocessor(ErrorCheckerService ecs) {
|
||||
this.ecs = ecs;
|
||||
|
||||
|
||||
// get parameters from the main preproc
|
||||
PdePreprocessor p = new PdePreprocessor(null);
|
||||
// PdePreprocessor p = new PdePreprocessor(null);
|
||||
PdePreprocessor p = ecs.editor.createPreprocessor(null);
|
||||
defaultImports = p.getDefaultImports();
|
||||
coreImports = p.getCoreImports();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user