diff options
author | Cristian Maglie <c.maglie@arduino.cc> | 2016-11-05 12:18:05 +0300 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2016-11-07 16:51:25 +0300 |
commit | 650840381f20166661a898e39818cee0afd41c47 (patch) | |
tree | 689044e2fbecd9066c1def9b75e32637534feed6 | |
parent | 5b4af28f4796fe8d4dcc5ccc839747ca5da120bc (diff) |
Small cleanup, no code change
-rw-r--r-- | app/src/processing/app/Base.java | 11 | ||||
-rw-r--r-- | arduino-core/src/processing/app/BaseNoGui.java | 6 |
2 files changed, 7 insertions, 10 deletions
diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 9e61c5d0d..fca172215 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -116,7 +116,7 @@ public class Base { private List<JMenuItem> programmerMenus; private PdeKeywords pdeKeywords; - private final List<JMenuItem> recentSketchesMenuItems; + private final List<JMenuItem> recentSketchesMenuItems = new LinkedList<>(); static public void main(String args[]) throws Exception { System.setProperty("awt.useSystemAAFontSettings", "on"); @@ -228,17 +228,14 @@ public class Base { public Base(String[] args) throws Exception { BaseNoGui.notifier = new GUIUserNotifier(this); - this.recentSketchesMenuItems = new LinkedList<>(); CommandlineParser parser = new CommandlineParser(args); parser.parseArgumentsPhase1(); BaseNoGui.checkInstallationFolder(); - String sketchbookPath = BaseNoGui.getSketchbookPath(); - // If no path is set, get the default sketchbook folder for this platform - if (sketchbookPath == null) { + if (BaseNoGui.getSketchbookPath() == null) { File defaultFolder = getDefaultSketchbookFolderOrPromptForIt(); if (BaseNoGui.getPortableFolder() != null) PreferencesData.set("sketchbook.path", BaseNoGui.getPortableSketchbookFolder()); @@ -258,8 +255,8 @@ public class Base { // Setup board-dependent variables. onBoardOrPortChange(); - this.pdeKeywords = new PdeKeywords(); - this.pdeKeywords.reload(); + pdeKeywords = new PdeKeywords(); + pdeKeywords.reload(); contributionInstaller = new ContributionInstaller(BaseNoGui.getPlatform(), new GPGDetachedSignatureVerifier()); libraryInstaller = new LibraryInstaller(BaseNoGui.getPlatform()); diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 38130bd0c..db6cf7037 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -833,9 +833,9 @@ public class BaseNoGui { // Scan for libraries in each library folder. // Libraries located in the latest folders on the list can override // other libraries with the same name. - BaseNoGui.librariesIndexer.setSketchbookLibrariesFolder(getSketchbookLibrariesFolder()); - BaseNoGui.librariesIndexer.setLibrariesFolders(librariesFolders); - BaseNoGui.librariesIndexer.rescanLibraries(); + librariesIndexer.setSketchbookLibrariesFolder(getSketchbookLibrariesFolder()); + librariesIndexer.setLibrariesFolders(librariesFolders); + librariesIndexer.rescanLibraries(); populateImportToLibraryTable(); } |