mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge remote-tracking branch 'remotes/upstream/master'
This commit is contained in:
@@ -46,9 +46,9 @@ import processing.mode.java.JavaMode;
|
||||
public class Base {
|
||||
// Added accessors for 0218 because the UpdateCheck class was not properly
|
||||
// updating the values, due to javac inlining the static final values.
|
||||
static private final int REVISION = 225;
|
||||
static private final int REVISION = 226;
|
||||
/** This might be replaced by main() if there's a lib/version.txt file. */
|
||||
static private String VERSION_NAME = "0225"; //$NON-NLS-1$
|
||||
static private String VERSION_NAME = "0226"; //$NON-NLS-1$
|
||||
/** Set true if this a proper release rather than a numbered revision. */
|
||||
// static private boolean RELEASE = false;
|
||||
|
||||
@@ -607,13 +607,30 @@ public class Base {
|
||||
Base.showWarning("Save",
|
||||
"Please save the sketch before changing the mode.",
|
||||
null);
|
||||
return;
|
||||
}
|
||||
nextMode = mode;
|
||||
|
||||
// If the current editor contains file extensions that the new mode can handle, then
|
||||
// write a sketch.properties file with the new mode specified, and reopen.
|
||||
boolean newModeCanHandleCurrentSource = true;
|
||||
for (final SketchCode code: sketch.getCode()) {
|
||||
if (!mode.validExtension(code.getExtension())) {
|
||||
newModeCanHandleCurrentSource = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (newModeCanHandleCurrentSource) {
|
||||
final File props = new File(sketch.getCodeFolder(), "sketch.properties");
|
||||
saveModeSettings(props, nextMode);
|
||||
handleClose(activeEditor, true);
|
||||
handleOpen(sketch.getMainFilePath());
|
||||
} else {
|
||||
// If you're changing modes, and there's nothing in the current sketch, you probably
|
||||
// don't intend to keep the old, wrong-mode editor around.
|
||||
if (sketch.isUntitled()) {
|
||||
handleClose(activeEditor, true);
|
||||
}
|
||||
nextMode = mode;
|
||||
handleNew();
|
||||
}
|
||||
}
|
||||
@@ -729,15 +746,7 @@ public class Base {
|
||||
}
|
||||
|
||||
// Create sketch properties.
|
||||
final File sketchProps = new File(newbieDir, "sketch.properties");
|
||||
try {
|
||||
final Settings settings = new Settings(sketchProps);
|
||||
settings.set("mode", nextMode.getTitle());
|
||||
settings.set("mode.id", nextMode.getIdentifier());
|
||||
settings.save();
|
||||
} catch (IOException e) {
|
||||
System.err.println("While creating " + sketchProps + ": " + e.getMessage());
|
||||
}
|
||||
saveModeSettings(new File(newbieDir, "sketch.properties"), nextMode);
|
||||
|
||||
String path = newbieFile.getAbsolutePath();
|
||||
/*Editor editor =*/ handleOpen(path, true);
|
||||
@@ -749,6 +758,18 @@ public class Base {
|
||||
}
|
||||
}
|
||||
|
||||
// Create or modify a sketch.proprties file to specify the given Mode.
|
||||
private void saveModeSettings(final File sketchProps, final Mode mode) {
|
||||
try {
|
||||
final Settings settings = new Settings(sketchProps);
|
||||
settings.set("mode", mode.getTitle());
|
||||
settings.set("mode.id", mode.getIdentifier());
|
||||
settings.save();
|
||||
} catch (IOException e) {
|
||||
System.err.println("While creating " + sketchProps + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * Replace the sketch in the current window with a new untitled document.
|
||||
@@ -1053,10 +1074,11 @@ public class Base {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close a sketch as specified by its editor window.
|
||||
* @param editor Editor object of the sketch to be closed.
|
||||
* @param modeSwitch Whether this close is being done in the context of a
|
||||
* mode switch.
|
||||
* @return true if succeeded in closing, false if canceled.
|
||||
*/
|
||||
public boolean handleClose(Editor editor, boolean modeSwitch) {
|
||||
|
||||
@@ -1046,6 +1046,18 @@ public abstract class Mode {
|
||||
abstract public String getDefaultExtension();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the appropriate file extension to use for auxilliary source files in a sketch.
|
||||
* For example, in a Java-mode sketch, auxilliary files should be name "Foo.java"; in
|
||||
* Python mode, they should be named "foo.py".
|
||||
*
|
||||
* <p>Modes that do not override this function will get the default behavior of returning the
|
||||
* default extension.
|
||||
*/
|
||||
public String getModuleExtension() {
|
||||
return getDefaultExtension();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a String[] array of proper extensions.
|
||||
|
||||
@@ -333,9 +333,6 @@ public class Sketch {
|
||||
/**
|
||||
* This is called upon return from entering a new file name.
|
||||
* (that is, from either newCode or renameCode after the prompt)
|
||||
* This code is almost identical for both the newCode and renameCode
|
||||
* cases, so they're kept merged except for right in the middle
|
||||
* where they diverge.
|
||||
*/
|
||||
protected void nameCode(String newName) {
|
||||
newName = newName.trim();
|
||||
@@ -348,7 +345,7 @@ public class Sketch {
|
||||
|
||||
// Add the extension here, this simplifies some of the logic below.
|
||||
if (newName.indexOf('.') == -1) {
|
||||
newName += "." + mode.getDefaultExtension();
|
||||
newName += "." + (renamingCode ? mode.getDefaultExtension() : mode.getModuleExtension());
|
||||
}
|
||||
|
||||
// if renaming to the same thing as before, just ignore.
|
||||
|
||||
@@ -122,6 +122,7 @@ class ContributionPanel extends JPanel {
|
||||
updateButton.setEnabled(false);
|
||||
installRemoveButton.setEnabled(false);
|
||||
installProgressBar.setVisible(true);
|
||||
installProgressBar.setIndeterminate(true);
|
||||
|
||||
((LocalContribution) contrib).removeContribution(listPanel.contribManager.editor,
|
||||
new JProgressMonitor(installProgressBar) {
|
||||
@@ -484,7 +485,7 @@ class ContributionPanel extends JPanel {
|
||||
|
||||
protected void resetInstallProgressBarState() {
|
||||
installProgressBar.setString("Starting");
|
||||
installProgressBar.setIndeterminate(true);
|
||||
installProgressBar.setIndeterminate(false);
|
||||
installProgressBar.setValue(0);
|
||||
installProgressBar.setVisible(false);
|
||||
}
|
||||
|
||||
@@ -678,7 +678,9 @@ public class Runner implements MessageConsumer {
|
||||
|
||||
for (Event event : eventSet) {
|
||||
// System.out.println("EventThread.handleEvent -> " + event);
|
||||
if (event instanceof ExceptionEvent) {
|
||||
if (event instanceof VMStartEvent) {
|
||||
vm.resume();
|
||||
} else if (event instanceof ExceptionEvent) {
|
||||
// for (ThreadReference thread : vm.allThreads()) {
|
||||
// System.out.println("thread : " + thread);
|
||||
//// thread.suspend();
|
||||
@@ -710,8 +712,6 @@ public class Runner implements MessageConsumer {
|
||||
errThread.start();
|
||||
outThread.start();
|
||||
|
||||
vm.resume();
|
||||
|
||||
// Shutdown begins when event thread terminates
|
||||
try {
|
||||
if (eventThread != null) eventThread.join(); // is this the problem?
|
||||
|
||||
+14
-7
@@ -20,13 +20,12 @@
|
||||
</condition>
|
||||
|
||||
<!-- Require Java 7 to bootstrap, otherwise there will be sadness.
|
||||
And I guess Java 8 should work too? Sorta? -->
|
||||
Java 1.8 caused build problems (with ECJ?) so not supported. -->
|
||||
<fail message="Unsupported Java version: ${java.version}. Make sure that Java 7 (aka Java 1.7) is installed.">
|
||||
<condition>
|
||||
<not>
|
||||
<or>
|
||||
<contains string="${java.version}" substring="1.7" />
|
||||
<contains string="${java.version}" substring="1.8" />
|
||||
</or>
|
||||
</not>
|
||||
</condition>
|
||||
@@ -152,7 +151,7 @@
|
||||
</condition>
|
||||
|
||||
<!-- Set the version of Java that must be present to build. -->
|
||||
<property name="jdk.update.macosx" value="51" />
|
||||
<property name="jdk.update.macosx" value="55" />
|
||||
<property name="jdk.path.macosx" value="/Library/Java/JavaVirtualMachines/jdk1.7.0_${jdk.update.macosx}.jdk" />
|
||||
|
||||
<available file="${jdk.path.macosx}" property="macosx_jdk_found" />
|
||||
@@ -630,12 +629,20 @@
|
||||
With a proper ID, if code signing fails, you may need to use:
|
||||
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
|
||||
</echo>
|
||||
<exec executable="codesign" dir="macosx/work">
|
||||
<arg value="--deep" />
|
||||
|
||||
<!-- 3rd party is for the app store, dev id is gatekeeper only -->
|
||||
<!--<arg value="3rd Party Mac Developer Application" />-->
|
||||
|
||||
<exec executable="/usr/bin/codesign" dir="macosx/work">
|
||||
<arg value="--force" />
|
||||
<arg value="--sign" />
|
||||
<arg value="Developer ID Application" />
|
||||
<arg value="Processing.app/Contents/PlugIns/jdk1.7.0_${jdk.update.macosx}.jdk" />
|
||||
</exec>
|
||||
|
||||
<exec executable="/usr/bin/codesign" dir="macosx/work">
|
||||
<arg value="--force" />
|
||||
<arg value="--sign" />
|
||||
<!-- 3rd party is for the app store, dev id is gatekeeper only -->
|
||||
<!-- <arg value="3rd Party Mac Developer Application" />-->
|
||||
<arg value="Developer ID Application" />
|
||||
<arg value="Processing.app" />
|
||||
</exec>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
PROCESSING 2.1.2 (REV 0225) - 11 April 2014
|
||||
PROCESSING 2.1.2 (REV 0225) - 15 April 2014
|
||||
|
||||
Lots of small bug fixes plus some additional changes to support
|
||||
the new Python Mode, coming soon: https://github.com/jdf/processing.py
|
||||
@@ -6,6 +6,11 @@ the new Python Mode, coming soon: https://github.com/jdf/processing.py
|
||||
|
||||
[ the pde ]
|
||||
|
||||
+ The PDE was using 15% of CPU while just sitting idle. Thanks to
|
||||
David Fokkema for the fix (and pull request).
|
||||
https://github.com/processing/processing/issues/1561
|
||||
https://github.com/processing/processing/pull/2451
|
||||
|
||||
+ Fix exception caused by Runner when it can't find location
|
||||
https://github.com/processing/processing/issues/2346
|
||||
https://github.com/processing/processing/pull/2359
|
||||
@@ -22,9 +27,15 @@ the new Python Mode, coming soon: https://github.com/jdf/processing.py
|
||||
+ Remove some hardcoding for .pde as extension
|
||||
https://github.com/processing/processing/issues/2420
|
||||
|
||||
+ Update code signing for Processing.app for Mavericks changes
|
||||
https://github.com/processing/processing/issues/2453
|
||||
|
||||
|
||||
[ the core ]
|
||||
|
||||
+ sketchPath() was returning user.home in exported apps on OS X
|
||||
https://github.com/processing/processing/issues/2181
|
||||
|
||||
+ Fix bug in StringDict(Reader) that wasn't setting the indices hashmap
|
||||
|
||||
+ Call revalidate() via reflection so that build works under 1.6 (using
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
else="modern">
|
||||
<available file="${ecj.jar}" />
|
||||
</condition>
|
||||
<!--<echo message="compiler is ${build.compiler}" />-->
|
||||
|
||||
<mkdir dir="bin" />
|
||||
<javac source="1.7"
|
||||
|
||||
@@ -1,3 +1,49 @@
|
||||
0225 core (2.1.2)
|
||||
X bug with StringDict(Reader) that wasn't setting the indices hashmap
|
||||
X check this with other versions of this class
|
||||
X call revalidate() via reflection
|
||||
X text looks lousy compared to the Apple JVM
|
||||
X mess with rendering hints? (notes in PGraphicsJava2D)
|
||||
X improvements made, but still not amazing.. just at level of Windows/Linux
|
||||
X PGraphics.colorCalcARGB(int, float) doesn't cap alpha
|
||||
X https://github.com/processing/processing/issues/2439
|
||||
X run window border color changed in 2.1
|
||||
X https://github.com/processing/processing/issues/2297
|
||||
X simple NPE issue that needs workaround
|
||||
X https://github.com/processing/processing/issues/2354
|
||||
|
||||
fixed in 2.1
|
||||
X draw() called again before finishing on OS X (retina issue)
|
||||
X https://github.com/processing/processing/issues/1709
|
||||
X get() not always setting alpha channel when used with point()
|
||||
X https://github.com/processing/processing/issues/1756
|
||||
A support for geometry and tessellation shaders (on desktop)
|
||||
A https://github.com/processing/processing/issues/2252
|
||||
|
||||
andres
|
||||
X copy() under OPENGL uses upside-down coordinates for cropping
|
||||
X https://github.com/processing/processing/issues/2345
|
||||
X video on windows causes exception
|
||||
X https://github.com/processing/processing/issues/2327
|
||||
X Shape Font Rendering was broken with the OpenGL Renderer
|
||||
X https://github.com/processing/processing/issues/2375
|
||||
A depth buffer shouldn't be cleared when depth mask is disabled
|
||||
A https://github.com/processing/processing/issues/2296
|
||||
A set pixels transparent by default in P2D/P3D
|
||||
A https://github.com/processing/processing/issues/2207
|
||||
A unwind depth sorting because it was breaking DXF export
|
||||
A https://github.com/processing/processing/issues/2404
|
||||
A Sketch hangs if sketchRenderer() returns an OpenGL renderer
|
||||
A https://github.com/processing/processing/issues/2363
|
||||
A "buffer" uniform triggers shader compilation error
|
||||
A https://github.com/processing/processing/issues/2325
|
||||
A buffer has been renamed to ppixels for shaders
|
||||
A noLoop clears screen on Windows 8
|
||||
A https://github.com/processing/processing/issues/2416
|
||||
A fix pixels[] array for video capture
|
||||
A https://github.com/processing/processing/issues/2424
|
||||
|
||||
|
||||
0224 core (2.1.1)
|
||||
X PImage resize() causes PImage not to be rendered in JAVA2D
|
||||
X https://github.com/processing/processing/issues/2179
|
||||
|
||||
@@ -327,7 +327,7 @@ public class PApplet extends Applet
|
||||
public String[] args;
|
||||
|
||||
/** Path to sketch folder */
|
||||
public String sketchPath; //folder;
|
||||
public String sketchPath;
|
||||
|
||||
static final boolean DEBUG = false;
|
||||
// static final boolean DEBUG = true;
|
||||
@@ -444,11 +444,16 @@ public class PApplet extends Applet
|
||||
* ( end auto-generated )
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -463,11 +468,16 @@ public class PApplet extends Applet
|
||||
* ( end auto-generated )
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*
|
||||
*/
|
||||
public int mouseY;
|
||||
@@ -496,9 +506,17 @@ public class PApplet extends Applet
|
||||
*
|
||||
* ( end auto-generated )
|
||||
* @webref input:mouse
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public int pmouseX;
|
||||
|
||||
@@ -512,9 +530,17 @@ public class PApplet extends Applet
|
||||
*
|
||||
* ( end auto-generated )
|
||||
* @webref input:mouse
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public int pmouseY;
|
||||
|
||||
@@ -564,10 +590,15 @@ public class PApplet extends Applet
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public int mouseButton;
|
||||
|
||||
@@ -582,9 +613,15 @@ public class PApplet extends Applet
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public boolean mousePressed;
|
||||
|
||||
@@ -913,11 +950,12 @@ public class PApplet extends Applet
|
||||
online = false;
|
||||
}
|
||||
|
||||
try {
|
||||
if (sketchPath == null) {
|
||||
sketchPath = System.getProperty("user.dir");
|
||||
}
|
||||
} catch (Exception e) { } // may be a security problem
|
||||
// overridden in runSketch(), removing for 2.1.2
|
||||
// try {
|
||||
// if (sketchPath == null) {
|
||||
// sketchPath = System.getProperty("user.dir");
|
||||
// }
|
||||
// } catch (Exception e) { } // may be a security problem
|
||||
|
||||
// Figure out the available display width and height.
|
||||
// No major problem if this fails, we have to try again anyway in
|
||||
@@ -3024,11 +3062,15 @@ public class PApplet extends Applet
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public void mousePressed() { }
|
||||
|
||||
@@ -3048,11 +3090,15 @@ public class PApplet extends Applet
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public void mouseReleased() { }
|
||||
|
||||
@@ -3076,11 +3122,15 @@ public class PApplet extends Applet
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public void mouseClicked() { }
|
||||
|
||||
@@ -3100,10 +3150,15 @@ public class PApplet extends Applet
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public void mouseDragged() { }
|
||||
|
||||
@@ -3123,10 +3178,15 @@ public class PApplet extends Applet
|
||||
* @webref input:mouse
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
* @see PApplet#mouseWheel(MouseEvent)
|
||||
*/
|
||||
public void mouseMoved() { }
|
||||
|
||||
@@ -3163,6 +3223,17 @@ public class PApplet extends Applet
|
||||
*
|
||||
* @webref input:mouse
|
||||
* @param event the MouseEvent
|
||||
* @see PApplet#mouseX
|
||||
* @see PApplet#mouseY
|
||||
* @see PApplet#pmouseX
|
||||
* @see PApplet#pmouseY
|
||||
* @see PApplet#mousePressed
|
||||
* @see PApplet#mousePressed()
|
||||
* @see PApplet#mouseReleased()
|
||||
* @see PApplet#mouseClicked()
|
||||
* @see PApplet#mouseMoved()
|
||||
* @see PApplet#mouseDragged()
|
||||
* @see PApplet#mouseButton
|
||||
*/
|
||||
public void mouseWheel(MouseEvent event) {
|
||||
mouseWheel();
|
||||
@@ -8535,19 +8606,20 @@ public class PApplet extends Applet
|
||||
}
|
||||
|
||||
static final public Object splice(Object list, Object value, int index) {
|
||||
Object[] outgoing = null;
|
||||
Class<?> type = list.getClass().getComponentType();
|
||||
Object outgoing = null;
|
||||
int length = Array.getLength(list);
|
||||
|
||||
// check whether item being spliced in is an array
|
||||
if (value.getClass().getName().charAt(0) == '[') {
|
||||
int vlength = Array.getLength(value);
|
||||
outgoing = new Object[length + vlength];
|
||||
outgoing = Array.newInstance(type, length + vlength);
|
||||
System.arraycopy(list, 0, outgoing, 0, index);
|
||||
System.arraycopy(value, 0, outgoing, index, vlength);
|
||||
System.arraycopy(list, index, outgoing, index + vlength, length - index);
|
||||
|
||||
} else {
|
||||
outgoing = new Object[length + 1];
|
||||
outgoing = Array.newInstance(type, length + 1);
|
||||
System.arraycopy(list, 0, outgoing, 0, index);
|
||||
Array.set(outgoing, index, value);
|
||||
System.arraycopy(list, index, outgoing, index + 1, length - index);
|
||||
@@ -10525,7 +10597,29 @@ public class PApplet extends Applet
|
||||
String folder = null;
|
||||
try {
|
||||
folder = System.getProperty("user.dir");
|
||||
} catch (Exception e) { }
|
||||
// println("user dir is " + folder);
|
||||
|
||||
// Workaround for bug in Java for OS X from Oracle (7u51)
|
||||
// https://github.com/processing/processing/issues/2181
|
||||
if (platform == MACOSX) {
|
||||
String jarPath =
|
||||
PApplet.class.getProtectionDomain().getCodeSource().getLocation().getPath();
|
||||
// println("jar path: " + jarPath);
|
||||
// The jarPath from above will be URL encoded (%20 for spaces)
|
||||
jarPath = urlDecode(jarPath);
|
||||
// println("decoded jar path: " + jarPath);
|
||||
if (jarPath.contains("Contents/Java/")) {
|
||||
String appPath = jarPath.substring(0, jarPath.indexOf(".app") + 4);
|
||||
File containingFolder = new File(appPath).getParentFile();
|
||||
folder = containingFolder.getAbsolutePath();
|
||||
// println("folder is " + folder);
|
||||
}
|
||||
// } else {
|
||||
// println("platform is " + platform);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
int argIndex = 0;
|
||||
while (argIndex < args.length) {
|
||||
|
||||
@@ -322,7 +322,7 @@ public class PVector implements Serializable {
|
||||
* @webref pvector:method
|
||||
* @usage web_application
|
||||
* @brief Make a new 2D unit vector from an angle
|
||||
* @param angle the angle
|
||||
* @param angle the angle in radians
|
||||
* @return the new unit PVector
|
||||
*/
|
||||
static public PVector fromAngle(float angle) {
|
||||
|
||||
@@ -1165,7 +1165,12 @@ public class Table {
|
||||
output.writeDouble(row.getDouble(col));
|
||||
break;
|
||||
case CATEGORY:
|
||||
output.writeInt(columnCategories[col].index(row.getString(col)));
|
||||
String peace = row.getString(col);
|
||||
if (peace.equals(missingString)) {
|
||||
output.writeInt(missingCategory);
|
||||
} else {
|
||||
output.writeInt(columnCategories[col].index(peace));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2087,7 +2092,12 @@ public class Table {
|
||||
if (piece == null) {
|
||||
indexData[row] = missingCategory;
|
||||
} else {
|
||||
indexData[row] = columnCategories[col].index(String.valueOf(piece));
|
||||
String peace = String.valueOf(piece);
|
||||
if (peace.equals(missingString)) { // missingString might be null
|
||||
indexData[row] = missingCategory;
|
||||
} else {
|
||||
indexData[row] = columnCategories[col].index(peace);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -2933,6 +2943,9 @@ public class Table {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Treat entries with this string as "missing". Also used for categorial.
|
||||
*/
|
||||
public void setMissingString(String value) {
|
||||
missingString = value;
|
||||
}
|
||||
@@ -3562,6 +3575,7 @@ public class Table {
|
||||
read(input);
|
||||
}
|
||||
|
||||
/** gets the index, and creates one if it doesn't already exist. */
|
||||
int index(String key) {
|
||||
Integer value = dataToIndex.get(key);
|
||||
if (value != null) {
|
||||
@@ -4131,7 +4145,12 @@ public class Table {
|
||||
}
|
||||
break;
|
||||
case CATEGORY:
|
||||
output.writeInt(columnCategories[col].index(pieces[col]));
|
||||
String peace = pieces[col];
|
||||
if (peace.equals(missingString)) {
|
||||
output.writeInt(missingCategory);
|
||||
} else {
|
||||
output.writeInt(columnCategories[col].index(peace));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1267,7 +1267,7 @@ public class Texture implements PConstants {
|
||||
pg.setFramebuffer(tempFbo);
|
||||
// Clear the color buffer to make sure that the alpha channel is set to
|
||||
// full transparency
|
||||
pgl.clearColor(1, 1, 1, 1);
|
||||
pgl.clearColor(0, 0, 0, 0);
|
||||
pgl.clear(PGL.COLOR_BUFFER_BIT);
|
||||
if (scale) {
|
||||
// Rendering tex into "this", and scaling the source rectangle
|
||||
|
||||
+5
-45
@@ -1,50 +1,10 @@
|
||||
0225 core
|
||||
X bug with StringDict(Reader) that wasn't setting the indices hashmap
|
||||
X check this with other versions of this class
|
||||
X call revalidate() via reflection
|
||||
X text looks lousy compared to the Apple JVM
|
||||
X mess with rendering hints? (notes in PGraphicsJava2D)
|
||||
X improvements made, but still not amazing.. just at level of Windows/Linux
|
||||
o XML.getChildren() throwing NPE when getInt() called on non-existent var
|
||||
o https://github.com/processing/processing/issues/2367
|
||||
X PGraphics.colorCalcARGB(int, float) doesn't cap alpha
|
||||
X https://github.com/processing/processing/issues/2439
|
||||
X run window border color changed in 2.1
|
||||
X https://github.com/processing/processing/issues/2297
|
||||
X simple NPE issue that needs workaround
|
||||
X https://github.com/processing/processing/issues/2354
|
||||
0226 core
|
||||
X fix parsing with missing categorical values
|
||||
|
||||
fixed in 2.1
|
||||
X draw() called again before finishing on OS X (retina issue)
|
||||
X https://github.com/processing/processing/issues/1709
|
||||
X get() not always setting alpha channel when used with point()
|
||||
X https://github.com/processing/processing/issues/1756
|
||||
A support for geometry and tessellation shaders (on desktop)
|
||||
A https://github.com/processing/processing/issues/2252
|
||||
|
||||
andres
|
||||
X copy() under OPENGL uses upside-down coordinates for cropping
|
||||
X https://github.com/processing/processing/issues/2345
|
||||
X video on windows causes exception
|
||||
X https://github.com/processing/processing/issues/2327
|
||||
X Shape Font Rendering was broken with the OpenGL Renderer
|
||||
X https://github.com/processing/processing/issues/2375
|
||||
A depth buffer shouldn't be cleared when depth mask is disabled
|
||||
A https://github.com/processing/processing/issues/2296
|
||||
A set pixels transparent by default in P2D/P3D
|
||||
A https://github.com/processing/processing/issues/2207
|
||||
A unwind depth sorting because it was breaking DXF export
|
||||
A https://github.com/processing/processing/issues/2404
|
||||
A Sketch hangs if sketchRenderer() returns an OpenGL renderer
|
||||
A https://github.com/processing/processing/issues/2363
|
||||
A "buffer" uniform triggers shader compilation error
|
||||
A https://github.com/processing/processing/issues/2325
|
||||
A buffer has been renamed to ppixels for shaders
|
||||
A noLoop clears screen on Windows 8
|
||||
A https://github.com/processing/processing/issues/2416
|
||||
A fix pixels[] array for video capture
|
||||
A https://github.com/processing/processing/issues/2424
|
||||
|
||||
_ XML.getChildren() throwing NPE when getInt() called on non-existent var
|
||||
_ https://github.com/processing/processing/issues/2367
|
||||
_ need to sort out with docs what's happening here
|
||||
|
||||
_ point() rendering differently in 2.0.3 and 2.1
|
||||
_ https://github.com/processing/processing/issues/2278
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
0225 pde (2.1.2)
|
||||
X Fix exception caused by Runner when it can't find location
|
||||
X https://github.com/processing/processing/issues/2346
|
||||
X https://github.com/processing/processing/pull/2359
|
||||
G Serial: Update to latest upstream (fixes potential port handle leak)
|
||||
G https://github.com/processing/processing/pull/2361
|
||||
J add affordance for mode developers to run from Eclipse
|
||||
J https://github.com/processing/processing/pull/2422
|
||||
J non-pde extensions for modes cause a crash
|
||||
J https://github.com/processing/processing/issues/2419
|
||||
J some hardcoding for .pde still exists
|
||||
J https://github.com/processing/processing/issues/2420
|
||||
X the PDE uses 15% of CPU while just sitting idle (thx to David Fokkema)
|
||||
X https://github.com/processing/processing/issues/1561
|
||||
X https://github.com/processing/processing/pull/2451
|
||||
X Update code signing for Processing.app for Mavericks changes
|
||||
X https://github.com/processing/processing/issues/2453
|
||||
o use --deep for codesign to work? (nope)
|
||||
o http://furbo.org/2013/10/17/code-signing-and-mavericks/
|
||||
o http://brockerhoff.net/RB/AppCheckerLite/
|
||||
J permit modes to specify alternate extension (.py for .pyde stuff)
|
||||
J https://github.com/processing/processing/pull/2452
|
||||
X sketchPath() returns user.home in exported apps on OSX
|
||||
X https://github.com/processing/processing/issues/2181
|
||||
|
||||
|
||||
0224 pde (2.1.1)
|
||||
M fix infinite loop in Find/Replace
|
||||
M https://github.com/processing/processing/issues/2082
|
||||
|
||||
@@ -118,6 +118,7 @@ public class Client implements Runnable {
|
||||
* @throws IOException
|
||||
*/
|
||||
public Client(PApplet parent, Socket socket) throws IOException {
|
||||
this.parent = parent;
|
||||
this.socket = socket;
|
||||
|
||||
input = socket.getInputStream();
|
||||
@@ -125,6 +126,16 @@ public class Client implements Runnable {
|
||||
|
||||
thread = new Thread(this);
|
||||
thread.start();
|
||||
|
||||
// reflection to check whether host sketch has a call for
|
||||
// public void disconnectEvent(processing.net.Client)
|
||||
try {
|
||||
disconnectEventMethod =
|
||||
parent.getClass().getMethod("disconnectEvent",
|
||||
new Class[] { Client.class });
|
||||
} catch (Exception e) {
|
||||
// no such method, or an error.. which is fine, just ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +151,7 @@ public class Client implements Runnable {
|
||||
* @usage application
|
||||
*/
|
||||
public void stop() {
|
||||
if (disconnectEventMethod != null) {
|
||||
if (disconnectEventMethod != null && thread != null){
|
||||
try {
|
||||
disconnectEventMethod.invoke(parent, new Object[] { this });
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -24,12 +24,14 @@
|
||||
*/
|
||||
|
||||
package processing.net;
|
||||
|
||||
import processing.core.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.net.*;
|
||||
|
||||
|
||||
/**
|
||||
* ( begin auto-generated from Server.xml )
|
||||
*
|
||||
@@ -109,8 +111,7 @@ public class Server implements Runnable {
|
||||
* @param client the client to disconnect
|
||||
*/
|
||||
public void disconnect(Client client) {
|
||||
//client.stop();
|
||||
client.dispose();
|
||||
client.stop();
|
||||
int index = clientIndex(client);
|
||||
if (index != -1) {
|
||||
removeIndex(index);
|
||||
@@ -129,6 +130,21 @@ public class Server implements Runnable {
|
||||
}
|
||||
|
||||
|
||||
protected void disconnectAll() {
|
||||
synchronized (clients) {
|
||||
for (int i = 0; i < clientCount; i++) {
|
||||
try {
|
||||
clients[i].stop();
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
clients[i] = null;
|
||||
}
|
||||
clientCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void addClient(Client client) {
|
||||
if (clientCount == clients.length) {
|
||||
clients = (Client[]) PApplet.expand(clients);
|
||||
@@ -216,9 +232,7 @@ public class Server implements Runnable {
|
||||
thread = null;
|
||||
|
||||
if (clients != null) {
|
||||
for (int i = 0; i < clientCount; i++) {
|
||||
disconnect(clients[i]);
|
||||
}
|
||||
disconnectAll();
|
||||
clientCount = 0;
|
||||
clients = null;
|
||||
}
|
||||
@@ -311,15 +325,4 @@ public class Server implements Runnable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* General error reporting, all corralled here just in case
|
||||
* I think of something slightly more intelligent to do.
|
||||
*/
|
||||
// public void errorMessage(String where, Exception e) {
|
||||
// parent.die("Error inside Server." + where + "()", e);
|
||||
// //System.err.println("Error inside Server." + where + "()");
|
||||
// //e.printStackTrace(System.err);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -297,33 +297,38 @@ public class Movie extends PImage implements PConstants {
|
||||
* @brief Jumps to a specific location
|
||||
*/
|
||||
public void jump(float where) {
|
||||
if (seeking) return;
|
||||
if (seeking) return; // don't seek again until the current seek operation is done.
|
||||
|
||||
if (!sinkReady) {
|
||||
initSink();
|
||||
}
|
||||
|
||||
// Round the time to a multiple of the source framerate, in
|
||||
// order to eliminate stutter. Suggested by Daniel Shiffman
|
||||
// order to eliminate stutter. Suggested by Daniel Shiffman
|
||||
float fps = getSourceFrameRate();
|
||||
int frame = (int)(where * fps);
|
||||
where = frame / fps;
|
||||
final float seconds = frame / fps;
|
||||
|
||||
// Put the seek operation inside a thread to avoid blocking the main
|
||||
// animation thread
|
||||
Thread seeker = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
long pos = Video.secToNanoLong(seconds);
|
||||
boolean res = playbin.seek(rate, Format.TIME, SeekFlags.FLUSH,
|
||||
SeekType.SET, pos, SeekType.NONE, -1);
|
||||
if (!res) {
|
||||
PGraphics.showWarning("Seek operation failed.");
|
||||
}
|
||||
|
||||
boolean res;
|
||||
long pos = Video.secToNanoLong(where);
|
||||
|
||||
res = playbin.seek(rate, Format.TIME, SeekFlags.FLUSH,
|
||||
SeekType.SET, pos, SeekType.NONE, -1);
|
||||
|
||||
if (!res) {
|
||||
PGraphics.showWarning("Seek operation failed.");
|
||||
}
|
||||
|
||||
// getState() will wait until any async state change
|
||||
// (like seek in this case) has completed
|
||||
seeking = true;
|
||||
playbin.getState();
|
||||
seeking = false;
|
||||
// getState() will wait until any async state change
|
||||
// (like seek in this case) has completed
|
||||
seeking = true;
|
||||
playbin.getState();
|
||||
seeking = false;
|
||||
}
|
||||
};
|
||||
seeker.start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +1,12 @@
|
||||
0225 pde
|
||||
X Fix exception caused by Runner when it can't find location
|
||||
X https://github.com/processing/processing/issues/2346
|
||||
X https://github.com/processing/processing/pull/2359
|
||||
G Serial: Update to latest upstream (fixes potential port handle leak)
|
||||
G https://github.com/processing/processing/pull/2361
|
||||
J add affordance for mode developers to run from Eclipse
|
||||
J https://github.com/processing/processing/pull/2422
|
||||
J non-pde extensions for modes cause a crash
|
||||
J https://github.com/processing/processing/issues/2419
|
||||
J some hardcoding for .pde still exists
|
||||
J https://github.com/processing/processing/issues/2420
|
||||
0226 pde
|
||||
|
||||
|
||||
high
|
||||
_ use --deep for codesign to work?
|
||||
_ http://furbo.org/2013/10/17/code-signing-and-mavericks/
|
||||
_ sketch sometimes simply does not launch
|
||||
_ https://github.com/processing/processing/issues/2402
|
||||
_ https://github.com/processing/processing/pull/2455
|
||||
_ exported apps reporting as "damaged" on OS X
|
||||
_ https://github.com/processing/processing/issues/2095
|
||||
_ sketchPath() returns user.home in exported apps on OSX
|
||||
_ https://github.com/processing/processing/issues/2181
|
||||
_ QuickReference tool was able to bring down the environment
|
||||
_ https://github.com/processing/processing/issues/2229
|
||||
_ tab characters not recognized/drawn in the editor (2.1)
|
||||
@@ -35,6 +23,8 @@ _ maybe OS X Java can't look in subfolders? (just auto-adds things)
|
||||
|
||||
|
||||
medium
|
||||
_ re/move things from Google Code downloads
|
||||
_ https://code.google.com/p/support/wiki/DownloadsFAQ
|
||||
_ actual help with cleaning out the repo
|
||||
_ https://github.com/processing/processing/issues/1898
|
||||
_ requires re-forking, so still a ton of work
|
||||
@@ -388,8 +378,6 @@ _ active editor not being set null
|
||||
_ in Base.nextEditorLocation(), changed to "editors.size() == 0"
|
||||
_ instead of (activeEditor == null), but that's papering over a problem
|
||||
_ where the active editor is not being set null
|
||||
_ the PDE uses 15% of CPU while just sitting idle
|
||||
_ https://github.com/processing/processing/issues/1561
|
||||
_ renaming RGB (.pde) to Rgb.java says "a file named RGB.pde already exists"
|
||||
_ improve update check message "a new release (1.0.1) is available"
|
||||
_ be more descriptive, use a second line in latest.txt
|
||||
|
||||
Reference in New Issue
Block a user