@@ -205,11 +205,11 @@ static protected void initRequirements() {
205
205
try {
206
206
Class .forName ("com.sun.jdi.VirtualMachine" );
207
207
} 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 );
213
213
}
214
214
}
215
215
@@ -238,14 +238,14 @@ public Base(String[] args) throws Exception {
238
238
if (BaseNoGui .getPortableFolder () != null )
239
239
sketchbookFolder = new File (BaseNoGui .getPortableFolder (), sketchbookPath );
240
240
else
241
- sketchbookFolder = Base . absoluteFile (sketchbookPath );
241
+ sketchbookFolder = absoluteFile (sketchbookPath );
242
242
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 );
249
249
sketchbookPath = null ;
250
250
}
251
251
}
@@ -330,7 +330,7 @@ public Base(String[] args) throws Exception {
330
330
i ++;
331
331
if (i >= args .length )
332
332
showError (null , _ ("Argument required for --port" ), 3 );
333
- Base . selectSerialPort (args [i ]);
333
+ selectSerialPort (args [i ]);
334
334
if (action == ACTION .GUI )
335
335
action = ACTION .NOOP ;
336
336
continue ;
@@ -764,13 +764,13 @@ protected File createNewUntitled() throws IOException {
764
764
if (index == 26 ) {
765
765
// In 0159, avoid running past z by sending people outdoors.
766
766
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 );
770
770
breakTime = true ;
771
771
} 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 );
774
774
}
775
775
return null ;
776
776
}
@@ -869,7 +869,7 @@ public void handleOpenReplace(File file) {
869
869
*/
870
870
public void handleOpenPrompt () throws Exception {
871
871
// 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 ()));
873
873
fd .setDialogTitle (_ ("Open an Arduino sketch..." ));
874
874
fd .setFileSelectionMode (JFileChooser .FILES_ONLY );
875
875
fd .setFileFilter (new FileNameExtensionFilter (_ ("Sketches (*.ino, *.pde)" ), "ino" , "pde" ));
@@ -1291,7 +1291,7 @@ public void onBoardOrPortChange() {
1291
1291
String core = getBoardPreferences ().get ("build.core" );
1292
1292
if (core .contains (":" )) {
1293
1293
String referencedCore = core .split (":" )[0 ];
1294
- TargetPlatform referencedPlatform = Base . getTargetPlatform (referencedCore , targetPlatform .getId ());
1294
+ TargetPlatform referencedPlatform = getTargetPlatform (referencedCore , targetPlatform .getId ());
1295
1295
if (referencedPlatform != null ) {
1296
1296
File referencedPlatformFolder = referencedPlatform .getFolder ();
1297
1297
librariesFolders .add (new File (referencedPlatformFolder , "libraries" ));
@@ -1684,7 +1684,7 @@ public void actionPerformed(ActionEvent e) {
1684
1684
+ "and it cannot start with a number).\n "
1685
1685
+ "To get rid of this message, remove the sketch from\n "
1686
1686
+ "{1}" ), name , entry .getAbsolutePath ());
1687
- Base . showMessage (_ ("Ignoring sketch with bad name" ), complaining );
1687
+ showMessage (_ ("Ignoring sketch with bad name" ), complaining );
1688
1688
}
1689
1689
return false ;
1690
1690
}
@@ -1764,7 +1764,7 @@ protected void loadHardware(File folder) {
1764
1764
*/
1765
1765
@ SuppressWarnings ("serial" )
1766
1766
public void handleAbout () {
1767
- final Image image = Base . getLibImage ("about.jpg" , activeEditor );
1767
+ final Image image = getLibImage ("about.jpg" , activeEditor );
1768
1768
final Window window = new Window (activeEditor ) {
1769
1769
public void paint (Graphics g ) {
1770
1770
g .drawImage (image , 0 , 0 , null );
@@ -1775,7 +1775,7 @@ public void paint(Graphics g) {
1775
1775
1776
1776
g .setFont (new Font ("SansSerif" , Font .PLAIN , 11 ));
1777
1777
g .setColor (Color .white );
1778
- g .drawString (Base . VERSION_NAME , 50 , 30 );
1778
+ g .drawString (VERSION_NAME , 50 , 30 );
1779
1779
}
1780
1780
};
1781
1781
window .addMouseListener (new MouseAdapter () {
@@ -1876,7 +1876,7 @@ static public File getBuildFolder() {
1876
1876
if (buildFolder == null ) {
1877
1877
String buildPath = Preferences .get ("build.path" );
1878
1878
if (buildPath != null ) {
1879
- buildFolder = Base . absoluteFile (buildPath );
1879
+ buildFolder = absoluteFile (buildPath );
1880
1880
if (!buildFolder .exists ())
1881
1881
buildFolder .mkdirs ();
1882
1882
} else {
@@ -2084,7 +2084,7 @@ static protected File promptSketchbookLocation() {
2084
2084
}
2085
2085
2086
2086
String prompt = _ ("Select (or create new) folder for sketches..." );
2087
- folder = Base . selectFolder (prompt , null , null );
2087
+ folder = selectFolder (prompt , null , null );
2088
2088
if (folder == null ) {
2089
2089
System .exit (0 );
2090
2090
}
@@ -2212,18 +2212,18 @@ static public void registerWindowCloseKeys(JRootPane root,
2212
2212
2213
2213
2214
2214
static public void showReference (String filename ) {
2215
- File referenceFolder = Base . getContentFile ("reference" );
2215
+ File referenceFolder = getContentFile ("reference" );
2216
2216
File referenceFile = new File (referenceFolder , filename );
2217
2217
openURL (referenceFile .getAbsolutePath ());
2218
2218
}
2219
2219
2220
2220
static public void showGettingStarted () {
2221
2221
if (OSUtils .isMacOS ()) {
2222
- Base . showReference (_ ("Guide_MacOSX.html" ));
2222
+ showReference (_ ("Guide_MacOSX.html" ));
2223
2223
} else if (OSUtils .isWindows ()) {
2224
- Base . showReference (_ ("Guide_Windows.html" ));
2224
+ showReference (_ ("Guide_Windows.html" ));
2225
2225
} else {
2226
- Base . openURL (_ ("http://www.arduino.cc/playground/Learning/Linux" ));
2226
+ openURL (_ ("http://www.arduino.cc/playground/Learning/Linux" ));
2227
2227
}
2228
2228
}
2229
2229
0 commit comments