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

899 Commits

Author SHA1 Message Date
Cristian Maglie
daefdc9d7d Updated translations 2018-08-10 11:17:38 +02:00
Cristian Maglie
8fd17d44a7 Fixed error message 2018-08-10 11:05:08 +02:00
Cristian Maglie
62511c0889 Fixed error message 2018-08-10 11:01:06 +02:00
Cristian Maglie
bd770ae949 Updated translations 2018-08-10 10:56:19 +02:00
per1234
19bfd2ada9 Correct messages re: sketch/library folder name restrictions
- Specify that library name error is about folder name.
  - We would normally expect "library name" to mean the "fancy name" (as defined by the library.properties name field).
- Specify exactly which characters are allowed.
- State that spaces are prohibited in sketch folder name.
- Remove outdated message about library folders not being allowed to start with a number.
  - This restriction was removed by 4545283ae7.
- State library folder name length restriction.
- Make sketch and library messages consistent with each other.
2018-08-10 10:53:15 +02:00
Cristian Maglie
3a3bc5be84 Ignore empty "includes" field in library.properties
This allows to avoid empty include lines like:

   #include <>

for libraries declaring:

   includes=

in their library.properties file.

Fix #7854
2018-08-08 14:49:49 +02:00
Cristian Maglie
1db3aabaab Added collector to LibraryList 2018-05-27 13:38:14 +02:00
Yohsuke FURUTA
24029c5ace CLI: Add --version to CLI option (#7549)
* CLI: Add --version to CLI option

I added to get the Arduino IDE version from the command line
It will allow to check easily if the new Arduino is already installed.

This feature makes it easier to build external systems linked to specific versions of Arduino.

1. I added `--version` action, which shows version name and exit
  1. Currently, VERSION_NAME_LONG (like `1.8.5`, `1.9.0-beta`, `1.8.6 Hourly Build XXX`, etc...) is used. Because I want to know its version number and stable/beta/hourly.
  2. Finish with `0`. Because it is `SUCCESSFLLY FINISHED`.
2. Updated man page.

* Split "parse" and "action".
Move print action to probably suitable place.

This commit will fix the behavior of multiple actions about --version.

* add testcase
2018-05-22 17:46:11 +02:00
Cristian Maglie
60021c1e63 Library search now works also for headers (.h) provided by libraries
Fixes #7604
2018-05-22 16:28:52 +02:00
Cristian Maglie
d4a12205fa Highlight 'fatal' errors during build
Fix #7614
2018-05-21 17:01:16 +02:00
Cristian Maglie
901d8c77fe Fixed UpdatableLibrarieyTest 2018-05-21 12:04:01 +02:00
Cristian Maglie
8dd9a3e999 If a language resource is missing, fallback to system default 2018-05-21 11:28:36 +02:00
Cristian Maglie
a64d1cbeb1 Fixed Override warning 2018-05-21 11:28:09 +02:00
Cristian Maglie
b4efa5589b Moved cc.arduino.i18n.Language* classes in arduino-core project 2018-05-21 11:27:53 +02:00
Cristian Maglie
b70e876c0c Removed et_EE localization.
Fix #4747
2018-05-21 10:43:19 +02:00
Cristian Maglie
ada9e50b64 Updated translations 2018-05-21 10:39:59 +02:00
Martino Facchin
2d6e974b12 Removed useless classpaths from eclipse project file 2018-05-21 10:25:53 +02:00
Cristian Maglie
77ec25de61 Fixed NPE when setting Types field in core-libraries
The core libraries may come from platforms installed inside the
"sketchbook/hardware" directory. Those platforms are not indexed
and doesn't have a category field to propagate in the core-libraries.
2018-05-21 10:00:47 +02:00
Cristian Maglie
3bce82092e Command line: added more verbosity and made output coherent 2018-05-17 09:14:25 +02:00
Cristian Maglie
246cf6edd8 Added installed lib priority comparator
This clearly defines the usage priority for installed libraries.
2018-05-17 09:14:25 +02:00
Cristian Maglie
9f15b0d7ab Removed TypePredicate 2018-05-17 09:14:25 +02:00
Cristian Maglie
ac570c50bd UserLibrary: ensure that types field is always not-null 2018-05-17 09:14:25 +02:00
Cristian Maglie
20bc297151 Removed LibraryWithName predicate 2018-05-17 09:14:25 +02:00
Cristian Maglie
43c22686de Removed IsLibraryInstalledInsideCore predicate 2018-05-17 09:14:25 +02:00
Cristian Maglie
b3d01d8281 Moved install-related fields out of DownloadableContribution
Those fields have a slightly different meaning on each object that
extends DownloadableContribution and having them grouped in
DownloadableContribution only increase confusion in change of a
(very) tiny code reuse.

Moreover:

- the `readOnly` field has been renamed to `builtIn`
- predicates have been replaced by lambdas
- DownloadableContributionBuiltInAtTheBottomComparator has been replaced
  with a singleton instance
2018-05-17 09:14:25 +02:00
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
d5d9b217a1 Removed unused method BaseNoGui.getUserLibs() 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
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
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
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
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
d285b7fdc9 Improved VersionComparator API 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
8bb20e0402 Made UserLibrary.toString() more concise 2018-05-17 09:14:25 +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
Cristian Maglie
2160bd3245 Removed useless entries in arduino-core/.classpath 2018-05-08 16:40:44 +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
80915600c9 Make board disappear via ttl instead then reachability
Thanks @kurtgo for the hint
Solves #6832
2018-05-02 16:27:03 +02:00
Martino Facchin
3e50aee4cf Save file line by line taking care of OS EOL
Fixes https://github.com/arduino/Arduino/issues/6736
2018-05-02 16:24:33 +02:00
Martino Facchin
8363831dd4 fix NPE if CLI upload is used 2018-05-02 16:20:01 +02:00
Martino Facchin
52c829fb0d Wrap the discoverers into separate threads
Fixes #6350 (the regression was introduced with b2241dadf8 )
Thanks git-bisect :)
2018-05-02 16:20:01 +02:00
Martino Facchin
921dd272ad Update jackson to 2.9.5
Fixes CVE-2018-7489
2018-05-02 16:14:03 +02:00
Martino Facchin
4562b4ba44 Update jmdns to 3.5.3 2018-05-02 16:12:32 +02:00
Cristian Maglie
b70a7d088e Hi-DPI: tentative auto DPI detection for Linux
See #6472 #4376
2018-05-02 15:52:13 +02:00
Martino Facchin
c4f5cafd33 Moving a sketch to another folder should move all files
Fixes #6402
2018-05-02 15:52:13 +02:00
Martino Facchin
73f40ac32e Only rescan libraries folders when really needed
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
2018-05-02 15:52:13 +02:00
Cristian Maglie
3d3bb385ad Output column info from compiler error when available 2018-01-25 15:58:02 +01:00
Cristian Maglie
472d0b8ef6 Removed unused import 2018-01-03 14:50:55 +01:00
Cristian Maglie
676f64325f Removed debugging leftovers 2018-01-03 14:36:07 +01:00
Cristian Maglie
4b374dc16d lint: Use generic List instead of ArrayList where possible 2017-11-07 15:38:57 +01:00
Cristian Maglie
f0e5bab51c Started 1.8.6 and updated changelog 2017-10-16 13:02:46 +02:00
Cristian Maglie
81997612b2 Updated source translations
Fix #6815
2017-10-13 10:51:08 +02:00
Cristian Maglie
61c77c922a Updated translations 2017-09-28 16:22:14 +02:00
Cristian Maglie
369b23a7d2 Refactored function to get status of menus in MacOSX 2017-09-28 12:57:56 +02:00
Martino Facchin
a2b5f661b8 Fix macOS 10.13 missing menubar
The global bar is being used if locale is English and About() menu is present
2017-09-27 17:43:52 +02:00
Cristian Maglie
7c27d09c6f Added check for negative font size in preferences.
This should allow to automatically recover situations like
https://github.com/arduino/Arduino/issues/6359#issuecomment-324247440

