1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00
Commit Graph

6968 Commits

Author SHA1 Message Date
Cristian Maglie
ac6d3c1aff Core and ref-Core libraries are not handled by the library manager. 2018-05-17 09:14:25 +02:00
Cristian Maglie
926b73b538 Unified method for selection of IDE_BUNDLED libraries
Libraries installed in the sketchbook have priority over the
bundled.
2018-05-17 09:14:25 +02:00
Cristian Maglie
b03a9af19a ContributedLibraryReleases: removed getLibrary() method
this method is now useless
2018-05-17 09:14:25 +02:00
Cristian Maglie
8c6e39735d Refactored ContributedLibraryReleases
Mostly simplified and improved readability.
2018-05-17 09:14:25 +02:00
Cristian Maglie
5cc66e9715 Moved ContributedLibraryReleases in arduino-core 2018-05-17 09:14:25 +02:00
Cristian Maglie
1089378575 Preparing ContributedLibraryReleases to move in arduino-core
Removed dependency on FilteredAbstractTableModel.getLatestOf() method.
2018-05-17 09:14:25 +02:00
Cristian Maglie
d5d9b217a1 Removed unused method BaseNoGui.getUserLibs() 2018-05-17 09:14:25 +02:00
Cristian Maglie
904a898108 Fixed UpdatableLibraryPredicate 2018-05-17 09:14:25 +02:00
Cristian Maglie
62882e0a4d Fixed LibrariesIndex.getInstalled(..) method 2018-05-17 09:14:25 +02:00
Cristian Maglie
86441e4341 Added first tests for library manager engine 2018-05-17 09:14:25 +02:00
Cristian Maglie
31de5b61c1 Slightly simplified scanLibrary method 2018-05-17 09:14:25 +02:00
Cristian Maglie
2374d9d1bd Introducing UserLibraryFolder
This class allows to attach a Location property to a folder
path, this way we directly know if a library is in the sketchbook,
core, referenced-core or bundled in the IDE.

This simplify a lot of logic in the IDE.
2018-05-17 09:14:25 +02:00
Cristian Maglie
040caad124 Fixed library layout detection when adding new library 2018-05-17 09:14:25 +02:00
Cristian Maglie
e896595214 UserLibrary doesn't extend ContributedLibrary anymore
ContributedLibrary is used to decode library_index.json and it's
intended to keep data coming only from the index.

Now, when the library_index is synced with the filesystem, the
metadata about installed libraries are kept in a separate list
to not mess up with the main index.
2018-05-17 09:14:25 +02:00
Cristian Maglie
3ec6748dc4 Lib manager Predicates must act on ContributedLibraryReleases
Previously the filtering was made on ContributedLibrary, but the
objects that is actually displayed is a ContributeLibraryReleases,
so it comens natural to filter on this class of objects.

Apparently the functionality is not affected by this commit, but
there may be some side-effect that may probably fix some
visualization bug.
2018-05-17 09:14:25 +02:00
Cristian Maglie
482b905a62 Using Optional<T> semantics for 'replacedLib' in LibraryInstaller
Optional<T> helps to not forget to check about nullness where it is
needed.

This commit should be equivalent and shouln't fix any bug, BTW the
Optional<T> semantic turns out to be useful in the next commits.

Possibly all nullable values will be replaced by Optional in the
future.
2018-05-17 09:14:25 +02:00
Cristian Maglie
212825eb55 Simplified overly complex filtering of InstallerJDialog
- we ensure that there is always a filter selected, no more need
  to check for non-nullness
- the filters are always the same, no need to pass a
  Stream<Predicate<T>> around where Predicate<T> suffices
2018-05-17 09:14:25 +02:00
Cristian Maglie
f111905da6 Removed a lot of useless equals overrides.
Those introduces a very convoluted logic that is needed only in
two cases. Moreover those are better handled by directly checking
the object.
2018-05-17 09:14:25 +02:00
Cristian Maglie
cd3639a574 Print error if library.index is not parsed. Update index only after successful parsing. 2018-05-17 09:14:25 +02:00
Cristian Maglie
b832e0d8b1 Use anyMatch instead of count in ContributionSelfCheck checks 2018-05-17 09:14:25 +02:00
Cristian Maglie
d285b7fdc9 Improved VersionComparator API 2018-05-17 09:14:25 +02:00
Cristian Maglie
27b99860b4 Simplified SketchController.isReadOnly(..) method
Since the method is called everywhere with the following parameters

  isReadOnly(
    BaseNoGui.librariesIndexer.getInstalledLibraries(),
    BaseNoGui.getExamplesPath())
  )

