Skip to content

Commit bd5fdce

Browse files
authored
Merge pull request #1 from processing/master
Merge master from original fork
2 parents be7e251 + e77ce47 commit bd5fdce

File tree

23 files changed

+196
-138
lines changed

23 files changed

+196
-138
lines changed

app/src/processing/app/Problem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public interface Problem {
2626
public boolean isWarning();
2727

2828
public int getTabIndex();
29-
public int getLineNumber();
29+
public int getLineNumber(); // 0-indexed
3030
public String getMessage();
3131

3232
public int getStartOffset();

app/src/processing/app/ui/Editor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,9 +3083,9 @@ public void updateErrorTable(List<Problem> problems) {
30833083
}
30843084

30853085

3086-
public void highlight(Problem p) {
3086+
public void highlight(Problem p) {
30873087
if (p != null) {
3088-
highlight(p.getTabIndex(), p.getStartOffset(), p.getStartOffset());
3088+
highlight(p.getTabIndex(), p.getStartOffset(), p.getStopOffset());
30893089
}
30903090
}
30913091

build/build.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@
7777
or http://stackoverflow.com/q/10268583 -->
7878
<property name="jdk.hash" value="1961070e4c9b4e26a04e7f5a083f551e" />
7979

80+
<!-- these a*holes at Oracle... no longer works without a login
81+
<property name="jdk.update" value="212" />
82+
<property name="jdk.build" value="10" />
83+
<property name="jdk.hash" value="59066701cf1a433da9770636fbc4c9aa" />
84+
-->
85+
8086
<property name="jdk.short" value="${jdk.version}u${jdk.update}" />
8187
<property name="jdk.esoteric" value="1.${jdk.version}.0_${jdk.update}" />
8288

@@ -388,11 +394,11 @@
388394
message="Do not call assemble from the command line." />
389395

390396
<!-- copy shared tools folder -->
391-
<copy todir="${target.path}/tools">
397+
<copy todir="${target.path}/tools" preservelastmodified="true">
392398
<fileset dir="shared/tools" />
393399
</copy>
394400

395-
<copy todir="${target.path}/modes/java">
401+
<copy todir="${target.path}/modes/java" preservelastmodified="true">
396402
<fileset dir="../java">
397403
<!-- don't include LWJGL, it's not operational -->
398404
<exclude name="libraries/lwjgl/**" />
@@ -403,7 +409,8 @@
403409
</copy>
404410

405411
<!-- get the examples folder, but don't require it to buid -->
406-
<copy todir="${target.path}/modes/java/examples" failonerror="false">
412+
<copy todir="${target.path}/modes/java/examples"
413+
preservelastmodified="true" failonerror="false">
407414
<fileset dir="${examples.dir}" />
408415
</copy>
409416

@@ -643,7 +650,7 @@
643650
<arg line="${jdk.path.macosx}/Contents/Home/jre/lib/jli/libjli.dylib ${jli.path}"/>
644651
</exec>
645652

646-
<copy todir="${contents.dir}/Java">
653+
<copy todir="${contents.dir}/Java" preservelastmodified="true">
647654
<fileset dir=".." includes="core/library/**" /> <!-- why this? -->
648655
<!--<fileset dir="shared" includes="launch4j/**" />-->
649656
<fileset dir="shared" includes="lib/**" />
@@ -785,7 +792,7 @@
785792
<target name="linux-build" depends="ignore-tools, check-linux-arm32, check-linux-arm64, revision-check, linux-check-os, jre-download, subprojects-build, subprojects-build-linux-arm32, subprojects-build-linux-arm64" description="Build Linux version">
786793
<mkdir dir="linux/work" />
787794

788-
<copy todir="linux/work">
795+
<copy todir="linux/work" preservelastmodified="true">
789796
<fileset dir=".." includes="core/library/**" />
790797
<fileset dir="shared" includes="launch4j/**" />
791798
<fileset dir="shared" includes="lib/**" />
@@ -818,7 +825,7 @@
818825
<fileset dir="${launch4j.dir}/bin" includes="windres-*" />
819826
</delete>
820827

821-
<copy todir="linux/work/lib" flatten="true">
828+
<copy todir="linux/work/lib" flatten="true" preservelastmodified="true">
822829
<fileset refid="runtime.jars" />
823830
</copy>
824831

@@ -1073,7 +1080,7 @@
10731080

10741081
<!-- assemble the pde -->
10751082
<mkdir dir="windows/work/lib" />
1076-
<copy todir="windows/work/lib" flatten="true">
1083+
<copy todir="windows/work/lib" flatten="true" preservelastmodified="true">
10771084
<fileset refid="runtime.jars" />
10781085
</copy>
10791086

@@ -1094,7 +1101,7 @@
10941101
<mapper type="flatten"/>
10951102
</unzip>
10961103

1097-
<copy todir="windows/work">
1104+
<copy todir="windows/work" preservelastmodified="true">
10981105
<fileset dir=".." includes="core/library/**" />
10991106
<fileset dir="shared" includes="launch4j/**" />
11001107
<fileset dir="shared" includes="lib/**" />

build/macosx/appbundler.jar

-4.75 KB
Binary file not shown.

build/macosx/appbundler/build.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ questions.
3333
version=1.0ea
3434
-->
3535
<property name="arch64" value="-arch x86_64" />
36-
<property name="arch32" value="-arch i386" />
37-
<property name="archppc" value="-arch ppc" />
36+
<!-- <property name="arch32" value="-arch i386" /> -->
37+
<!-- <property name="archppc" value="-arch ppc" /> -->
3838
<property name="cc" value="gcc" />
3939

4040
<property name="folder.src" value="src"/>
@@ -73,7 +73,8 @@ questions.
7373
</copy>
7474

7575
<exec executable="${cc}">
76-
<arg line="${arch64} ${arch32}"/>
76+
<!-- <arg line="${arch64} ${arch32}"/> -->
77+
<arg line="${arch64}"/>
7778
<arg value="-I"/>
7879
<arg value="${env.JAVA_HOME}/include"/>
7980
<arg value="-I"/>
@@ -87,10 +88,10 @@ questions.
8788
<arg value="-isysroot"/>
8889
<!--
8990
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"/>
90-
<arg value="-mmacosx-version-min=10.7"/>
91+
<arg value="-mmacosx-version-min=10.7"/>
9192
-->
92-
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"/>
93-
<arg value="-mmacosx-version-min=10.8"/>
93+
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"/>
94+
<arg value="-mmacosx-version-min=10.8"/>
9495
<arg value="native/main.m"/>
9596
</exec>
9697
</target>

build/macosx/appbundler/src/com/oracle/appbundler/AppBundlerTask.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ private void copyResources(File resourcesDirectory) throws IOException {
458458
} finally {
459459
outputStream.close();
460460
}
461+
file.setLastModified(zipEntry.getTime());
461462
}
462463
zipEntry = zipInputStream.getNextEntry();
463464
}
@@ -729,7 +730,9 @@ private static void delete(File file) throws IOException {
729730

730731
private static void copy(URL location, File file) throws IOException {
731732
try (InputStream in = location.openStream()) {
732-
Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
733+
Files.copy(in, file.toPath(),
734+
// can't do attributes when coming from URL
735+
StandardCopyOption.REPLACE_EXISTING);
733736
}
734737
}
735738

@@ -740,13 +743,15 @@ private static void copy(File source, File destination) throws IOException {
740743

741744
destination.getParentFile().mkdirs();
742745

743-
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING, LinkOption.NOFOLLOW_LINKS);
746+
Files.copy(sourcePath, destinationPath,
747+
StandardCopyOption.REPLACE_EXISTING,
748+
StandardCopyOption.COPY_ATTRIBUTES,
749+
LinkOption.NOFOLLOW_LINKS);
744750

745751
if (Files.isDirectory(sourcePath, LinkOption.NOFOLLOW_LINKS)) {
746752
String[] files = source.list();
747753

748-
for (int i = 0; i < files.length; i++) {
749-
String file = files[i];
754+
for (String file : files) {
750755
copy(new File(source, file), new File(destination, file));
751756
}
752757
}

build/shared/lib/languages/PDE.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ editor.header.rename = Rename
331331
editor.header.delete = Delete
332332
editor.header.previous_tab = Previous Tab
333333
editor.header.previous_tab.keystroke.macosx = meta alt pressed LEFT
334-
editor.header.previous_tab.keystroke.windows = ctrl alt pressed LEFT
334+
editor.header.previous_tab.keystroke.windows = ctrl pressed PAGE_UP
335335
editor.header.previous_tab.keystroke.linux = ctrl pressed PAGE_UP
336336
editor.header.next_tab = Next Tab
337337
editor.header.next_tab.keystroke.macosx = meta alt pressed RIGHT
338-
editor.header.next_tab.keystroke.windows = ctrl alt pressed RIGHT
338+
editor.header.next_tab.keystroke.windows = ctrl pressed PAGE_DOWN
339339
editor.header.next_tab.keystroke.linux = ctrl pressed PAGE_DOWN
340340
editor.header.delete.warning.title = Yeah, no.
341341
editor.header.delete.warning.text = You cannot delete the main tab of the only open sketch.

core/build.xml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
</target>
1616

1717
<target name="compile" description="Compile" depends="methods-build">
18-
<taskdef name="methods"
19-
classname="PAppletMethods"
18+
<taskdef name="methods"
19+
classname="PAppletMethods"
2020
classpath="methods/methods.jar" />
2121
<methods dir="${basedir}/src/processing/core" recorder="true" />
2222

2323
<!-- Where can I expect to find Java Mode JARs? -->
2424
<property name="java.mode" value="../java/mode/" />
25-
25+
2626
<!-- Check for JDT compiler, since this is likely a PDE build. Using
2727
it allows us to build the PDE with only a JRE on Windows and Linux.
28-
So that the core can be built independently of the PDE,
28+
So that the core can be built independently of the PDE,
2929
use javac (the "modern" compiler) if ecj is not present. -->
3030
<property name="jdt.jar" value="${java.mode}/org.eclipse.jdt.core.jar" />
31-
<condition property="build.compiler"
31+
<condition property="build.compiler"
3232
value="org.eclipse.jdt.core.JDTCompilerAdapter"
3333
else="modern">
3434
<available file="${jdt.jar}" />
@@ -51,8 +51,8 @@
5151
includeAntRuntime="false"
5252
debug="true"
5353
destdir="bin"
54-
classpath="apple.jar;
55-
library/jogl-all.jar;
54+
classpath="apple.jar;
55+
library/jogl-all.jar;
5656
library/gluegen-rt.jar"
5757
nowarn="true">
5858
<!-- kinda gross, but if not using the JDT, this just ignored anyway -->
@@ -61,23 +61,24 @@
6161
<include name="processing/**" />
6262
<exclude name="processing/javafx/**" if="fx.unavailable" />
6363
</javac>
64-
64+
6565
<!-- Copy the jnilib to the bin folder so it's included. -->
66-
<copy todir="bin/japplemenubar"
67-
file="src/japplemenubar/libjAppleMenuBar.jnilib" />
66+
<copy todir="bin/japplemenubar"
67+
file="src/japplemenubar/libjAppleMenuBar.jnilib"
68+
preservelastmodified="true" />
6869

6970
<!-- Copy shaders to bin. (Eclipse does this automatically.) -->
70-
<copy todir="bin">
71+
<copy todir="bin" preservelastmodified="true">
7172
<fileset dir="src">
7273
<include name="processing/opengl/shaders/*.glsl" />
7374
<include name="processing/opengl/cursors/*.png" />
7475
<include name="icon/*.png" />
7576
</fileset>
7677
</copy>
77-
</target>
78+
</target>
7879

7980
<target name="build" depends="compile" description="Build core library">
8081
<jar basedir="bin" destfile="library/core.jar" />
8182
</target>
82-
83+
8384
</project>

core/src/processing/core/PApplet.java

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ public class PApplet implements PConstants {
281281
* @see PApplet#get(int, int, int, int)
282282
* @see PApplet#set(int, int, int)
283283
* @see PImage
284+
* @see PApplet#pixelDensity()
285+
* @see PApplet#pixelWidth
286+
* @see PApplet#pixelHeight
284287
*/
285288
public int[] pixels;
286289

@@ -1210,7 +1213,8 @@ public int displayDensity(int display) {
12101213
/**
12111214
* @webref environment
12121215
* @param density 1 or 2
1213-
*
1216+
* @see PApplet#pixelWidth
1217+
* @see PApplet#pixelHeight
12141218
*/
12151219
public void pixelDensity(int density) {
12161220
//println(density + " " + this.pixelDensity);
@@ -2000,6 +2004,9 @@ public void fullScreen(String renderer, int display) {
20002004
* @param height height of the display window in units of pixels
20012005
* @see PApplet#width
20022006
* @see PApplet#height
2007+
* @see PApplet#setup()
2008+
* @see PApplet#settings()
2009+
* @see PApplet#fullScreen()
20032010
*/
20042011
public void size(int width, int height) {
20052012
// Check to make sure the width/height have actually changed. It's ok to
@@ -12573,17 +12580,17 @@ public void bezier(float x1, float y1, float z1,
1257312580
* ( begin auto-generated from curvePoint.xml )
1257412581
*
1257512582
* Evalutes the curve at point t for points a, b, c, d. The parameter t
12576-
* varies between 0 and 1, a and d are points on the curve, and b and c are
12577-
* the control points. This can be done once with the x coordinates and a
12583+
* varies between 0 and 1, a and d are the control points, and b and c are
12584+
* the points on the curve. This can be done once with the x coordinates and a
1257812585
* second time with the y coordinates to get the location of a curve at t.
1257912586
*
1258012587
* ( end auto-generated )
1258112588
*
1258212589
* @webref shape:curves
12583-
* @param a coordinate of first point on the curve
12584-
* @param b coordinate of second point on the curve
12585-
* @param c coordinate of third point on the curve
12586-
* @param d coordinate of fourth point on the curve
12590+
* @param a coordinate of first control point
12591+
* @param b coordinate of first point on the curve
12592+
* @param c coordinate of second point on the curve
12593+
* @param d coordinate of second control point
1258712594
* @param t value between 0 and 1
1258812595
* @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float)
1258912596
* @see PGraphics#curveVertex(float, float)
@@ -14855,6 +14862,8 @@ public void specular(int rgb) {
1485514862

1485614863
/**
1485714864
* gray number specifying value between white and black
14865+
*
14866+
* @param gray value between black and white, by default 0 to 255
1485814867
*/
1485914868
public void specular(float gray) {
1486014869
if (recorder != null) recorder.specular(gray);
@@ -14920,6 +14929,8 @@ public void emissive(int rgb) {
1492014929

1492114930
/**
1492214931
* gray number specifying value between white and black
14932+
*
14933+
* @param gray value between black and white, by default 0 to 255
1492314934
*/
1492414935
public void emissive(float gray) {
1492514936
if (recorder != null) recorder.emissive(gray);

core/src/processing/core/PGraphics.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,17 +3424,17 @@ public void bezier(float x1, float y1, float z1,
34243424
* ( begin auto-generated from curvePoint.xml )
34253425
*
34263426
* Evalutes the curve at point t for points a, b, c, d. The parameter t
3427-
* varies between 0 and 1, a and d are points on the curve, and b and c are
3428-
* the control points. This can be done once with the x coordinates and a
3427+
* varies between 0 and 1, a and d are the control points, and b and c are
3428+
* the points on the curve. This can be done once with the x coordinates and a
34293429
* second time with the y coordinates to get the location of a curve at t.
34303430
*
34313431
* ( end auto-generated )
34323432
*
34333433
* @webref shape:curves
3434-
* @param a coordinate of first point on the curve
3435-
* @param b coordinate of second point on the curve
3436-
* @param c coordinate of third point on the curve
3437-
* @param d coordinate of fourth point on the curve
3434+
* @param a coordinate of first control point
3435+
* @param b coordinate of first point on the curve
3436+
* @param c coordinate of second point on the curve
3437+
* @param d coordinate of second control point
34383438
* @param t value between 0 and 1
34393439
* @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float)
34403440
* @see PGraphics#curveVertex(float, float)
@@ -6940,6 +6940,8 @@ public void specular(int rgb) {
69406940

69416941
/**
69426942
* gray number specifying value between white and black
6943+
*
6944+
* @param gray value between black and white, by default 0 to 255
69436945
*/
69446946
public void specular(float gray) {
69456947
colorCalc(gray);
@@ -7017,6 +7019,8 @@ public void emissive(int rgb) {
70177019

70187020
/**
70197021
* gray number specifying value between white and black
7022+
*
7023+
* @param gray value between black and white, by default 0 to 255
70207024
*/
70217025
public void emissive(float gray) {
70227026
colorCalc(gray);

0 commit comments

Comments
 (0)