See #6359
2017-08-28 18:01:30 +02:00
Cristian Maglie
5bbb9054d4 Starting 1.8.5 2017-08-28 13:04:57 +02:00
Cristian Maglie
5c3f474c0e Updated translations 2017-08-18 15:17:48 +02:00
Cristian Maglie
4545283ae7 Sketch names starting with a digit are now allowed
Fix #6592
2017-08-18 15:11:24 +02:00
Martino Facchin
144213fb8a Merge pull request #6388 from matthijskooijman/fix-renaming-new-files
Fix renaming of newly added files
2017-08-01 11:45:29 +02:00
per1234
7c039c484b Starting IDE 1.8.4
Fixes https://github.com/arduino/Arduino/issues/6554
2017-07-26 08:17:44 -07:00
Cristian Maglie
101677bba2 Fixed NPE introduced in 125846f5
Fix #6552
2017-07-25 23:03:25 +02:00
Cristian Maglie
cbbac9dbda code makeup: use String.isEmpty() method 2017-07-18 13:02:13 +02:00
Cristian Maglie
93fc220c55 Fix simple java error in LIBRARY_INDEX_URL_GZ assignment
Being a final variable it must be assigned only once.
2017-07-18 13:01:03 +02:00
David Gauchard
125846f55d per-board generic option in config file boards.txt for disabling control of dtr+rts from IDE, allowing board specific use of these lines for example for reset or programming mode. Currently used by esp8266/Arduino. 2017-07-18 10:59:06 +02:00
Peter Gren
c7b412ca3f Fixed ignoring of LIBRARY_INDEX_URL of system property 2017-07-18 10:47:15 +02:00
Martino Facchin
cba0435367 Add missing translation string (cached core) 2017-06-23 17:00:49 +02:00
Matthijs Kooijman
beadf8fe63 Fix renaming of newly added files
Before 72f815bcf (Refactor file adding and renaming, and save as handling)
renaming a file would first save it and then rename it. Since that
commit, renaming an unsaved, newly added file would try to rename a
non-existing file on disk, causing an error message.

This is fixed by only moving the on-disk file if it exists, otherwise
just the in-memory filename is updated and the file will be written
during the next save.

