propane 2.8.0.pre-java → 2.9.0-java

Sign up to get free protection for your applications and to get access to all the features.
data/pom.rb CHANGED
@@ -1,9 +1,8 @@
1
- project 'propane', 'http://maven.apache.org' do
2
-
1
+ require 'fileutils'
2
+ project 'propane', 'https://github.com/monkstone/propane' do
3
3
  model_version '4.0.0'
4
- id 'ruby-processing:propane:2.8.0'
4
+ id 'propane:propane:2.9.0'
5
5
  packaging 'jar'
6
-
7
6
  description 'An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.'
8
7
 
9
8
  organization 'ruby-processing', 'https://ruby-processing.github.io'
@@ -19,90 +18,102 @@ project 'propane', 'http://maven.apache.org' do
19
18
  end
20
19
  license 'GPL 3', 'http://www.gnu.org/licenses/gpl-3.0-standalone.html'
21
20
  license 'LGPL 2', 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html'
22
-
23
21
  issue_management 'https://github.com/ruby-processing/propane/issues', 'Github'
24
22
 
25
- properties( 'jogl.version' => '2.3.2',
26
- 'jruby.api' => 'http://jruby.org/apidocs/',
27
- 'source.directory' => 'src',
28
- 'maven.compiler.target' => '1.8',
29
- 'processing.api' => 'http://processing.github.io/processing-javadocs/core/',
23
+ source_control(
24
+ url: 'https://github.com/ruby-processing/propane',
25
+ connection: 'scm:git:git://github.com/ruby-processing/propane.git',
26
+ developer_connection: 'scm:git:git@github.com/ruby-processing/propane.git'
27
+ )
28
+
29
+ properties('source.directory' => 'src',
30
30
  'propane.basedir' => '${project.basedir}',
31
- 'project.build.sourceEncoding' => 'utf-8',
32
31
  'polyglot.dump.pom' => 'pom.xml',
33
- 'maven.compiler.source' => '1.8' )
34
- pom 'org.jruby:jruby:9.1.16.0'
35
- jar 'org.processing:video:3.0.2'
36
- jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
37
- jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
32
+ 'maven.compiler.source' => '1.8',
33
+ 'project.build.sourceEncoding' => 'utf-8',
34
+ 'maven.compiler.target' => '1.8',
35
+ 'jruby.api' => 'http://jruby.org/apidocs/',
36
+ 'processing.api' => 'http://processing.github.io/processing-javadocs/core/',
37
+ 'jruby.api' => 'http://jruby.org/apidocs/',
38
+ 'jogl.version' => '2.3.2'
39
+ )
40
+
41
+ pom 'org.jruby:jruby:9.2.0.0'
42
+ jar 'com.apple.eawt:apple:1.0'
43
+ jar 'org.processing:video:3.0.2'
44
+ jar('org.jogamp.jogl:jogl-all:${jogl.version}')
45
+ jar('org.jogamp.gluegen:gluegen-rt-main:${jogl.version}')
38
46
 