the static calls to BaseNoGui have been inlined into isReadOnly()
removing all the duplications around.
2018-05-17 09:14:25 +02:00
Cristian Maglie
bf1b523854 Removed installedLibrariesWithDuplicates since it's no more used 2018-05-17 09:14:25 +02:00
Cristian Maglie
627d4fb536 Removed NoopPredicate 2018-05-17 09:14:25 +02:00
Cristian Maglie
8bb20e0402 Made UserLibrary.toString() more concise 2018-05-17 09:14:25 +02:00
Martino Facchin
bc19d7b57e Copy package_index_bundled to distrib hardware folder 2018-05-15 10:39:11 +02:00
Martino Facchin
8ae47f3b5d Add updated toolchain for ARM host 2018-05-10 13:02:27 +02:00
Martino Facchin
2be54da740 SaveAs should preserve the folder structure if user selected a sketch
Fixes https://github.com/arduino/Arduino/issues/6416
2018-05-10 10:54:54 +02:00
Martino Facchin
7bef3d549b [Win] Move recoverDefaultSketchbookFolder after init() stage
Solves #7097; the user will be prompted if default sketchbook folder doesn't exist.
If needed, the exception will be thrown by getDefaultSketchbookFolder() as in Linux/OSX implementations.
2018-05-10 10:54:54 +02:00
Martino Facchin
eb05bee7b0 Fix AVR GCC for Windows package name 2018-05-09 18:33:15 +02:00
Martino Facchin
b86a79ced8 Update avr core to 1.6.22 + package_index_bundled 2018-05-09 16:57:25 +02:00
Martino Facchin
5ba035ac8b Update avr toolchain 2018-05-09 16:36:08 +02:00
Martino Facchin
8bab7cead6 Download the bundled core as any other tool 2018-05-09 16:09:29 +02:00
Martino Facchin
d6b40d0218 Move AVR core to its own repo
Solves #5976; the new core's home is https://github.com/arduino/ArduinoCore-avr

Most of the history has been moved and is accessible, however the first 2 years are too much noisy (and SVN based) to be able to extract anything useful.

Please refer to Arduino main repo if you are doing any informatic archaeology :)
2018-05-09 16:09:29 +02:00
Martino Facchin
950d88dcbe Handle unsaved tab deletion correctly 2018-05-09 16:09:29 +02:00
Martino Facchin
f8540b3a59 rescan libraries when installing from zip file
Fixes https://github.com/arduino/Arduino/issues/6960
2018-05-09 16:09:29 +02:00
Matthijs Kooijman
98bd18ee8d Let serial monitor send newline by default
The serial.line_ending value was not present in the default
preferences file, so the default was implicitly 0, meaning "No line
ending". Since users often do not realize that they can even choose a
line ending, and "no line ending" is only rarely useful, it seems better
to default to sending a newline. Using both CR & NL would be more
consistent with Stream.println on the Arduino side, but just sending a
newline is probably easier to parse on the Arduino side.
2018-05-09 15:56:11 +02:00
Martino Facchin
b6280cfd65 Apply on-the-fly setFontSize to Console
Fixes #7022
2018-05-09 15:56:11 +02:00
Cristian Maglie
4aec8997e2 If theme couldn't be loaded print a message explaining why 2018-05-09 11:44:03 +02:00
Cristian Maglie
b96b2508db Fixed warnings 2018-05-09 11:43:40 +02:00
Martino Facchin
01519eba9c Move Sketchbook preparation before Theme.init()
Fixes NPE when searching for themes in portable installation
2018-05-08 16:53:55 +02:00
Martino Facchin
260e0c284c Abbreviate Theme name to max 40 characters 2018-05-08 16:53:55 +02:00
Mumfrey
794ef806f1 Support selectable, user-defined themes contained in zip files 2018-05-08 16:53:55 +02:00
Mumfrey
78ef37ef08 Support user-defined theme elements via "theme" folder in sketchbook dir 2018-05-08 16:53:54 +02:00
Cristian Maglie
2160bd3245 Removed useless entries in arduino-core/.classpath 2018-05-08 16:40:44 +02:00
Cristian Maglie
a5aea72cc6 Win: Removed JNA debug output 2018-05-03 15:50:10 +02:00
Cristian Maglie
c81de4fead Win: Removed DPI detection debug output 2018-05-03 15:50:10 +02:00
Martino Facchin
e35c67b6a9 Avoid using incomplete tmp file for board manager jsons
Fixes https://github.com/arduino/Arduino/issues/6628
2018-05-02 17:35:29 +02:00
Martino Facchin
60f267745b Add on-hover selection on Board/Library manager
User testing on skilled devs showed that "buttons appear on click" behaviour is far from being understood.
Accessibility features (like moving with Arrow keys) should be untouched.
2018-05-02 16:41:59 +02:00
Martino Facchin
a47e62627c [Lib/Board Manager] Give some padding to the dropdown lists 2018-05-02 16:41:59 +02:00