Fixes: #6265
2017-06-16 21:58:11 +02:00
Cristian Maglie
a06fa27558 Added new translations 2017-05-30 17:48:00 +02:00
Cristian Maglie
8f53860607 Updated translations 2017-05-30 17:21:53 +02:00
Cristian Maglie
d65e6ffc3d Merge pull request #6331 from cmaglie/jssc-no-unpack
Two fix for future Windows compatibility
2017-05-30 15:58:10 +02:00
Cristian Maglie
bb41ad791f Use win32 ShellExecute API to open URL with default browser 2017-05-22 12:25:58 +02:00
Cristian Maglie
229c32ccad Avoid dll unpacking within JSSC
This requires a custom build of JSSC.
https://github.com/scream3r/java-simple-serial-connector/pull/105
2017-05-18 15:36:17 +02:00
Cristian Maglie
e500c7c41f Enabling "external editor" now requires to save all sketches.
Fix #6196
2017-05-16 14:53:27 +02:00
Cristian Maglie
00c1a3b3eb Renamed editor.auto_close_braces pref and set default value 2017-04-13 11:38:23 +02:00
Michael michael.sytko
d5a73dc419 added setting to show always file extensions 2017-04-10 14:24:26 +02:00
Martino Facchin
647a1b0aaa Starting IDE 1.8.3 2017-03-23 09:26:56 +01:00
Cristian Maglie
acf17ec305 Updates to translations 2017-03-22 13:27:36 +01:00
Cristian Maglie
674419a464 Fixed a bunch of trivial javac warnings 2017-03-22 12:12:46 +01:00
Cristian Maglie
b4a1a03eb5 Updated translations resources 2017-03-21 12:47:10 +01:00
Cristian Maglie
b81059f616 Updates to translations 2017-03-21 11:40:53 +01:00
Martino Facchin
5b6adec95f add preference checkbox for core cache 2017-03-20 17:31:38 +01:00
Martino Facchin
14b3f9b1d6 Merge pull request #6041 from delftswa2017/bug/data-folder
Fix "save as" operation for the data folder of a sketch
2017-03-16 09:46:23 +01:00
tomneutens
938df21778 Added a CompilerProgressListenerList to the EditorStatus class so you can add a listener for compiler progress from an external tool. To enable this the build method in the compiler class had to be changed 2017-03-15 19:32:53 +02:00
jeroenoverman
7714a41c0c Fix copy data folder when performing save as operation
Changed the location where the variable `folder` gets updated. The
function `getDataFolder()` uses this variable to return the data folder.
It was looking for the data folder of the original sketch in the folder
of the new created sketch.
Furthermore the data folder will now be created if it does not exist yet
in the new sketch before copying the files of the original sketch.
2017-03-07 17:14:00 +01:00
Cristian Maglie
241df10c85 Merge branch 'handle_UTF-8_serial' of https://github.com/aknrdureegaesr/Arduino 2017-02-20 16:12:50 +01:00
Cristian Maglie
0b297d2906 Fixed fields hidden by local variable warnings 2017-02-20 15:22:27 +01:00
Martino Facchin
e9e24bd369 Merge pull request #5879 from facchinm/better-mdns
Update jmdns to 3.5.1
2017-02-10 18:36:14 +01:00
Andreas Krüger
ba302ee9c8
Properly decode UTF-8 characters comming in from serial one byte at a time.
This fixes #2430.
2017-02-10 01:39:33 +01:00
Cristian Maglie
2048ae264b Small makeup for ContributedLibrary.equals() 2017-01-25 16:28:54 +01:00
Cristian Maglie
ff5b9f6660 Consider sketchbook and bundled libraries folders only if they exists 2017-01-25 16:24:35 +01:00
Cristian Maglie
a044f59634 Allow empty bundle hardware folder 2017-01-25 16:24:35 +01:00
Martino Facchin
b2241dadf8 Greatly simplify Network discovery code
use jmmdns to simplyfy the code and automatically take care of interfaces switching
2017-01-23 16:09:27 +01:00
Martino Facchin
44c0c7300e Merge pull request #5444 from kevans91/freebsd-platform-tag
Add FreeBSD Platform Tag -- supports x86_64-freebsd, arm*-freebsd, an…
2017-01-20 17:49:27 +01:00
Martino Facchin
0c8aebd6e8 Port fixes for upstream jmdns 2017-01-19 17:02:50 +01:00
Martino Facchin
0df438b817 Update jmdns to 3.5.1 2017-01-19 11:47:53 +01:00
Martino Facchin
6fc0379298 Starting IDE 1.8.2 2017-01-17 12:11:04 +01:00
Cristian Maglie
e00e7bc427 Updated translations 2017-01-09 12:20:07 +01:00
Martino Facchin
548320f998 Fix transiflex scripts to explicitly require python2 2017-01-04 16:31:14 +01:00
Martino Facchin
35ee2499aa Readd translatable strings
Fixes #5757
2017-01-04 16:31:14 +01:00
Kyle Evans
ba42280fba Simply arch matching 2016-12-28 23:37:10 -06:00
Cristian Maglie
da97506adf Started IDE 1.8.1 2016-12-24 00:14:33 +01:00
Martino Facchin
d115f44a31 Update IDE version to 1.8.0 2016-12-21 16:12:44 +01:00
Martino Facchin
e9709689de Add extra field to serial discovery targeting Tian board 2016-12-16 10:59:00 +01:00
Martino Facchin
8098196083 Kill programmer if upload takes more than 5 minutes
Fixes #5672
2016-12-15 18:57:21 +01:00
Cristian Maglie
bd4c79fbac Updated translations 2016-12-15 17:36:32 +01:00
Martino Facchin
6dacb6b0bf Clear Modified flag on Save As...
Fixes #5550 (in the proper way this time)
2016-12-12 14:14:36 +01:00
Martino Facchin
a93b45d9c8 Merge pull request #5573 from facchinm/fix_symlink_5478
Fix symlinks being replaced with files on save
2016-12-07 13:17:28 +01:00
Martino Facchin
1a97ec4481 Remove sketch size calculation from Java IDE
It is now performed by arduino-builder (>= 1.3.22)
2016-11-28 15:09:46 +01:00
Cristian Maglie
39c3e8bb8b Merge branch 'x11-fix' 2016-11-25 15:12:05 +01:00
Cristian Maglie
c363777f06 Reduce verbosity during downloads in text-only mode 2016-11-25 15:10:38 +01:00
Cristian Maglie
8eae64181e Removed old prototype code from #2328 that is now in Base 2016-11-25 15:10:38 +01:00
Martino Facchin
2d1f49a077 Fix symlinks being replaced with files on save
Fixes #5478

Backported from Processing 0abee5af6a/app/src/processing/app/Util.java (L174)
2016-11-24 09:58:27 +01:00
Martino Facchin
c209e33e97 Starting version 1.6.14 2016-11-23 10:48:13 +01:00
Cristian Maglie
de65c3d89f Updated translations 2016-11-21 18:14:40 +01:00
Cristian Maglie
954941c0aa Updated string 2016-11-21 18:14:38 +01:00
Cristian Maglie
27d1b8d9a1 Merge branch 'windows-dpi-awareness' 2016-11-21 12:43:01 +01:00
Cristian Maglie
5b690b9b9e Win32: use legacy SHGetFolderPath if SHGetKnownFolderPath is not available
This ensure windows XP compatibility
2016-11-21 12:42:58 +01:00
Cristian Maglie
1f1092fb3a Removed debug messages in 39577072 2016-11-21 11:50:24 +01:00
Cristian Maglie
3957707218 Use Win10 API SetThreadDpiAwarenessContext to force DPI Awareness
This commit contains debug messages used for testing purposes.
2016-11-10 16:14:25 +02:00
Cristian Maglie
41092be596 Merge branch 'editor-refactor-fixup' 2016-11-09 14:25:45 +01:00
Cristian Maglie
650840381f Small cleanup, no code change 2016-11-07 14:51:25 +01:00
Cristian Maglie
5b4af28f47 Removed dead code 2016-11-07 14:47:33 +01:00
Cristian Maglie
5244daa5d1 Use the same Comparator to sort EditorTab and SketchFile 2016-11-07 12:13:30 +01:00
Cristian Maglie
c35469ea81 Updated translations strings 2016-11-07 10:48:18 +01:00
Cristian Maglie
8c5b064956 Added error message if a referenced core is not found 2016-11-07 10:48:04 +01:00
Cristian Maglie
03225e787f Windows: Autodetection of display resolution 2016-11-04 10:23:49 +02:00
Cristian Maglie
d63162b5a1 Added Platform.getSystemDPI() API 2016-11-04 10:23:48 +02:00
Cristian Maglie
af70053218 Improved Plaftorm.openUrl(..) for Windows
If a local file is being opened, now the function tries to convert
the path into a URI. This seems to be a more reliable way to open file
on Windows 10 that has a more strict permission policy on cmd.exe.
2016-11-03 19:37:52 +02:00
Cristian Maglie
21ff728c59 Merge remote-tracking branch 'cmaglie/fix-win-paths' 2016-11-03 12:10:24 +01:00
Martino Facchin
12eb09f0b9 Fix NPE if referred core is nonexistent
Fixes #5502
2016-10-27 12:46:44 +02:00
Cristian Maglie
3af99c0847 Use Documents/ArduinoData when running as a Windows UWP
LocalAppData is restricted for Windows Apps, so we are forced to use
a document folder.
2016-10-19 16:28:21 +02:00
Cristian Maglie
cb50ebc9c1 Slightly simplified argument passing to arduino-builder 2016-10-19 16:28:21 +02:00
Cristian Maglie
2856600463 Windows: Use Shell32 utility to determine known paths 2016-10-19 16:28:21 +02:00
Cristian Maglie
cbf3cdcfbb Added Win32KnownFolders class 2016-10-19 16:28:21 +02:00
Cristian Maglie
7d9ec39ca9 Update jna.jar to 4.2.2 2016-10-19 16:28:20 +02:00
Cristian Maglie
31a9029c1d Updated i18n strings 2016-10-05 15:55:32 +02:00
Cristian Maglie
7883835b84 If an archive is corrupted (CRC error) retry the download
Previously the CRC error was quite annoying to recover because
the user needed to manually delete the corrupted file from the
staging folder (without knowing the exact path of the file to
remove).

