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

844 Commits

Author SHA1 Message Date
Mattia Bertorello
53be417989
Add log4j dependencies 2019-07-02 16:10:12 +02:00
Mattia Bertorello
207128db91
fix the misleading exception throw on windows
- The file will be close before delete it
- Some refactoring of the downloader cache
2019-06-29 18:16:59 +02:00
Mattia Bertorello
d3e712232b
Convert CircularRedirectException in IOException 2019-06-28 17:52:31 +02:00
Mattia Bertorello
e6f09123bc
Remove notNull annotation that failed the build 2019-06-28 17:49:05 +02:00
Mattia Bertorello
d089323342
Fix possible empty files during the download of the package index 2019-06-28 17:44:17 +02:00
Mattia Bertorello
8ca093b945
Add slf4j, optimize some code and fix reported lint problem 2019-06-28 13:02:50 +02:00
Mattia Bertorello
6592c42dcf
Add the file downloader cache to make faster the library/boards manager 2019-06-28 09:02:21 +02:00
Martino Facchin
d518d7683c Fix NPEs if no hardware core is installed
Fixes #8229
2019-05-06 15:10:42 +02:00
Cristian Maglie
72330aaddd Fix .classpath: commons-lang3-3.3.2 -> commons-lang3-3.8.1.jar 2019-04-02 16:36:08 +02:00
Mattia Bertorello
eb055cc4c0 Add user agent in the connection to api-builder.arduino.cc/builder/v1/boards/ 2019-04-02 15:32:37 +02:00
Martino Facchin
05de5c9593 Follow symlinks when saving sketch
Fixes #8535
2019-04-02 15:05:08 +02:00
Pieter12345
442007a926 Remove unused FileUtils methods
Remove unused FileUtils methods without obvious use case or for which a replacement exists in the Files or File class.
2019-03-26 18:46:09 +01:00
Pieter12345
4c2fca6457 Replace some FileUtils calls with direct methods
Not wrapping these calls in FileUtils methods makes the code cleaner and easier to understand (FileUtils is very poorly documented, whereas direct calls contain proper documentation).
2019-03-26 18:46:09 +01:00
Pieter12345
6d9dd975be Remove StringUtils class
The functionality in this class has been replaced with the Apache commons.lang3 dependency.
2019-03-26 18:46:09 +01:00
Pieter12345
09e466a4a2 Replace StringUtils.join() with library call
Use Apache commons.lang3 instead of own implementation.
2019-03-26 18:46:09 +01:00
Pieter12345
a08908a90f Replace StringUtils.stringContainsOneOf() with library call
Use Apache commons.lang3 instead of own implementation.
2019-03-26 18:46:09 +01:00
Pieter12345
e6e10cdeb9 Update commons-lang3 from 3.3.2 to 3.8.1
Updated due to new API methods than can be useful for this project.
The license remained the same.
2019-03-26 18:46:09 +01:00
Pieter12345
91c262dc0e Replace SSHUploader file filter
- The file names in FILES_NOT_TO_COPY are full names and not partial names, so the check should not check if a file name contains such a name, but rather whether a file name fully matches such a name.
- Replaced the FILES_NOT_TO_COPY by a HashSet since this provides O(1) lookups, rather than O(n) lookups where n is the size of the set.
2019-03-26 18:46:09 +01:00
Martino Facchin
f119590d84 Starting 1.8.10 2019-03-25 11:25:48 +01:00
Cristian Maglie
82a6a404c2 Update translations 2019-03-15 14:23:43 +01:00
Cristian Maglie
54ca2235cc pluggable discovery: Debugging messages under 'discovery.debug' preference 2019-03-15 14:15:50 +01:00
Martino Facchin
dd58a7254c Replace usages of jssc-2.8.0-arduino2.jar with arduino3 2019-03-11 17:05:06 +01:00
Martino Facchin
8ad6d0efcf Update aarch64 shared library in jssc
Fixes https://github.com/arduino/Arduino/issues/7302#issuecomment-422539496
2019-03-11 17:01:18 +01:00
Martino Facchin
d4bbf71b30 Match wildcard property "." with board fqbn/name 2019-03-07 14:11:06 +01:00
Martino Facchin
be1a8403f0 Add TargetBoard.getFQBN helper 2019-03-07 14:11:06 +01:00
Martino Facchin
feb863dfc9 PluggableDiscovery: allow patterns to contain runtime variables 2019-03-07 12:41:27 +01:00
Cristian Maglie
e1caaf1c45 Perform port selection after initializing packages
Fix #8400
2019-01-23 15:46:41 +01:00
Cristian Maglie
7bc086a301 PluggableDiscovery: correct synchronization on 'portList' access 2019-01-23 13:51:41 +01:00
Cristian Maglie
4ae740ad66 PluggableDiscovery: BoardPort.label sanity check in the correct place 2019-01-23 13:51:41 +01:00
Cristian Maglie
4c188c9374 PluggableDiscovery: Factored out method to umarshal BoardPort from JSON 2019-01-23 13:51:41 +01:00
Cristian Maglie
8e9f0cfd76 PluggableDiscovery: added a 'port' field in json messages
The new format of 'add' and 'remove' actions is changed from:

