1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-29 18:52:13 +01:00

Changing order of boards in boards menu: built-in first, boards manager second,

sketchbook hardware folder third. Each group if sorted by alpha, case
insensitive. Fixes #2650
This commit is contained in:
Federico Fissore 2015-05-29 14:19:15 +02:00
parent 1b7574a8b9
commit 5933a7e8d3
2 changed files with 11 additions and 2 deletions

View File

@ -327,6 +327,15 @@ public class ContributionsIndexer {
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;
}

View File

@ -621,10 +621,10 @@ public class BaseNoGui {
}
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);