Now the IDE tries autonomously to resolve the situation by
removing the file and downloading it again.

Fixes #5394 #4303
2016-10-05 12:56:40 +02:00
Kyle Evans
481fd94ac6 Add FreeBSD Platform Tag -- supports x86_64-freebsd, arm*-freebsd, and i386-freebsd with optional extension for tagging specific release (e.g. freebsd11) 2016-10-03 23:37:27 -05:00
Cristian Maglie
653a05273d Check sanitaryName only on basename without extension
This regression originates from:

8725bb1e Clean up sketch loading

before this commit the sketch name sanitization was made on the sketch
name without the extension.
After 8725bb1e instead the name sanitization is made on the filename, so
including the ".ino" extension.

This lead to a weird corner case, caused by the limit of 63 characters
on the sketch name: before 8725bb1e it would be possible to save a sketch
with a name of exactly 63 characters, but after 8725bb1e this sketch will
suddenly becomes invalid becuase the 63 chars name + extension would exceed
the 63 characters limit.

This commit fix this regression.

Fix #5431
2016-10-03 17:00:08 +02:00
Martino Facchin
0a8e7a14f1 Make sure DiscoveryManager is not null when calling it
Solves #5413
2016-10-03 11:07:10 +02:00
Cristian Maglie
ec2e9a642a Added all missing @Override annotations 2016-09-29 20:15:57 +02:00
Cristian Maglie
46dfd7603c Removed warning about accessing a non-accessible member of an enclosing type 2016-09-29 20:15:56 +02:00
Cristian Maglie
bd7e76533a Removed redundant type specifiers for generics 2016-09-29 20:15:56 +02:00
Cristian Maglie
72a1d928b4 Removed useless cast 2016-09-29 20:15:56 +02:00
Cristian Maglie
4d579f7652 Removed extra semicolon 2016-09-29 20:15:56 +02:00
Cristian Maglie
53e456936d Silenced lint warnings in ContributedLibrary
Comparing strings with `==` operator triggers a lint4j warning.
This refactoring avoids the use of `thisVersion == otherVersion`.
2016-09-29 20:15:55 +02:00
Cristian Maglie
5c097c03c5 Fixed regression: trivial error on String comparison
Fix #5423

The regression has been introduced in:
72f815b Refactor file adding and renaming, and save as handling
2016-09-29 18:21:09 +02:00
Martino Facchin
69fd6debbd Starting version 1.6.13 2016-09-22 12:42:35 +02:00
Cristian Maglie
e1c2d0dfcd Updated translations from transifex 2016-09-21 10:07:01 +02:00
Cristian Maglie
0ddc8e6300 Fixed wrong string check 2016-08-31 19:12:09 +02:00
Cristian Maglie
7d27c43ff2 Launch DiscoveryManager after populating indexes 2016-08-31 19:11:24 +02:00
Martino Facchin
84ede60df8 Start board discovery after loading all platforms 2016-08-30 16:22:40 +02:00
Martino Facchin
e3177a5ed8 Starting version 1.6.12 2016-08-26 18:27:00 +02:00
Martino Facchin
29e79c8157 update API to v1 2016-08-26 16:42:44 +02:00
Martino Facchin
efc07a1c0e Add Cloud API integration
This method discovers if a connected board needs an additional core and helps the user downloading it via BoardManager
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
59b70c8373 Randomize the the build path name
Previously, this used a hash of the sketch filename, so the same build
path would be generated for the same sketch between multiple
compilations. Now that the build path is stored, this requirement has
disappeared, so a random filename can be generated again. While here,
this commit also changes the prefix from "build" to "arduino_build_",
which makes it a bit more clear what the directory's purpose is.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
4f0af2af57 Store the build path used in Sketch
Previously, everywhere where it was needed, the path was requested from
BaseNoGui. Because the path is based on a hash of the sketch filename,
every caller would get the same path for the same sketch.

However, it makes more sense to store the path used for a given sketch
inside the Sketch object. This prevents having to pass around or
regenerate the build path everywhere, and no longer requires the build
path to be deterministic (though it still is in this commit).

This allows removing some methods and constructors of which two versions
were available - one with a build path argument and one without.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
c4e77a7c3c Let SketchFile figure out if it is primary by itself
Previously, the caller of the constructor did this, but now that
SketchFile keeps a reference to its containing sketch, it can figure it
out itself.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
1d15c434dc Let SketchFile.delete() call Sketch.removeFile()
Previously, callers of `SketchFile.delete()` would also call
`Sketch.removeFile()`, but letting SketchFile handle this is more
robust.

This is possible now that SketchFile keeps a reference to Sketch and
makes updating the Sketch file list less fragile.

Eventually this might be further decoupled by letting SketchFile
broadcast a "deleted" event instead.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
aae0bc4c47 Rename SketchFile.deleteFile() to delete()
The extra "File" in the name was a bit redundant, and this is more
consistent with `Sketch.delete()`.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
ccec28ea45 Move sketch deletion from SketchController into Sketch
This isn't much code, but it makes deletion more consistent with
renaming and saving with the SketchController handling the UI part and
Sketch actually doing the delete.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
85d48394a4 Merge Sketch.renameFileTo() into SketchFile.renameTo()
Now that SketchFile keeps a reference to its Sketch,
`SketchFile.renameTo()` can call `Sketch.checkNewFilename()`, so there
is no need for the renaming itself to go through Sketch.

