Skip to content

Commit 22be22a

Browse files
bitroncmaglie
authored andcommitted
Removed self class references from Base.
1 parent b278c19 commit 22be22a

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

app/src/processing/app/Base.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ static protected void initRequirements() {
205205
try {
206206
Class.forName("com.sun.jdi.VirtualMachine");
207207
} catch (ClassNotFoundException cnfe) {
208-
Base.showPlatforms();
209-
Base.showError(_("Please install JDK 1.5 or later"),
210-
_("Arduino requires a full JDK (not just a JRE)\n" +
211-
"to run. Please install JDK 1.5 or later.\n" +
212-
"More information can be found in the reference."), cnfe);
208+
showPlatforms();
209+
showError(_("Please install JDK 1.5 or later"),
210+
_("Arduino requires a full JDK (not just a JRE)\n" +
211+
"to run. Please install JDK 1.5 or later.\n" +
212+
"More information can be found in the reference."), cnfe);
213213
}
214214
}
215215

@@ -238,14 +238,14 @@ public Base(String[] args) throws Exception {
238238
if (BaseNoGui.getPortableFolder() != null)
239239
sketchbookFolder = new File(BaseNoGui.getPortableFolder(), sketchbookPath);
240240
else
241-
sketchbookFolder = Base.absoluteFile(sketchbookPath);
241+
sketchbookFolder = absoluteFile(sketchbookPath);
242242
if (!sketchbookFolder.exists()) {
243-
Base.showWarning(_("Sketchbook folder disappeared"),
244-
_("The sketchbook folder no longer exists.\n" +
245-
"Arduino will switch to the default sketchbook\n" +
246-
"location, and create a new sketchbook folder if\n" +
247-
"necessary. Arduino will then stop talking about\n" +
248-
"himself in the third person."), null);
243+
showWarning(_("Sketchbook folder disappeared"),
244+
_("The sketchbook folder no longer exists.\n" +
245+
"Arduino will switch to the default sketchbook\n" +
246+
"location, and create a new sketchbook folder if\n" +
247+
"necessary. Arduino will then stop talking about\n" +
248+
"himself in the third person."), null);
249249
sketchbookPath = null;
250250
}
251251
}
@@ -330,7 +330,7 @@ public Base(String[] args) throws Exception {
330330
i++;
331331
if (i >= args.length)
332332
showError(null, _("Argument required for --port"), 3);
333-
Base.selectSerialPort(args[i]);
333+
selectSerialPort(args[i]);
334334
if (action == ACTION.GUI)
335335
action = ACTION.NOOP;
336336
continue;
@@ -764,13 +764,13 @@ protected File createNewUntitled() throws IOException {
764764
if (index == 26) {
765765
// In 0159, avoid running past z by sending people outdoors.
766766
if (!breakTime) {
767-
Base.showWarning(_("Time for a Break"),
768-
_("You've reached the limit for auto naming of new sketches\n" +
769-
"for the day. How about going for a walk instead?"), null);
767+
showWarning(_("Time for a Break"),
768+
_("You've reached the limit for auto naming of new sketches\n" +
769+
"for the day. How about going for a walk instead?"), null);
770770
breakTime = true;
771771
} else {
772-
Base.showWarning(_("Sunshine"),
773-
_("No really, time for some fresh air for you."), null);
772+
showWarning(_("Sunshine"),
773+
_("No really, time for some fresh air for you."), null);
774774
}
775775
return null;
776776
}
@@ -869,7 +869,7 @@ public void handleOpenReplace(File file) {
869869
*/
870870
public void handleOpenPrompt() throws Exception {
871871
// get the frontmost window frame for placing file dialog
872-
JFileChooser fd = new JFileChooser(Preferences.get("last.folder", Base.getSketchbookFolder().getAbsolutePath()));
872+
JFileChooser fd = new JFileChooser(Preferences.get("last.folder", getSketchbookFolder().getAbsolutePath()));
873873
fd.setDialogTitle(_("Open an Arduino sketch..."));
874874
fd.setFileSelectionMode(JFileChooser.FILES_ONLY);
875875
fd.setFileFilter(new FileNameExtensionFilter(_("Sketches (*.ino, *.pde)"), "ino", "pde"));
@@ -1291,7 +1291,7 @@ public void onBoardOrPortChange() {
12911291
String core = getBoardPreferences().get("build.core");
12921292
if (core.contains(":")) {
12931293
String referencedCore = core.split(":")[0];
1294-
TargetPlatform referencedPlatform = Base.getTargetPlatform(referencedCore, targetPlatform.getId());
1294+
TargetPlatform referencedPlatform = getTargetPlatform(referencedCore, targetPlatform.getId());
12951295
if (referencedPlatform != null) {
12961296
File referencedPlatformFolder = referencedPlatform.getFolder();
12971297
librariesFolders.add(new File(referencedPlatformFolder, "libraries"));
@@ -1684,7 +1684,7 @@ public void actionPerformed(ActionEvent e) {
16841684
+ "and it cannot start with a number).\n"
16851685
+ "To get rid of this message, remove the sketch from\n"
16861686
+ "{1}"), name, entry.getAbsolutePath());
1687-
Base.showMessage(_("Ignoring sketch with bad name"), complaining);
1687+
showMessage(_("Ignoring sketch with bad name"), complaining);
16881688
}
16891689
return false;
16901690
}
@@ -1764,7 +1764,7 @@ protected void loadHardware(File folder) {
17641764
*/
17651765
@SuppressWarnings("serial")
17661766
public void handleAbout() {
1767-
final Image image = Base.getLibImage("about.jpg", activeEditor);
1767+
final Image image = getLibImage("about.jpg", activeEditor);
17681768
final Window window = new Window(activeEditor) {
17691769
public void paint(Graphics g) {
17701770
g.drawImage(image, 0, 0, null);
@@ -1775,7 +1775,7 @@ public void paint(Graphics g) {
17751775

17761776
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
17771777
g.setColor(Color.white);
1778-
g.drawString(Base.VERSION_NAME, 50, 30);
1778+
g.drawString(VERSION_NAME, 50, 30);
17791779
}
17801780
};
17811781
window.addMouseListener(new MouseAdapter() {
@@ -1876,7 +1876,7 @@ static public File getBuildFolder() {
18761876
if (buildFolder == null) {
18771877
String buildPath = Preferences.get("build.path");
18781878
if (buildPath != null) {
1879-
buildFolder = Base.absoluteFile(buildPath);
1879+
buildFolder = absoluteFile(buildPath);
18801880
if (!buildFolder.exists())
18811881
buildFolder.mkdirs();
18821882
} else {
@@ -2084,7 +2084,7 @@ static protected File promptSketchbookLocation() {
20842084
}
20852085

20862086
String prompt = _("Select (or create new) folder for sketches...");
2087-
folder = Base.selectFolder(prompt, null, null);
2087+
folder = selectFolder(prompt, null, null);
20882088
if (folder == null) {
20892089
System.exit(0);
20902090
}
@@ -2212,18 +2212,18 @@ static public void registerWindowCloseKeys(JRootPane root,
22122212

22132213

22142214
static public void showReference(String filename) {
2215-
File referenceFolder = Base.getContentFile("reference");
2215+
File referenceFolder = getContentFile("reference");
22162216
File referenceFile = new File(referenceFolder, filename);
22172217
openURL(referenceFile.getAbsolutePath());
22182218
}
22192219

22202220
static public void showGettingStarted() {
22212221
if (OSUtils.isMacOS()) {
2222-
Base.showReference(_("Guide_MacOSX.html"));
2222+
showReference(_("Guide_MacOSX.html"));
22232223
} else if (OSUtils.isWindows()) {
2224-
Base.showReference(_("Guide_Windows.html"));
2224+
showReference(_("Guide_Windows.html"));
22252225
} else {
2226-
Base.openURL(_("http://www.arduino.cc/playground/Learning/Linux"));
2226+
openURL(_("http://www.arduino.cc/playground/Learning/Linux"));
22272227
}
22282228
}
22292229

0 commit comments

Comments
 (0)