mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Removed dependency from Base in all Platform classes.
This commit is contained in:
parent
eb284804f5
commit
b278c19a2a
@ -43,6 +43,7 @@ import processing.app.helpers.filefilters.OnlyDirs;
|
||||
import processing.app.helpers.filefilters.OnlyFilesWithExtension;
|
||||
import processing.app.javax.swing.filechooser.FileNameExtensionFilter;
|
||||
import processing.app.legacy.PApplet;
|
||||
import processing.app.macosx.ThinkDifferent;
|
||||
import processing.app.packages.Library;
|
||||
import processing.app.packages.LibraryList;
|
||||
import processing.app.tools.MenuScroller;
|
||||
@ -223,7 +224,9 @@ public class Base {
|
||||
protected static enum ACTION { GUI, NOOP, VERIFY, UPLOAD, GET_PREF };
|
||||
|
||||
public Base(String[] args) throws Exception {
|
||||
getPlatform().init(this);
|
||||
getPlatform().init();
|
||||
if (OSUtils.isMacOS())
|
||||
ThinkDifferent.init(this);
|
||||
|
||||
// Get the sketchbook path, and make sure it's set properly
|
||||
String sketchbookPath = Preferences.get("sketchbook.path");
|
||||
|
@ -54,7 +54,6 @@ import processing.app.legacy.PConstants;
|
||||
* know if name is proper Java package syntax.)
|
||||
*/
|
||||
public class Platform {
|
||||
Base base;
|
||||
|
||||
|
||||
/**
|
||||
@ -74,8 +73,7 @@ public class Platform {
|
||||
}
|
||||
|
||||
|
||||
public void init(Base base) {
|
||||
this.base = base;
|
||||
public void init() {
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,7 +25,6 @@ package processing.app.macosx;
|
||||
import com.apple.eio.FileManager;
|
||||
import org.apache.commons.exec.CommandLine;
|
||||
import org.apache.commons.exec.Executor;
|
||||
import processing.app.Base;
|
||||
import processing.app.debug.TargetPackage;
|
||||
import processing.app.tools.ExternalProcessExecutor;
|
||||
import processing.app.legacy.PApplet;
|
||||
@ -58,9 +57,8 @@ public class Platform extends processing.app.Platform {
|
||||
Toolkit.getDefaultToolkit();
|
||||
}
|
||||
|
||||
public void init(Base base) {
|
||||
public void init() {
|
||||
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
||||
ThinkDifferent.init(base);
|
||||
/*
|
||||
try {
|
||||
String name = "processing.app.macosx.ThinkDifferent";
|
||||
|
@ -50,7 +50,7 @@ public class ThinkDifferent implements ApplicationListener {
|
||||
private Base base;
|
||||
|
||||
|
||||
static protected void init(Base base) {
|
||||
static public void init(Base base) {
|
||||
if (application == null) {
|
||||
//application = new com.apple.eawt.Application();
|
||||
application = com.apple.eawt.Application.getApplication();
|
||||
|
@ -28,7 +28,6 @@ import com.sun.jna.Native;
|
||||
import org.apache.commons.exec.CommandLine;
|
||||
import org.apache.commons.exec.Executor;
|
||||
|
||||
import processing.app.Base;
|
||||
import processing.app.PreferencesData;
|
||||
import processing.app.debug.TargetPackage;
|
||||
import processing.app.legacy.PApplet;
|
||||
@ -56,8 +55,8 @@ public class Platform extends processing.app.Platform {
|
||||
"\\arduino.exe \"%1\"";
|
||||
static final String DOC = "Arduino.Document";
|
||||
|
||||
public void init(Base base) {
|
||||
super.init(base);
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
checkAssociations();
|
||||
checkQuickTime();
|
||||
|
Loading…
x
Reference in New Issue
Block a user