This changes the parameter for `SketchFile.renameTo()` from File to
String, to enforce that only the filename is changed, not the directory
name.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
74e5228a0f Let SketchFile store a reference to the Sketch it belongs to
This allows simplifying some other things later.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
c0f41cae5d Remove Base.removeDir() and Base.removeDescendants()
These methods shouldn't really be in Base (or BaseNoGui, which did the
actual work), especially since there is already a
`FileUtils.recursiveDelete()` which just does the same thing. This
commit removes the code from Base and BaseNoGui and instead uses the
method from FileUtils.

There is one difference between these methods: the Base methods did not
delete files if the "compiler.save_build_files" preference was set.
However, the Base methods were only used when deleting a sketch, or
deleting an existing folder before overwriting it on save as, so this
preference didn't actually do what it was supposed to anyway, so
dropping it shouldn't be a problem.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
72f815bcf9 Refactor file adding and renaming, and save as handling
This commits replaces a significant part of the code handling these
features. A lot of responsibilities are moved from SketchController to
Sketch, though the code involved is rewritten mostly.

Most of the handling now happens inside Sketch, including various checks
against the new filename. Basically SketchController processes the user
input to decide what needs to be done, and Sketch checks if it can be
done and does it.

If problems occur, an IOException is thrown, using a translated error
message that is shown by SketchController as-is. This might not be the
best way to transfer error messages (regular IOExceptions might contain
less-friendly messages), so this might need further improvement later.

In addition to moving around code and responsibilities, this code also
changes behaviour in some places:
 - Because Sketch and SketchFile are now in control of renames and
   saves, they can update their internal state after a rename. This
   removes the need for reloading the entire sketch after a rename or
   save as and allows `Editor.handleOpenUnchecked()` to be removed.
 - When renaming the entire sketch, all files used to be saved before
   renaming, since the sketch would be re-opened after renaming. Since
   the re-opening no longer happens, there is no longer a need to save
   the sketch, so any unsaved changes remain unsaved in the editor after
   renaming the sketch.
 - When renaming or adding new files, duplicate filenames are detected.
   Initially, this happened case sensitively, but it was later changed to
   use case insensitive matching to prevent problems on Windows (where
   filenames cannot differ in just case). To prevent complexity, this
   did not distinguish between systems. In commit 5fbf9621f6 (Sketch
   rename: allowig a case change rename if NOT on windows), the
   intention was to only do case insensitive checking on Windows, but it
   effectively disabled all checking on other systems, making the check
   not catch duplicate filenames at all.

   With this commit, all these checks are done using `File.equals()`
   instead of comparing strings, which is already aware of the case
   sensitivity of the platform and should act accordingly.
 - Some error messages were changed.
 - When adding a file, an empty file is not created directly, but only a
   SketchFile and EditorTab is added. When the sketch is saved, the file
   is created.
 - When importing a file that already exists (thus overwriting it),
   instead of replacing the SketchFile instance, this just lets the
   EditorTab reload its contents. This was broken since the introduction
   of EditorTab. The file would be replaced, but not this was not
   reflected in the editor, which is now fixed. This change allows
   `Sketch.replaceFile()` to be removed.
 - When importing a file that does not exist yet (thus adding it), a tab
   is now also added for it (in addition to a SketchFile). This was
   broken since the introduction of EditorTab, and would result in the
   file being added, but not shown in the editor.

This commit adds a `Sketch.renameFileTo()` method, to rename a single
file within the sketch. It would be better to integrate its contents
into `Sketch.renameTo()`, but that does not have access to the `Sketch`
instance it is contained in. This will be changed in a future commit.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
9705e1e734 Use File.getParentFile() in Sketch constructor
No need to call the File constructor ourselves, if
`File.getParentFile()` can just do that for us.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
57a237752d Clean up pde to ino renaming
This makes a few related changes:
 - `FileUtils.replaceExtension()` is introduced to handle replacing the
   .pde extension with .ino.
 - Instead of iterating .pde files on disk, this iterates SketchFiles in
   memory, saving another lookup from filename -> SketchFile later.
 - `SketchController.renameCodeToInoExtension()` is removed. Now it no
   longer needs to look up the SketchFile and FileUtils handles the
   extension replacement, this method did not have any reason to exist
   anymore.
 - Instead of hardcoding the .pde extension, a new
   Sketch.OLD_SKETCH_EXTENSIONS constant is introduced.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
0c62ac8985 Do not store the sketch name in Sketch
Sketch already stores the sketch folder, and the sketch name should be
identical to the folder name. In the case where the filename passed to
the sketch constructor is not the primary .ino file (named after the
sketch), this will slightly change behaviour. However, the calling code
should prevent this from happening, and with the old code, some internal
assumptions were probably violated, so this changes makes handling this
situation a bit more robust.

Since the actual filename passed to Sketch is no longer used, it is no
longer required to pass the name of the primary .ino file. At some
point, the constructor should probably be changed to accept a folder
name instead of a filename, but that would require a lot of changes
to trace this back through the code, so this is something for later.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
7a73d0b3db Change Compiler.pathToSketch from String to File
Keeping filenames as File objects for as long as possible is generally a
good idea and this removes a dependency on `Sketch.getMainFilePath()`,
so it can be removed later.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
959fba7865 Let Sketch.getPrimaryFile return a SketchFile
Previously, it returned a File object, which the Sketch separately
stored from the primary SketchFile. By letting it just return the
SketchFile, and let callers query that for the filename, Sketch does not
need to store the File object itself and there is less chance of info
getting out of sync.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
86d20b8726 Do not store the "data" folder in Sketch
Instead, just the File object when requested. It is not used during
normal operation (just when adding files, or using save as), so no point
in already creating the object in the constructor.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
8e0d007ce2 Rename SketchCode to SketchFile
That name more accurately reflects its purpose: It represents a single
file within a sketch. This just updates the class name and variable
names referring to these objects and some comments, so no behaviour
should change.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
dfa60dacc1 Store a SketchCode instance in RunnerException
Previously, the index of the SketchCode instance in the list kept by
Sketch was kept, which isn't really robust.

