Skip to content

Commit b278c19

Browse files
bitroncmaglie
authored andcommitted
Removed dependency from Base in all Platform classes.
1 parent eb28480 commit b278c19

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

app/src/processing/app/Base.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import processing.app.helpers.filefilters.OnlyFilesWithExtension;
4444
import processing.app.javax.swing.filechooser.FileNameExtensionFilter;
4545
import processing.app.legacy.PApplet;
46+
import processing.app.macosx.ThinkDifferent;
4647
import processing.app.packages.Library;
4748
import processing.app.packages.LibraryList;
4849
import processing.app.tools.MenuScroller;
@@ -223,7 +224,9 @@ static public File absoluteFile(String path) {
223224
protected static enum ACTION { GUI, NOOP, VERIFY, UPLOAD, GET_PREF };
224225

225226
public Base(String[] args) throws Exception {
226-
getPlatform().init(this);
227+
getPlatform().init();
228+
if (OSUtils.isMacOS())
229+
ThinkDifferent.init(this);
227230

228231
// Get the sketchbook path, and make sure it's set properly
229232
String sketchbookPath = Preferences.get("sketchbook.path");

app/src/processing/app/Platform.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
* know if name is proper Java package syntax.)
5555
*/
5656
public class Platform {
57-
Base base;
5857

5958

6059
/**
@@ -74,8 +73,7 @@ public void setLookAndFeel() throws Exception {
7473
}
7574

7675

77-
public void init(Base base) {
78-
this.base = base;
76+
public void init() {
7977
}
8078

8179

app/src/processing/app/macosx/Platform.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.apple.eio.FileManager;
2626
import org.apache.commons.exec.CommandLine;
2727
import org.apache.commons.exec.Executor;
28-
import processing.app.Base;
2928
import processing.app.debug.TargetPackage;
3029
import processing.app.tools.ExternalProcessExecutor;
3130
import processing.app.legacy.PApplet;
@@ -58,9 +57,8 @@ public Platform() {
5857
Toolkit.getDefaultToolkit();
5958
}
6059

61-
public void init(Base base) {
60+
public void init() {
6261
System.setProperty("apple.laf.useScreenMenuBar", "true");
63-
ThinkDifferent.init(base);
6462
/*
6563
try {
6664
String name = "processing.app.macosx.ThinkDifferent";

app/src/processing/app/macosx/ThinkDifferent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class ThinkDifferent implements ApplicationListener {
5050
private Base base;
5151

5252

53-
static protected void init(Base base) {
53+
static public void init(Base base) {
5454
if (application == null) {
5555
//application = new com.apple.eawt.Application();
5656
application = com.apple.eawt.Application.getApplication();

app/src/processing/app/windows/Platform.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.apache.commons.exec.CommandLine;
2929
import org.apache.commons.exec.Executor;
3030

31-
import processing.app.Base;
3231
import processing.app.PreferencesData;
3332
import processing.app.debug.TargetPackage;
3433
import processing.app.legacy.PApplet;
@@ -56,8 +55,8 @@ public class Platform extends processing.app.Platform {
5655
"\\arduino.exe \"%1\"";
5756
static final String DOC = "Arduino.Document";
5857

59-
public void init(Base base) {
60-
super.init(base);
58+
public void init() {
59+
super.init();
6160

6261
checkAssociations();
6362
checkQuickTime();

0 commit comments

Comments
 (0)