Skip to content

Commit

Permalink
Changing order of boards in boards menu: built-in first, boards manag…
Browse files Browse the repository at this point in the history
…er second,

sketchbook hardware folder third. Each group if sorted by alpha, case
insensitive. Fixes esp8266#2650
  • Loading branch information
Federico Fissore committed May 29, 2015
1 parent 1b7574a commit 5933a7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,15 @@ public List<TargetPackage> createTargetPackages() throws TargetPlatformException
packages.add(targetPackage);
}
}

Collections.sort(packages, new Comparator<TargetPackage>() {
@Override
public int compare(TargetPackage p1, TargetPackage p2) {
assert p1.getId() != null && p2.getId() != null;
return p1.getId().toLowerCase().compareTo(p2.getId().toLowerCase());
}
});

return packages;
}

Expand Down
4 changes: 2 additions & 2 deletions arduino-core/src/processing/app/BaseNoGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -621,10 +621,10 @@ static public void initPackages() throws Exception {
}
indexer.syncWithFilesystem(getHardwareFolder());

packages = new HashMap<String, TargetPackage>();
packages = new LinkedHashMap<String, TargetPackage>();
loadHardware(getHardwareFolder());
loadHardware(getSketchbookHardwareFolder());
loadContributedHardware(indexer);
loadHardware(getSketchbookHardwareFolder());
createToolPreferences(indexer);

librariesIndexer = new LibrariesIndexer(BaseNoGui.getSettingsFolder(), indexer);
Expand Down

0 comments on commit 5933a7e

Please sign in to comment.