With this change, Sketch.indexOfCode is no longer needed and is removed.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
a07a9ff895 Move SketchController.prepareDataFolder() to Sketch 2016-08-26 16:42:44 +02:00
Matthijs Kooijman
a4e2e80c1c Let importLibrary use Sketch.SKETCH_EXTENSIONS
For determining if the current file was a sketch file, it previously
(indirectly) used a hardcoded "ino" comparison. Now, it uses
`SKETCH_EXTENSIONS` so it also applies to .pde files and the hardcoded
"ino" (and the methods leading up to it) can be removed.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
5e68b66c5e Clean up SketchController.nameCode a bit
This lets it use FileUtils.splitFilename and reference Sketch.EXTENSIONS
and the new Sketch.DEFAULT_SKETCH_EXTENSION directly, allowing to remove
a few helper functions.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
d70900e5ad Let Sketch.getPrettyName() hide extension for .ino and .pde only
Before, `getPrettyName()` would return the extension-less name for all
files. There were a lot of places that checked for .ino and/or .pde
files and and called `getPrettyName()` for those, and `getFileName()`
for others. By moving this check into `getPrettyName()`, all those
callers become more simple, and more consistent (there were 5 different
checks to basically achieve the same thing).

There are small changes in behaviour, where .pde is now also hidden but
was not before. Also, the print header now shows extensions for other
files, which makes it more consistent with the tab names. For cases
where the old behaviour was still required, `Sketch.getBaseName()` was
added.

At the same time, the actual handling of the filenames is simplified by
using methods from FileUtils.

With this change `Sketch.getFileNameWithExtensionIfNotIno()` and
`SketchController.getHiddenExtensions()` are no longer needed and are
removed.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
dd5c1787fd Move isModified() from SketchController to Sketch
Also, update any code that uses it, removing the dependency on
SketchController entirely if possible.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
629953e20d Rename Sketch and SketchData classes
Sketch is now called SketchController, since it didn't really represent
a sketch, but just handled the GUI-related stuff for a given sketch
(note that it is not strictly a controller in the MVC-sense, but it does
have a similar function). SketchData more accurately represented the
actual sketch, so it is now called Sketch. Below, the new names are
used.

Editor now keeps both a current Sketch and SketchController object, and
the Sketch object is created by Editor and passed to SketchController,
instead passing a File and letting SketchController create the Sketch.
Wherever possible, code now uses the Sketch directly (or indirectly,
through the new `SketchController.getSketch()`) and the accessors in
SketchController that merely forwarded to Sketch have been removed.
There are few things that now live in SketchController but should be
moved to Sketch (`isModified()`, `isUntitled()`), so some of the code
still has a dependency on SketchController that should be removed later.

This commit mostly renames classes, methods and variables, it should not
change the behaviour in any way.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
f3d8ba219f Remove support for a "code" folder in sketches
When adding a file to a sketch (using drag and drop, or the Sketch ->
Add file... menu item), .o, .a and .so files would be saved into a
"code" subdirectory of the sketch. This seems to be a remnant of
processing, where also .dll and .jar files could be added to a sketch to
be used. In the Arduino IDE, these code files serve no special purpose,
and are not treated specially, so it makes no sense to keep this code
around.

One implication of this is that when "save as" is used, a "code"
subdirectory is no longer copied, which might affect people using this
"code" subdirectory for other purposes.

Similarly, there is support for a "data" subdirectory, in which all
other files (that are not sketch source files) are stored, and which is
also copied on "save as". Support for this folder is kept intact, since
this appears occasionally used (the ESP8266 project uses it to store and
upload additional data files, for example).

This change was discussed on the mailing list in the "Anyone using
"data" and "code" subdirectories in sketches?" thread:
https://groups.google.com/a/arduino.cc/forum/#!msg/developers/zPlraPq55ho/ejrLqITnAgAJ
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
31284feb9b Merge SketchData.sortCodes() into addCode()
By now, all calls to `addCode()` were followed by a call to
`sortCodes()`, and it seems like a task for SketchData to keep its list
sorted. Previously, this separation made some sense, since `addCode()`
was also used while loading a sketch, and you would only want to sort
once. Now, sketch loading uses a SortedSet, so this is no longer a
requirement.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
f7fdd08695 Do not show invalid sketch filename warnings on reload
With this commit, any warnings about invalid sketch filenames are not
shown when the sketch is reloaded. This reloading happens whenever the
IDE window is focused, so re-logging warnings all the time isn't really
helpful, so this hides them.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
8725bb1ec4 Clean up sketch loading
Previously, the Sketch constructor called its `load()` function, which
called the `SketchData.load()` function to load files and then
`Editor.sketchLoaded()` to initialize the GUI with the loaded files.
When external editing was enabled, `Sketch.load()` was called again
when activating the Arduino app, to reload the entire sketch.

With this commit, the `Sketch.load()` function is removed, and
`SketchData.load()` is called from the SketchData constructor. Instead
of Sketch calling `Editor.sketchLoaded()`, that method is renamed
to `createTabs()` and called by `Editor.HandleOpenInternal()` directly
after creating the Sketch object.

Handling of external editor mode has also changed. When the Arduino
application is activated, instead of fully reloading the sketch (through
the now-absent `Sketch.load()` method), the new `SketchData.reload()`
method is called to reload the list of files in the sketch. If it
changed, all tabs are re-created. If not, only the current tab is
reloaded. When the user switches from one tab to another, that tab is
also reloaded. This ensures that the visible  tab is always up-to-date,
without needlessly reloading all tabs all the time. When external
editing mode is enabled or disabled, all tabs are reloaded too, to make
sure they are up-to-date.

When re-creating all tabs, no attempt is made to preserve the currently
selected tab. Since adding or removing files happens rarely, this should
not be a problem. When files are changed, the currently selected tab is
implicitly preserved (because the tab is reloaded, not recreated). The
caret (and thus scroll) position is preserved by temporarily changing
the caret update policy, so the caret does not move while the text is
swapped out. This happens in `EditorTab.setText()` now, so other callers
can also profit from it.

To support checking for a changed list of files in
`SketchData.reload()`, a `SketchCode.equals()` method is added, that
just checks if the filenames are equal. Additionally, the loading of the
file list for a sketch has now moved from `SketchData.load()` to
`SketchData.listSketchFiles()`, so `reload()` can also use it. At the
same time, this loading is greatly simplified by using a sorted Set and
`FileUtils.listFiles()`.