{
  "eventType": "add",
  "address": "/dev/ttyACM0",
  "label": "/dev/ttyACM0",
  "prefs": {
    "vendorId": "0x2341"
    "productId": "0x0043",
    "serialNumber": "85235353137351018160",
  },
  "identificationPrefs": {
    "vid": "0x2341"
    "pid": "0x0043",
  },
  "protocol": "serial",
  "protocolLabel": "Serial Port"
}

to:

{
  "eventType": "add",
  "port": {
    "address": "/dev/ttyACM0",
    "label": "/dev/ttyACM0",
    "prefs": {
      "vendorId": "0x2341"
      "productId": "0x0043",
      "serialNumber": "85235353137351018160",
    },
    "identificationPrefs": {
      "vid": "0x2341"
      "pid": "0x0043",
    },
    "protocol": "serial",
    "protocolLabel": "Serial Port"
  }
}
2019-01-23 13:51:41 +01:00
Cristian Maglie
7186213034 Slightly changed pluggable discovery json parsing
The json input is now parsed into a JsonTree that can probed for the
'eventType' node value so we can understand the type of message to
decode to.
2019-01-23 13:51:41 +01:00
Cristian Maglie
349af4b5cf Added BoardPort.protocolLabel and simplified port menu rendering 2019-01-23 13:51:41 +01:00
Cristian Maglie
c03a8bc175 Minor fix in indentation and style 2019-01-23 13:51:41 +01:00
Cristian Maglie
cfd3cf2b27 Use correctly the setBoardName() method in NetworkDiscovery 2019-01-23 13:51:41 +01:00
Cristian Maglie
9ba172b0db Show BoardName.boardName field in 'Ports' menu
...instead of putting it into the 'label' field during discovery.
2019-01-23 13:51:41 +01:00
Cristian Maglie
ec4787a92b Fixed board identification in BoardPort 2019-01-23 13:51:41 +01:00
Cristian Maglie
5bc96652e6 Slightly optimized method by removing redundant boolean flag 2019-01-23 13:51:41 +01:00
Cristian Maglie
80fb9a0b38 Optimized forceRefresh() method by removing redundant boolean paramater 2019-01-23 13:51:41 +01:00
Cristian Maglie
3ccb2d97e1 Merged SerialDiscovery and SerialBoardLister
They perform basically the same task, SerialDiscovery just used to proxy
the calls to SerialBoardLister
2019-01-23 13:51:41 +01:00
Cristian Maglie
8d6fa72667 Removing fixed fields in BoardPort 2019-01-23 13:51:41 +01:00
PaulStoffregen
d7143d6859 Add BoardPort identificationPrefs and searchMatchingBoard 2019-01-23 13:51:41 +01:00
PaulStoffregen
05092bf17f Move BoardPort fixed fields into prefs 2019-01-23 13:51:41 +01:00
PaulStoffregen
e029acc699 Add PluggableDiscoveryMessage for BoardPort change metadata 2019-01-23 13:51:41 +01:00
PaulStoffregen
b6066573b9 PluggableDiscovery check for START_SYNC not supported 2019-01-23 13:51:41 +01:00
PaulStoffregen
5ba56abc80 Initial PluggableDiscovery using BoardPort for JSON 2019-01-23 13:51:41 +01:00
PaulStoffregen
f5bf6e5e7a Add BoardPort copy constructor 2019-01-23 13:51:41 +01:00
Cristian Maglie
f81798badf Pluggable discovery: search in platform.txt (WIP) 2019-01-23 13:51:41 +01:00
Martino Facchin
e9ecaa70f7 Check for containing folder existence before listing files
Fix #8389
2019-01-18 10:12:16 +01:00
Cristian Maglie
f52fc1fb5e Slightly improved DownloadableContributionVersionComparator 2019-01-14 17:27:34 +01:00
Sandeep Mistry
b3b62d0c44
Only display touch bar on macOS 10.12 and higher (#8281) 2018-12-11 09:37:41 -05:00
Martino Facchin
56f0e96912 Starting 1.8.9 2018-12-06 15:12:00 +01:00
Cristian Maglie
09158c6d7f updated translations 2018-12-05 12:17:48 +01:00
Cristian Maglie
503ebd6a48 Fixed possible NPE 2018-11-27 17:06:18 +01:00
Martino Facchin
ffba05fd31 Refactor port selection after 1200bps touch upload
New behaviour:
if upload failed or we are uploading through a "Programming" port (that does not disappear), leave the user selected port selected.
if upload succeded and we are using 1200bps touch, wait for the first port that reappears, and if nothing reappears after the timeout select the bootloader port.

Fixes #https://github.com/arduino/Arduino/issues/3495
2018-11-27 16:54:21 +01:00
Cristian Maglie
210d3b3613 Updated translations 2018-11-23 16:03:38 +01:00
Martino Facchin
c1d9c588b5
Merge pull request #8184 from facchinm/kill_programmer_at_exit
Kill active programmer if still alive after closing last IDE window
2018-11-23 12:07:13 +01:00
Cristian Maglie
cede26883e Fix 'Select port on upload' error message 2018-11-14 17:41:34 +01:00
Cristian Maglie
2397e1e8c2 Added StringReplacer.checkIfRequiredKeyIsMissingOrExcept helper method 2018-11-14 17:41:34 +01:00
Cristian Maglie
5428420e0a Refactor: removed useless parameter from StringReplacer.formatAndSplit 2018-11-14 17:41:34 +01:00
Cristian Maglie
0a0d3c88e0 Refactor: simplified bool prefs retrieval 2018-11-14 17:41:34 +01:00
Cristian Maglie
7adeef1ee3 Refactor: simplified TargetBoard retrieve 2018-11-14 17:41:34 +01:00
Cristian Maglie
b6132e8532 Removed dead-code in comments 2018-11-14 17:41:34 +01:00
Martino Facchin
b71a4969af Kill active programmer if still alive after closing last IDE window
Fixes https://github.com/arduino/Arduino/issues/7498
2018-11-08 18:08:58 +01:00
Cristian Maglie
afc0e0240e Override desktop check when setting look and feel on linux
The swing UIManager class detects the correct look and feel settings by
looking inside the `sun.desktop` system property, here's the extract of
the JDK:

    String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    if ("gnome".equals(desktop) &&
            toolkit instanceof SunToolkit &&
            ((SunToolkit) toolkit).isNativeGTKAvailable()) {
        // May be set on Linux and Solaris boxs.
        return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
    }

Since we want always the GTK look and feel (even if the desktop is not
strictly a GNOME desktop) we force the `sun.desktop` property always to
`gnome`.
2018-11-05 11:46:49 +01:00
Cristian Maglie
045877094b Fix LookAndFeel loader
Fix #8119
Close #8122
2018-11-05 11:46:49 +01:00
per1234
5217912d58 Start Arduino IDE 1.8.8 2018-11-03 06:56:41 -07:00
Cristian Maglie
db2dd8f003 Download indexes using https instead of http 2018-10-24 16:20:04 +02:00
Cristian Maglie
b7728beb52 Updated translation strings 2018-10-08 12:57:25 +02:00
Cristian Maglie
8ba209a64d Improved PreferencesMap toString output 2018-09-28 01:42:41 +02:00
Cristian Maglie
6da3e5fe20 Updated translations 2018-09-11 16:22:10 +02:00
Cristian Maglie
9c4d52c50a Release 1.8.7 2018-09-10 14:45:54 +02:00
Cristian Maglie
27eca6b3d9 Regression: fixed wrong BUILTIN_AS_LAST comparator
This bug has been introduced with b3d01d8281

Fix #7973
2018-09-07 15:03:25 +02:00
Cristian Maglie
0951efb711 Updated i18n resources with new strings 2018-09-06 16:01:19 +02:00
Cristian Maglie
2fa42dc08e Updated translations 2018-09-06 16:01:19 +02:00
Cristian Maglie
0b4c4bbcf2 Immediately re-parse library_index.json after updating it 2018-09-06 11:57:21 +02:00
Cristian Maglie
34baa40953 Removed useless I18n reference in call to format 2018-09-06 11:57:21 +02:00
Cristian Maglie
fe424ae39b Do not fail if the data folder can't be read
Fix #7937
2018-09-06 11:57:21 +02:00
Cristian Maglie
fd28ded160 Get a better error message if the library_index.json can't be parsed
See #7937
2018-09-06 11:57:21 +02:00
Cristian Maglie
6ed7934ee1 Do not fail if library_index.json can't be parsed
Fix #7937
2018-09-06 11:57:21 +02:00
PaulStoffregen
e6bf0f24eb Delete leftover comments & question 2018-09-03 16:39:39 +02:00
PaulStoffregen
4ccf9bbd90 Show a helpful message when no Port is selected 2018-09-03 16:39:39 +02:00
Martino Facchin
b99d55ba92 Add missing tools checksums 2018-08-28 17:54:40 +02:00
Martino Facchin
6080907ba3 Update jscc to 2.8.0-arduino2 (aarch64 support) 2018-08-28 17:53:04 +02:00
Martino Facchin
418e3def10 Add runtime tool with version to board preferences
If two vendors declare the same tool (name and version) and platform.txt requires {runtime.tool-version.path}, the tool is chosen randomly.
This patch completes 6f24fa6cec
2018-08-28 17:51:14 +02:00
Cristian Maglie
d2a251c066 Improved error message when no library headers are found 2018-08-28 16:07:35 +02:00
Cristian Maglie
f58f8d3c4b Fix NPE crash after installing a library with invalid version
Fix #7917
2018-08-28 16:07:35 +02:00
Cristian Maglie
86217a4fb4 Slightly refactored VersionComparator (WIP 2/3) 2018-08-28 16:07:35 +02:00
Cristian Maglie
3092e03bec VersionHelper.valueOf now returns an Optional (WIP 1/3)
This helps to avoid bugs similar to #7917
2018-08-28 16:07:35 +02:00
Cristian Maglie
4f1ff2a42f Update translations 2018-08-23 10:47:39 +02:00
Cristian Maglie
13c3750ecf Revert "Moving a sketch to another folder should move all files"
This reverts commit c4f5cafd33.
2018-08-23 10:39:20 +02:00
Cristian Maglie
4b59dbae24 Removed unused function 2018-08-14 22:01:04 +02:00
Cristian Maglie
2f6d2112cf Simplified overly complicated error handling in PApplet.createWriter 2018-08-13 20:19:25 +02:00
Cristian Maglie
9eeb79fed4 Do not crash if preferences.txt can't be written 2018-08-13 20:19:25 +02:00
Cristian Maglie
99fe051c4a Added preferences.txt option to disable preferences save
Fix #5668
2018-08-13 20:19:25 +02:00
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