39
- overrides do
40
- plugin :resources, '2.6'
41
- plugin :dependency, '2.10' do
42
- execute_goals( id: 'default-cli',
43
- artifactItems: [ { groupId: 'org.jogamp.jogl',
44
- artifactId: 'jogl-all',
45
- version: '${jogl.version}',
46
- type: 'jar',
47
- outputDirectory: '${propane.basedir}/lib'
48
- },
49
- { groupId: 'org.jogamp.gluegen',
50
- artifactId: 'gluegen-rt',
51
- version: '${jogl.version}',
52
- type: 'jar',
53
- outputDirectory: '${propane.basedir}/lib'
54
- },
55
- { groupId: 'org.jogamp.jogl',
56
- artifactId: 'jogl-all',
57
- version: '${jogl.version}',
58
- classifier: 'natives-linux-amd64',
59
- type: 'jar',
60
- outputDirectory: '${propane.basedir}/lib'
61
- },
62
- { groupId: 'org.jogamp.gluegen',
63
- artifactId: 'gluegen-rt',
64
- version: '${jogl.version}',
65
- type: 'jar',
66
- classifier: 'natives-linux-amd64',
67
- outputDirectory: '${propane.basedir}/lib'
68
- },
69
- { groupId: 'org.jogamp.jogl',
70
- artifactId: 'jogl-all',
71
- version: '${jogl.version}',
72
- classifier: 'natives-macosx-universal',
73
- type: 'jar',
74
- outputDirectory: '${propane.basedir}/lib'
75
- },
76
- { groupId: 'org.jogamp.gluegen',
77
- artifactId: 'gluegen-rt',
78
- version: '${jogl.version}',
79
- type: 'jar',
80
- classifier: 'natives-macosx-universal',
81
- outputDirectory: '${propane.basedir}/lib'
82
- }
47
+ overrides do
48
+ plugin :resources, '2.6'
49
+ plugin :dependency, '2.10' do
50
+ execute_goals( id: 'default-cli',
51
+ artifactItems: [ { groupId: 'org.jogamp.jogl',
52
+ artifactId: 'jogl-all',
53
+ version: '${jogl.version}',
54
+ type: 'jar',
55
+ outputDirectory: '${propane.basedir}/lib'
56
+ },
57
+ { groupId: 'org.jogamp.gluegen',
58
+ artifactId: 'gluegen-rt',
59
+ version: '${jogl.version}',
60
+ type: 'jar',
61
+ outputDirectory: '${propane.basedir}/lib'
62
+ },
63
+ { groupId: 'org.jogamp.jogl',
64
+ artifactId: 'jogl-all',
65
+ version: '${jogl.version}',
66
+ classifier: 'natives-linux-amd64',
67
+ type: 'jar',
68
+ outputDirectory: '${propane.basedir}/lib'
69
+ },
70
+ { groupId: 'org.jogamp.gluegen',
71
+ artifactId: 'gluegen-rt',
72
+ version: '${jogl.version}',
73
+ type: 'jar',
74
+ classifier: 'natives-linux-amd64',
75
+ outputDirectory: '${propane.basedir}/lib'
76
+ },
77
+ { groupId: 'org.jogamp.jogl',
78
+ artifactId: 'jogl-all',
79
+ version: '${jogl.version}',
80
+ classifier: 'natives-macosx-universal',
81
+ type: 'jar',
82
+ outputDirectory: '${propane.basedir}/lib'
83
+ },
84
+ { groupId: 'org.jogamp.gluegen',
85
+ artifactId: 'gluegen-rt',
86
+ version: '${jogl.version}',
87
+ type: 'jar',
88
+ classifier: 'natives-macosx-universal',
89
+ outputDirectory: '${propane.basedir}/lib'
90
+ }
83
91
  ]
84
92
  )
85
93
  end
94
+
95
+ plugin( :compiler, '3.8.0',
96
+ source: '${maven.compiler.source}',
97
+ target: '${maven.compiler.target}'
98
+ )
99
+ plugin( :javadoc, '2.10.4',
100
+ detect_offline_links: 'false',
101
+ links: ['${jruby.api}', '${processing.api}']
102
+ )
103
+ plugin( :jar, '3.0.2',
104
+ archive: { manifestFile: 'MANIFEST.MF' }
105
+ )
86
106
  end
87
107
 
88
- plugin( :resources, '2.7',
89
- 'encoding' => 'UTF-8' )
90
- plugin( :compiler, '3.7.0',
91
- 'source' => '1.8',
92
- 'target' => '1.8' )
93
- plugin( :pmd, '3.3',
94
- 'sourceEncoding' => 'utf-8',
95
- 'minimumTokens' => '100',
96
- 'targetJdk' => '${compileSource}' )
97
- build do
98
- resource do
99
- directory '${source.directory}/main/java'
100
- includes ['**/**/*.glsl', '**/*.jnilib']
101
- excludes '**/**/*.java'
102
- end
103
- resource do
104
- directory '${source.directory}/main/resources'
105
- includes ['**/*.png', '*.txt']
106
- end
107
- end
108
- end
108
+ build do
109
+ resource do
110
+ directory '${source.directory}/main/java'
111
+ includes ['**/**/*.glsl', '**/*.jnilib']
112
+ excludes '**/**/*.java'
113
+ end
114
+ resource do
115
+ directory '${source.directory}/main/resources'
116
+ includes ['**/*.png', '*.txt']
117
+ end
118
+ end
119
+ end
data/pom.xml CHANGED
@@ -9,12 +9,12 @@ DO NOT MODIFIY - GENERATED CODE
9
9
  <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
10
10
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
11
11
  <modelVersion>4.0.0</modelVersion>
12
- <groupId>ruby-processing</groupId>
12
+ <groupId>propane</groupId>
13
13
  <artifactId>propane</artifactId>
14
- <version>2.8.0</version>
14
+ <version>2.9.0</version>
15
15
  <name>propane</name>
16
16
  <description>An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.</description>
17
- <url>http://maven.apache.org</url>
17
+ <url>https://github.com/monkstone/propane</url>
18
18
  <organization>
19
19
  <name>ruby-processing</name>
20
20
  <url>https://ruby-processing.github.io</url>
@@ -59,6 +59,11 @@ DO NOT MODIFIY - GENERATED CODE
59
59
  </roles>
60
60
  </developer>
61
61
  </developers>
62
+ <scm>
63
+ <connection>scm:git:git://github.com/ruby-processing/propane.git</connection>
64
+ <developerConnection>scm:git:git@github.com/ruby-processing/propane.git</developerConnection>
65
+ <url>https://github.com/ruby-processing/propane</url>
66
+ </scm>
62
67
  <issueManagement>
63
68
  <system>Github</system>
64
69
  <url>https://github.com/ruby-processing/propane/issues</url>
@@ -78,9 +83,14 @@ DO NOT MODIFIY - GENERATED CODE
78
83
  <dependency>
79
84
  <groupId>org.jruby</groupId>
80
85
  <artifactId>jruby</artifactId>
81
- <version>9.1.16.0</version>
86
+ <version>9.2.0.0</version>
82
87
  <type>pom</type>
83
88
  </dependency>
89
+ <dependency>
90
+ <groupId>com.apple.eawt</groupId>
91
+ <artifactId>apple</artifactId>
92
+ <version>1.0</version>
93
+ </dependency>
84
94
  <dependency>
85
95
  <groupId>org.processing</groupId>
86
96
  <artifactId>video</artifactId>
@@ -182,33 +192,35 @@ DO NOT MODIFIY - GENERATED CODE
182
192
  </execution>
183
193
  </executions>
184
194
  </plugin>
195
+ <plugin>
196
+ <artifactId>maven-compiler-plugin</artifactId>
197
+ <version>3.8.0</version>
198
+ <configuration>
199
+ <source>${maven.compiler.source}</source>
200
+ <target>${maven.compiler.target}</target>
201
+ </configuration>
202
+ </plugin>
203
+ <plugin>
204
+ <artifactId>maven-javadoc-plugin</artifactId>
205
+ <version>2.10.4</version>
206
+ <configuration>
207
+ <detectOfflineLinks>false</detectOfflineLinks>
208
+ <links>
209
+ <link>${jruby.api}</link>
210
+ <link>${processing.api}</link>
211
+ </links>
212
+ </configuration>
213
+ </plugin>
214
+ <plugin>
215
+ <artifactId>maven-jar-plugin</artifactId>
216
+ <version>3.0.2</version>
217
+ <configuration>
218
+ <archive>
219
+ <manifestFile>MANIFEST.MF</manifestFile>
220
+ </archive>
221
+ </configuration>
222
+ </plugin>
185
223
  </plugins>
186
224
  </pluginManagement>
187
- <plugins>
188
- <plugin>
189
- <artifactId>maven-resources-plugin</artifactId>
190
- <version>2.7</version>
191
- <configuration>
192
- <encoding>UTF-8</encoding>
193
- </configuration>
194
- </plugin>
195
- <plugin>
196
- <artifactId>maven-compiler-plugin</artifactId>
197
- <version>3.7.0</version>
198
- <configuration>
199
- <source>1.8</source>
200
- <target>1.8</target>
201
- </configuration>
202
- </plugin>
203
- <plugin>
204
- <artifactId>maven-pmd-plugin</artifactId>
205
- <version>3.3</version>
206
- <configuration>
207
- <sourceEncoding>utf-8</sourceEncoding>
208
- <minimumTokens>100</minimumTokens>
209
- <targetJdk>${compileSource}</targetJdk>
210
- </configuration>
211
- </plugin>
212
- </plugins>
213
225
  </build>
214
226
  </project>
@@ -12,10 +12,10 @@ Gem::Specification.new do |gem|
12
12
  gem.description = <<-EOS
13
13
  A batteries included version of processing in ruby, for MacOS and linux64.
14
14
  EOS
15
- gem.summary = %q{ruby wrapper for processing-3.3.7 on MacOS and linux64 bit only for opengl}
15
+ gem.summary = %q{ruby wrapper for processing-3.4 on MacOS and linux64 bit only for opengl}
16
16
  gem.homepage = 'https://ruby-processing.github.io/propane/'
17
17
  gem.files = `git ls-files`.split($/)
18
- gem.files << 'lib/propane-2.8.0.jar'
18
+ gem.files << 'lib/propane-2.9.0.jar'
19
19
  gem.files << 'lib/gluegen-rt-2.3.2.jar'
20
20
  gem.files << 'lib/jogl-all-2.3.2.jar'
21
21
  gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-amd64.jar'
@@ -29,5 +29,5 @@ Gem::Specification.new do |gem|
29
29
  gem.add_runtime_dependency 'arcball', '~> 1.0', '>= 1.0.0'
30
30
  gem.require_paths = ['lib']
31
31
  gem.platform = 'java'
32
- gem.requirements << 'java runtime >= 1.8.0_151+'
32
+ gem.requirements << 'java runtime >= 1.8.0_171+'
33
33
  end
@@ -587,22 +587,22 @@ public class PSurfaceAWT extends PSurfaceNone {
587
587
  @Override
588
588
  public void setIcon(PImage image) {
589
589
  Image awtImage = (Image) image.getNative();
590
- frame.setIconImage(awtImage);
591
- // if (PApplet.platform != PConstants.MACOSX) {
592
- // frame.setIconImage(awtImage);
593
- //
594
- // } else {
595
- // try {
596
- // final String td = "processing.core.ThinkDifferent";
597
- // Class<?> thinkDifferent =
598
- // Thread.currentThread().getContextClassLoader().loadClass(td);
599
- // Method method =
600
- // thinkDifferent.getMethod("setIconImage", new Class[] { java.awt.Image.class });
601
- // method.invoke(null, new Object[] { awtImage });
602
- // } catch (Exception e) {
603
- // e.printStackTrace(); // That's unfortunate
604
- // }
605
- // }
590
+
591
+ if (PApplet.platform != PConstants.MACOSX) {
592
+ frame.setIconImage(awtImage);
593
+
594
+ } else {
595
+ try {
596
+ final String td = "processing.core.ThinkDifferent";
597
+ Class<?> thinkDifferent =
598
+ Thread.currentThread().getContextClassLoader().loadClass(td);
599
+ Method method =
600
+ thinkDifferent.getMethod("setIconImage", new Class[] { java.awt.Image.class });
601
+ method.invoke(null, new Object[] { awtImage });
602
+ } catch (Exception e) {
603
+ e.printStackTrace(); // That's unfortunate
604
+ }
605
+ }
606
606
  }
607
607
 
608
608
 
@@ -623,7 +623,7 @@ public class PSurfaceAWT extends PSurfaceNone {
623
623
  protected void setProcessingIcon(Frame frame) {
624
624
  // On OS X, this only affects what shows up in the dock when minimized.
625
625
  // So replacing it is actually a step backwards. Brilliant.
626
- // if (PApplet.platform != PConstants.MACOSX) {
626
+ if (PApplet.platform != PConstants.MACOSX) {
627
627
  //Image image = Toolkit.getDefaultToolkit().createImage(ICON_IMAGE);
628
628
  //frame.setIconImage(image);
629
629
  try {
@@ -643,25 +643,25 @@ public class PSurfaceAWT extends PSurfaceNone {
643
643
 
644
644
  } catch (Exception e) { } // harmless; keep this to ourselves
645
645
 
646
- // } else { // handle OS X differently
647
- // if (!dockIconSpecified()) { // don't override existing -Xdock param
648
- // // On OS X, set this for AWT surfaces, which handles the dock image
649
- // // as well as the cmd-tab image that's shown. Just one size, I guess.
650
- // URL url = PApplet.class.getResource("/icon/icon-512.png");
651
- // // Seems dangerous to have this in code instead of using reflection, no?
652
- // //ThinkDifferent.setIconImage(Toolkit.getDefaultToolkit().getImage(url));
653
- // try {
654
- // final String td = "processing.core.ThinkDifferent";
655
- // Class<?> thinkDifferent =
656
- // Thread.currentThread().getContextClassLoader().loadClass(td);
657
- // Method method =
658
- // thinkDifferent.getMethod("setIconImage", new Class[] { java.awt.Image.class });
659
- // method.invoke(null, new Object[] { Toolkit.getDefaultToolkit().getImage(url) });
660
- // } catch (Exception e) {
661
- // e.printStackTrace(); // That's unfortunate
662
- // }
663
- // }
664
- // }
646
+ } else { // handle OS X differently
647
+ if (!dockIconSpecified()) { // don't override existing -Xdock param
648
+ // On OS X, set this for AWT surfaces, which handles the dock image
649
+ // as well as the cmd-tab image that's shown. Just one size, I guess.
650
+ URL url = PApplet.class.getResource("/icon/icon-512.png");
651
+ // Seems dangerous to have this in code instead of using reflection, no?
652
+ //ThinkDifferent.setIconImage(Toolkit.getDefaultToolkit().getImage(url));
653
+ try {
654
+ final String td = "processing.core.ThinkDifferent";
655
+ Class<?> thinkDifferent =
656
+ Thread.currentThread().getContextClassLoader().loadClass(td);
657
+ Method method =
658
+ thinkDifferent.getMethod("setIconImage", new Class[] { java.awt.Image.class });
659
+ method.invoke(null, new Object[] { Toolkit.getDefaultToolkit().getImage(url) });
660
+ } catch (Exception e) {
661
+ e.printStackTrace(); // That's unfortunate
662
+ }
663
+ }
664
+ }
665
665
  }
666
666
 
667
667
 
@@ -73,34 +73,34 @@ import processing.opengl.*;
73
73
 
74
74
  /**
75
75
  * Base class for all sketches that use processing.core.
76
- * <p>
76
+ * <p/>
77
77
  * The <A HREF="https://github.com/processing/processing/wiki/Window-Size-and-Full-Screen">
78
78
  * Window Size and Full Screen</A> page on the Wiki has useful information
79
79
  * about sizing, multiple displays, full screen, etc.
80
- * <p>
80
+ * <p/>
81
81
  * Processing uses active mode rendering. All animation tasks happen on the
82
82
  * "Processing Animation Thread". The setup() and draw() methods are handled
83
83
  * by that thread, and events (like mouse movement and key presses, which are
84
84
  * fired by the event dispatch thread or EDT) are queued to be safely handled
85
85
  * at the end of draw().
86
- * <p>
86
+ * <p/>
87
87
  * Starting with 3.0a6, blit operations are on the EDT, so as not to cause
88
88
  * GUI problems with Swing and AWT. In the case of the default renderer, the
89
89
  * sketch renders to an offscreen image, then the EDT is asked to bring that
90
90
  * image to the screen.
91
- * <p>
91
+ * <p/>
92
92
  * For code that needs to run on the EDT, use EventQueue.invokeLater(). When
93
93
  * doing so, be careful to synchronize between that code and the Processing
94
94
  * animation thread. That is, you can't call Processing methods from the EDT
95
95
  * or at any random time from another thread. Use of a callback function or
96
96
  * the registerXxx() methods in PApplet can help ensure that your code doesn't
97
97
  * do something naughty.
98
- * <p>
98
+ * <p/>
99
99
  * As of Processing 3.0, we have removed Applet as the base class for PApplet.
100
100
  * This means that we can remove lots of legacy code, however one downside is
101
101
  * that it's no longer possible (without extra code) to embed a PApplet into
102
102
  * another Java application.
103
- * <p>
103
+ * <p/>
104
104
  * As of Processing 3.0, we have discontinued support for versions of Java
105
105
  * prior to 1.8. We don't have enough people to support it, and for a
106
106
  * project of our (tiny) size, we should be focusing on the future, rather
@@ -108,16 +108,16 @@ import processing.opengl.*;
108
108
  */
109
109
  public class PApplet implements PConstants {
110
110
  /** Full name of the Java version (i.e. 1.5.0_11). */
111
- static public final String JAVA_VERSION_NAME =
111
+ static public final String javaVersionName =
112
112
  System.getProperty("java.version");
113
113
 
114
- static public final int JAVA_PLATFORM;
114
+ static public final int javaPlatform;
115
115
  static {
116
- String version = JAVA_VERSION_NAME;
117
- if (JAVA_VERSION_NAME.startsWith("1.")) {
116
+ String version = javaVersionName;
117
+ if (javaVersionName.startsWith("1.")) {
118
118
  version = version.substring(2);
119
119
  }
120
- JAVA_PLATFORM = parseInt(version.substring(0, version.indexOf('.')));
120
+ javaPlatform = parseInt(version.substring(0, version.indexOf('.')));
121
121
  }
122
122
 
123
123
  /**
@@ -127,7 +127,7 @@ public class PApplet implements PConstants {
127
127
  * @deprecated
128
128
  */
129
129
  @Deprecated
130
- public static final float javaVersion = 1 + JAVA_PLATFORM / 10f;
130
+ public static final float javaVersion = 1 + javaPlatform / 10f;
131
131
 
132
132
  /**
133
133
  * Current platform in use, one of the
@@ -138,10 +138,10 @@ public class PApplet implements PConstants {
138
138
  static {
139
139
  String osname = System.getProperty("os.name");
140
140
 
141
- if (osname.contains("Mac")) {
141
+ if (osname.indexOf("Mac") != -1) {
142
142
  platform = MACOSX;
143
143
 
144
- } else if (osname.contains("Windows")) {
144
+ } else if (osname.indexOf("Windows") != -1) {
145
145
  platform = WINDOWS;
146
146
 
147
147
  } else if (osname.equals("Linux")) { // true for the ibm vm
@@ -169,8 +169,7 @@ public class PApplet implements PConstants {
169
169
  * example, if the current screen resolution is 1024x768,
170
170
  * <b>displayWidth</b> is 1024 and <b>displayHeight</b> is 768. These
171
171
  * dimensions are useful when exporting full-screen applications.
172
- *
173
- *
172
+ * <br /><br />
174
173
  * To ensure that the sketch takes over the entire screen, use "Present"
175
174
  * instead of "Run". Otherwise the window will still have a frame border
176
175
  * around it and not be placed in the upper corner of the screen. On Mac OS
@@ -1290,7 +1289,7 @@ public class PApplet implements PConstants {
1290
1289
  * Called by the browser or applet viewer to inform this applet that it
1291
1290
  * should start its execution. It is called after the init method and
1292
1291
  * each time the applet is revisited in a Web page.
1293
- * <p>
1292
+ * <p/>
1294
1293
  * Called explicitly via the first call to PApplet.paint(), because
1295
1294
  * PAppletGL needs to have a usable screen before getting things rolling.
1296
1295
  */
@@ -1306,7 +1305,7 @@ public class PApplet implements PConstants {
1306
1305
  /**
1307
1306
  * Called by the browser or applet viewer to inform
1308
1307
  * this applet that it should stop its execution.
1309
- * <p>
1308
+ * <p/>
1310
1309
  * Unfortunately, there are no guarantees from the Java spec
1311
1310
  * when or if stop() will be called (i.e. on browser quit,
1312
1311
  * or when moving between web pages), and it's not always called.
@@ -1365,7 +1364,7 @@ public class PApplet implements PConstants {
1365
1364
  // * Called by the browser or applet viewer to inform this applet
1366
1365
  // * that it is being reclaimed and that it should destroy
1367
1366
  // * any resources that it has allocated.
1368
- // * <p>
1367
+ // * <p/>
1369
1368
  // * destroy() supposedly gets called as the applet viewer
1370
1369
  // * is shutting down the applet. stop() is called
1371
1370
  // * first, and then destroy() to really get rid of things.
@@ -3701,15 +3700,15 @@ public class PApplet implements PConstants {
3701
3700
  handleMethods("dispose");
3702
3701
  }
3703
3702
 
3704
- // if (platform == MACOSX) {
3705
- // try {
3706
- // final String td = "processing.core.ThinkDifferent";
3707
- // final Class<?> thinkDifferent = getClass().getClassLoader().loadClass(td);
3708
- // thinkDifferent.getMethod("cleanup").invoke(null);
3709
- // } catch (Exception e) {
3710
- // e.printStackTrace();
3711
- // }
3712
- // }
3703
+ if (platform == MACOSX) {
3704
+ try {
3705
+ final String td = "processing.core.ThinkDifferent";
3706
+ final Class<?> thinkDifferent = getClass().getClassLoader().loadClass(td);
3707
+ thinkDifferent.getMethod("cleanup").invoke(null);
3708
+ } catch (Exception e) {
3709
+ e.printStackTrace();
3710
+ }
3711
+ }
3713
3712
 
3714
3713
  }
3715
3714
 
@@ -3720,7 +3719,7 @@ public class PApplet implements PConstants {
3720
3719
 
3721
3720
  /**
3722
3721
  * Call a method in the current class based on its name.
3723
- * <p>
3722
+ * <p/>
3724
3723
  * Note that the function being called must be public. Inside the PDE,
3725
3724
  * 'public' is automatically added, but when used without the preprocessor,
3726
3725
  * (like from Eclipse) you'll have to do it yourself.
@@ -3749,7 +3748,7 @@ public class PApplet implements PConstants {
3749
3748
  * Launch a new thread and call the specified function from that new thread.
3750
3749
  * This is a very simple way to do a thread without needing to get into
3751
3750
  * classes, runnables, etc.
3752
- * <p>
3751
+ * <p/>
3753
3752
  * Note that the function being called must be public. Inside the PDE,
3754
3753
  * 'public' is automatically added, but when used without the preprocessor,
3755
3754
  * (like from Eclipse) you'll have to do it yourself.
@@ -7599,7 +7598,7 @@ public class PApplet implements PConstants {
7599
7598
  /**
7600
7599
  * Identical to the other saveStream(), but writes to a File
7601
7600
  * object, for greater control over the file location.
7602
- * <p>
7601
+ * <p/>
7603
7602
  * Note that unlike other api methods, this will not automatically
7604
7603
  * compress or uncompress gzip files.
7605
7604
  */
@@ -7882,11 +7881,11 @@ public class PApplet implements PConstants {
7882
7881
  * Prepend the sketch folder path to the filename (or path) that is
7883
7882
  * passed in. External libraries should use this function to save to
7884
7883
  * the sketch folder.
7885
- * <p>
7884
+ * <p/>
7886
7885
  * Note that when running as an applet inside a web browser,
7887
7886
  * the sketchPath will be set to null, because security restrictions
7888
7887
  * prevent applets from accessing that information.
7889
- * <p>
7888
+ * <p/>
7890
7889
  * This will also cause an error if the sketch is not inited properly,
7891
7890
  * meaning that init() was never called on the PApplet when hosted
7892
7891
  * my some other main() or by other code. For proper use of init(),
@@ -7915,7 +7914,7 @@ public class PApplet implements PConstants {
7915
7914
  /**
7916
7915
  * Returns a path inside the applet folder to save to. Like sketchPath(),
7917
7916
  * but creates any in-between folders so that things save properly.
7918
- * <p>
7917
+ * <p/>
7919
7918
  * All saveXxxx() functions use the path to the sketch folder, rather than
7920
7919
  * its data folder. Once exported, the data folder will be found inside the
7921
7920
  * jar file of the exported application or applet. In this case, it's not
@@ -10699,18 +10698,18 @@ public class PApplet implements PConstants {
10699
10698
  }
10700
10699
  }
10701
10700
 
10702
- // if (platform == MACOSX) {
10703
- // try {
10704
- // final String td = "processing.core.ThinkDifferent";
10705
- // Class<?> thinkDifferent =
10706
- // Thread.currentThread().getContextClassLoader().loadClass(td);
10707
- // Method method =
10708
- // thinkDifferent.getMethod("init", new Class[] { PApplet.class });
10709
- // method.invoke(null, new Object[] { sketch });
10710
- // } catch (Exception e) {
10711
- // e.printStackTrace(); // That's unfortunate
10712
- // }
10713
- // }
10701
+ if (platform == MACOSX) {
10702
+ try {
10703
+ final String td = "processing.core.ThinkDifferent";
10704
+ Class<?> thinkDifferent =
10705
+ Thread.currentThread().getContextClassLoader().loadClass(td);
10706
+ Method method =
10707
+ thinkDifferent.getMethod("init", new Class[] { PApplet.class });
10708
+ method.invoke(null, new Object[] { sketch });
10709
+ } catch (Exception e) {
10710
+ e.printStackTrace(); // That's unfortunate
10711
+ }
10712
+ }
10714
10713
 
10715
10714
  // Set the suggested display that's coming from the command line
10716
10715
  // (and most likely, from the PDE's preference setting).