In external editor mode, to ensure that during compilation the version
from disk is always used instead of the in-memory version, EditorTab
detaches itself from its SketchCode, so SketchCode has no access to the
(possibly outdated) in-memory contents of the file.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
055cfc8df0 Simplify sorting in SketchData
Instead of manually sorting the primary file at the start, and fiddling
to keep it there during resorting, this just modifies the sorting
comparator used to sort any primary files at the start. This is slightly
more generic than needed, also supporting multiple primary files, to at
least not break the Comparator preconditions when for some reason there
are multiple primary files.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
052764fd58 Simplify SketchData.removeCode() and indexOfCode()
These used to iterate over the list of SketchCodes to find the right
one, and if so, let the List do the same again to remove it or find the
index. This can be simplified to just let list take care of things
instead.

Technically, there is a small difference, since `List.remove()`  and
`List.indexOf()` will check using `equals()`, while the original code
used `==`, but these should be effectively the same here. Also, the
original code first used `==` to see if the object was present and then
let List find it again using `equals()`, so that was a bit inconsistent
anyway.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
6715f41c0e Let SketchCode track if it is the primary file
This makes checking for the primary file easier, without having to know
the index of a file in the list of tabs, or relying on the fact that the
primary file is always first (it still is, though).

This changes some places in Sketch to use the new
`SketchCode.isPrimary()` method, but there probably are a lot more
places in the code that could be start to use it as well.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
ab14c63f58 Remove SketchData.setName()
It was not used, and since it only updated the `name` attribute, but not
the corresponding `file` attribute, nor actually handled renaming actual
files, having this method around would actually be harmful, so just drop
it.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
6c2a94ecc5 Remove SketchCodeDocument
This class served no purpose anymore, so it can be removed. The
`SketchCode.getMetadata()` and `setMetaData()` methods only served to
keep track of a SketchCodeDocument instance (and were no longer used),
so these are removed too, just like some SketchCode constructors dealing
with this metadata object.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
ca573351bb Do not store file contents in SketchCode
Now that each file in the sketch has its own text area in the GUI, it is
no longer needed to store the (possibly modified) contents of each file
inside SketchCode. Keeping the contents in the text area is sufficient.
Doing so allows removing the code that dealt with copying contents from
the text area into the SketchCode instance at the right time, which was
fragile and messy.

However, when compiling a sketch, the current (modified) file contents
still should be used. To allow this, the TextStorage interface is
introduced. This is a simple interface implemented by EditorTab, that
allows the SketchCode class to query the GUI for the current contents.
By using an interface, there is no direct dependency on the GUI code. If
no TextStorage instance is attached to a SketchCode, it will just assume
that the contents are always unmodified and the contents from the file
will be used during compilation.

When not using the GUI (e.g. just compiling something from the
commandline), there is no need to load the file contents from disk at
all, the filenames just have to be passed to arduino-builder and the
compiler. So, the SketchCode constructor no longer calls its `load()`
function, leaving this to the GUI code to call when appropriate. This
also modifies the `SketchCode.load()` function to return the loaded
text, instead of storing it internally.

To still support adding new files to a sketch (whose file does not
exist on disk yet), the EditorTab constructor now allows an initial
contents to be passed in, to be used instead of loading from disk. Only
the empty string is passed for new files now, but this could also be
used for the bare minimum contents of a new sketch later (which is now
down by creating a .ino file in a temporary directory).

Another side effect of this change is that all changes to the contents
now happen through the text area, which keeps track of modifications
already. This allows removing all manual calls to `Sketch.setModified()`
(even more, the entire function is removed, making `Sketch.isModified()`
always check the modification status of the contained files).
2016-08-26 16:42:44 +02:00
Matthijs Kooijman
8f1ae9ba0b Remove SketchCode::getLineCount()
It was not used anymore, and removing it makes subsequent refactoring
easier.
2016-08-26 16:42:44 +02:00
Cristian Maglie
e0ea137737 Imported new translations 2016-08-17 12:37:19 +02:00
Cristian Maglie
4c6d2f4a82 Added new languages ach, kk and te 2016-08-16 13:16:38 +02:00
Cristian Maglie
aea77c889d Fixed some simple warnings 2016-08-16 12:52:24 +02:00
Cristian Maglie
6ac028244e Updated translations 2016-08-16 12:51:44 +02:00
Cristian Maglie
49b98959c5 Correctly handle "-snapshot" and "+build" in semantic versioning
This fix a regression introduced in:

048a8a61 (VersionHelper now correctly strip snapshot info)

actually neither 048a8a61 nor the version before are correct becuase:

048a8a61 - strips all the extra `-snapshot` and `+build`
previous - doesn't handle the case `x.y-snapshot`

Now both are handled correctly and a test has been added to verify this.

To be completely semver compliant we should deny versions in the
format `x.y`, but this will break all legacy version that have been
published until now, so this changed should be postponed for the next
major release of the IDE.

Fix #5251
2016-08-16 11:00:35 +02:00
Cristian Maglie
d5dc479e6b library_index.json is no more bundled.
There is no reason to bundle this file.

If the index file is not available an empty index is
returned by the parser.

Fix #5143
(together with e80c08: Use a specific hardware/package_index_bundled.json)
2016-08-12 17:20:03 +02:00
Cristian Maglie
b695e7ff1e Do not fail if a package_index.json is not present
Since we are not bundling a package_index.json anymore, there is no
need for the timestamp check with the existing package_index.json.
2016-08-12 10:27:35 +02:00
Cristian Maglie
e731fe026f Boards Manager now install tools even if they are available in the IDE bundle
Previously if a 3rd party core would require a tool already bundled
in the IDE then boards manager skipped the installation of that tool.
This is could lead to missing tools if the IDE is upgraded and the
bundled tools may change.

This patch fixes the bug by always installing tools when needed, even
if they are already bundled.
2016-08-11 17:29:13 +02:00
Cristian Maglie
d8470e59f4 Mark built-in tools as readonly and do not remove them when uninstalling
This covers a very convoluted use-case that may be reproduce this way:

1. Using an previous version of the IDE, a new AVR core is installed
   using the board manager.
2. The IDE is then updated so the core installed in 1. is now also the
   bundled one
3. The AVR core installed 1. is now removed using the board manager
4. The board manager will uninstall the (presumably) no longer used tools,
   from the built-in folder leaving, in fact, the IDE without the
   bundled tools that are supposed to be read-only.

This commit fix this bug by actually making the built-in tool read-only
2016-08-11 14:21:54 +02:00
Cristian Maglie
b1f9164c4c Slightly refactored ContributionsIndexer.syncBuiltInHardware()
This is just a small rewrite of the function in a more clear way,
no change in behavior.
2016-08-11 13:33:08 +02:00
Cristian Maglie
e80c085996 Use a specific hardware/package_index_bundled.json. AVR core version to 1.6.13
Previously, during the build, the full package_index.json was downloaded
and distributed with the Arduino IDE.
This lead to a situation where it was difficult to test new AVR cores
before publishing them to the public package_index.json.

Now the bundled AVR core is specificed in the file:
`hardware/package_index_bundled.json`
this index is loaded from the IDE at startup and the package_index.json
is overlayed on it.

This should also solve part of #5143 (Repeatable builds and snapshots of
package/library indexes)
2016-08-11 11:02:03 +02:00
Cristian Maglie
7008f6c57c ContributionsIndexer now has bundled hardware path as a field 2016-08-11 10:57:05 +02:00
Cristian Maglie
048a8a61d6 VersionHelper now correctly strip snapshot info 2016-08-05 18:09:42 +02:00
Cristian Maglie
e0b2cd0ffe Handle invalid versions without NullPointerExceptions 2016-08-05 18:09:42 +02:00
Cristian Maglie
701f4a23df Update revision log and bumped IDE version to 1.6.11 2016-08-05 10:58:08 +02:00
Cristian Maglie
f19bf5cf4c Use plain exec methods on arduino-builder invocation
ApacheCommons do some command-line tweaking that doesnt fit well
with argument passing to arduino-builder, in particular for -prefs
arguments containing spaces.
2016-08-05 10:19:07 +02:00
Cristian Maglie
b4ada94e44 Do not bail out if a required tool is not found
Previously a NullPointer exception was thrown.
Now the build go on and fails when the recipe cannot be replaced
the correct tool path, that is a much more informative error.
2016-08-03 18:51:08 +02:00
Cristian Maglie
723393227c Require tools from referenced core platform if used 2016-08-02 15:16:00 +02:00
Cristian Maglie
4f1b584e71 Slightly refactored tool resolution
This helps the understanding of next commits
2016-08-02 15:15:59 +02:00
Cristian Maglie
3b57462281 Use latest tools version for generic tool.paths properties 2016-08-02 15:15:59 +02:00
Martino Facchin
6f24fa6cec Pass runtime tools to arduino-builder 2016-08-02 15:15:59 +02:00
Cristian Maglie
fa0678f5b7 added 'runtime.tools.packager-name-version.path' property in the global properties map 2016-08-02 12:13:31 +02:00
Cristian Maglie
2c6f6e76c4 Boards tools are resolved using informations from package_index.json 2016-08-02 12:12:00 +02:00
Cristian Maglie
8efed7f2d2 Add reference to packager in tools 2016-08-02 10:45:48 +02:00
Cristian Maglie
44b748af7b Updated translations strings 2016-07-25 16:32:02 +02:00
Cristian Maglie
0ebd416912 Fixed wrong translation 2016-07-25 15:36:05 +02:00
Cristian Maglie
8320479bb0 Updated translations 2016-07-25 13:38:30 +02:00
Sandeep Mistry
1a6be715ab Merge pull request #4794 from facchinm/upload_fail_handling
Handling gracefully upload failure
2016-07-20 10:18:57 -04:00
Sandeep Mistry
afe204f97f Merge pull request #4828 from facchinm/issue_4762
Filter examples based on contributed libraries by architecture
2016-07-19 10:00:18 -04:00
Martino Facchin
830fe765b8 Refresh serial port list after loading contributed packages
Soves nameless boards if contributed cores loading is slow
2016-07-13 18:42:31 +02:00
Cristian Maglie
c63ae04420 Made Serial.write(byte[]) method public
This method turns out to be useful.
2016-07-06 16:53:01 +02:00
Cristian Maglie
8f20f4d98b "Include library" now checks for includes property
A new property "includes" has been added to library.properties.
This property contains a comma-separated list of the files to be included when
the user selects the "Include library" command on the Arduino IDE.

If the property is missing the old behaviour is used.
2016-06-23 13:04:56 +02:00
Martino Facchin
7e4144b3fa starting version 1.6.10 2016-05-11 16:42:34 +02:00
Cristian Maglie
a0aa3e6a04 Updated translations 2016-05-10 10:35:55 +02:00
Cristian Maglie
bca77163fb Merge branch 'upload-without-verify' of https://github.com/gh-megabit/Arduino 2016-04-28 15:09:27 +02:00
gh-megabit
4b64ef74ba Implement Do-Not-Verify-After-Upload preference for Serial Uploads 2016-04-15 21:15:34 +01:00
Martino Facchin
2ddbf01334 Do not drop serial ports with underscore in the name
solves #4857
2016-04-15 10:01:47 +02:00
Sandeep Mistry
c99ab12446 Add "runtime." prefix to "build_properties_custom.*" preferences 2016-04-13 09:03:03 -04:00
Sandeep Mistry
9c741885e0 Revert "Do not save build_properties_custom.* preferences to disk"
This reverts commit f47165db64.
2016-04-13 08:58:35 -04:00
Sandeep Mistry
f47165db64 Do not save build_properties_custom.* preferences to disk 2016-04-12 10:15:01 -04:00
Cristian Maglie
2b18d1fba0 Merge remote-tracking branch 'arduino/master' 2016-04-08 20:17:26 +02:00
Cristian Maglie
95f5b52420 Added flag to allow ignoring signature check on package_index.json 2016-04-08 18:55:00 +02:00
Martino Facchin
643f8479e3 Restore serial.port.iserial field
uses 2893c2d643
2016-04-08 17:58:01 +02:00
Martino Facchin
f6880fe617 Merge pull request #4792 from facchinm/solve_serial_windows
Rework serial ports handling
2016-04-06 18:03:45 +02:00
Martino Facchin
bf11c7f395 avoid queuing a lot of threads while waiting for platform 2016-04-06 17:52:24 +02:00
Martino Facchin
72c337d88d avoid losing the sketch serial port on 1200bps touch 2016-04-06 17:51:48 +02:00
Martino Facchin
c28c854936 Filter examples based on contributed libraries by architecture
Solves #4762
2016-04-06 14:41:12 +02:00
Cristian Maglie
0c453355f4 Merge branch 'fix-annoying-popup' 2016-04-04 13:34:14 +02:00
Cristian Maglie
8d7ee63c70 Autoclose notification popup after 10 seconds. 2016-04-04 13:30:42 +02:00
Martino Facchin
42ff604f1e Fix NPE when replacing unexisting strings 2016-04-01 12:52:19 +02:00
Martino Facchin
34b0813530 try to avoid NPE if two threads modify library list 2016-04-01 12:39:01 +02:00