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

1907 Commits

Author SHA1 Message Date
Stefano Visconti
893fc86a3f
Moving asciilogo.txt to a different domain
we are moving asciilogo.txt to arduino.tips domain so examples need to be updated
2022-02-23 17:02:56 +01:00
Cristian Maglie
9f8d19244a Removed log4j
Fix #11727
2021-12-20 12:53:48 +01:00
Cristian Maglie
1005ab11fe Updated log4j to version 2.16.0 2021-12-14 13:59:52 +01:00
Russell Howe
8ae1f94553
Upgrade log4j to 2.15.0 - CVE-2021-44228 2021-12-11 10:32:01 +00:00
Cristian Maglie
23a023219b
Merge pull request #11650 from cmaglie/fix_font_resize_hide_tabs
Fix: Font size change corrupts inactive tabs
2021-08-23 12:09:38 +02:00
Cristian Maglie
89eba8cf61 Removed bundled offline docs
The offline documentation is hard to update and gets outdated very
quickly.

Fix #8860
2021-08-18 14:40:01 +02:00
Cristian Maglie
eb1e2ca235 Removed (apparently never activated) DocLinkGenerator 2021-08-18 14:38:44 +02:00
Cristian Maglie
af5a3d7801 makeup: factor call to tabs.get(index) 2021-08-18 12:00:38 +02:00
Cristian Maglie
240e1b5624 Force font metrics recalculation when changing tabs
Fix #7321
2021-08-18 11:58:13 +02:00
Cristian Maglie
c4109e78bc Removed unused imports 2021-05-19 12:15:37 +02:00
Cristian Maglie
aef6d2ac98 Filter ContributedPlatformReleases after fully building them 2021-05-11 14:34:14 +02:00
Martino Facchin
cec4f41dd7 Board Manager: searching returns also near matches
The original filter would only populate the contribution list with perfect matches.

Previously, if a core was installed but didn't match the search it wouldn't appear in the results (due to a board being added or the description changed);
the user could then install (not upgrade) the core, triggering a confusing situation.

When moving to arduino-cli backend we should take care of this issue, at least visually (the cli logic would correctly update/downgrade the core)
2021-05-11 14:31:21 +02:00
Cristian Maglie
8ceb6c29f8
Merge pull request #11508 from cmaglie/deprecation_field
Added basic "deprecation" support for platforms
2021-05-10 16:06:08 +02:00
QuocViet Le
69e91cab5c Typo in SerialPlotter.java 2021-05-10 16:03:07 +02:00
Cristian Maglie
7a9db6ccf8 Show maintainer instead of author in lib manager 2021-05-10 15:55:54 +02:00
Cristian Maglie
12cb3f0dc9 Added 'deprecated' label 2021-05-10 10:06:39 +02:00
Cristian Maglie
24556e7bf2 Deprioritize deprecated contributions 2021-05-10 09:59:16 +02:00
Cristian Maglie
cecc61c7eb Propagate deprecated flag in ContributedPlatformReleases 2021-05-10 09:59:16 +02:00
Cristian Maglie
c82005c2c0 Do not delete unused 3rd party index files 2021-05-06 10:27:27 +02:00
Cristian Maglie
cb1b845fbd Preserve all menu items for restoring when the menu is closed 2021-04-25 23:14:25 +02:00
Martino Facchin
6c3c1c09b1 Make Custom menus scrollable
Fixes #11416

The patch on MenuScroller.java is needed to avoid a clash between custom menus with the same label.
This behaviour artificially increases the amount of objects that the scroller will calculate.
Eg. if two boards share the same custom menu, that menu will contain the properties for both the boards (since it's parsed twice).
2021-04-12 13:02:12 +02:00
Cristian Maglie
57a931c9c4
Merge pull request #11414 from cmaglie/i18n-update
Some small URL fix and updates to translations
2021-04-09 13:37:03 +02:00
Adrian Hughes
3f0699a949
Optimize applyFilter() to Avoid Redundant String Operations (#11284)
if 'showingHint' == true, then many potentially expensive String operations are being executed on an empty string. This change wraps these operations in an if block which will only run them when needed.
2021-04-09 13:36:32 +02:00
Cristian Maglie
021bcacdb1 Removed translation and updated some URLs 2021-04-08 15:16:57 +02:00
maged
5e7519473e Fix status bar custom board preferences disappearing 2021-01-24 16:26:17 +02:00
Nicola Elia
f315208495 Add shift+click to serial monitor button on the toolbar to open serial plotter 2020-12-03 20:09:07 +01:00
Matthijs Kooijman
61e12d582a rebuildProgrammerMenu: Handle no current board
This can happen happen in some unlikely cases (such as when renaming a
platform in a way that breaks the "select a board when none is selected
logic").

Even though a board should always be selected, code should still handle
no selected board gracefully (rather than raising a NullPointerException
like this used to do).

See #10887 for the underlying issue that caused no board to be selected.
2020-11-04 23:28:33 +01:00
per1234
99d3114168 Move built-in examples to dedicated repository
A dedicated repository for the examples will make it easier for them to be built in to arbitrary development tools. It will make it easier to use them for compilation testing of boards platforms. It provides a dedicated location for issue reports and pull requests that are specific to the examples. It continues the work done by moving the AVR and SAM boards platforms and built-in libraries towards making the arduino/Arduino repository solely a place to host the GUI code of the Arduino IDE.
2020-09-07 04:52:40 -07:00
Cristian Maglie
10bee204e6 Lib manager: added getContribModel() as in Boards manager 2020-07-23 12:10:45 +02:00
Cristian Maglie
851b5b14b1 Lib manager GUI is updated after installing/upgrading library 2020-07-23 12:10:45 +02:00
Cristian Maglie
a81772afc6 Boards Manager: update UI after an install/remove 2020-07-23 12:10:45 +02:00
Cristian Maglie
1361bce6bc Board manager: Update filters UI only if categories changes 2020-07-23 12:10:45 +02:00
Cristian Maglie
4c45ea8ecc Fixed NPE in buildProgrammersMenu
Some platforms may not define directly 'build.core' because it may be defined
through a custom menu.

For example, the arduboy platform has in the boards.txt:

   [...]
   menu.core=Core
   [...]
   # core #
   arduboy-homemade.menu.core.arduboy-core=Arduboy optimized core
   arduboy-homemade.menu.core.arduboy-core.build.core=arduboy
   arduboy-homemade.menu.core.arduino-core=Standard Arduino core
   arduboy-homemade.menu.core.arduino-core.build.core=arduino:arduino
   [...]

the build.core is determined only after applying the submenu options.
2020-07-23 11:00:44 +02:00
Cristian Maglie
b66ed5e5d7 LibraryManager: correctly apply "type" and "category" filters together
Previously changing "Category" would filter libraries by the selected
category but without applying the "Type" previously selected.
For instance selecting Type="Installed" and Category="Communication"
will display *all* the libraries belonging to "communication" instead of
the installed only.

This commit fix this behavior.
2020-06-29 17:27:11 +02:00
Cristian Maglie
3263967893 Removed unused include and clueless whitespaces 2020-06-29 17:13:43 +02:00
Cristian Maglie
42865229c2 Library manager: update filters combo box only if there are changes
The filters content is unlikely to change, so just prevent it from live
updating it because it has some side effects:

- it's slow
- it changes the selection back to the default and it's very tricky to
  make it re-select the previous selection.

Fixes #10439
2020-06-29 16:58:25 +02:00
Martino Facchin
bd0e74345a Update jmdns to 3.5.5 2020-06-03 10:21:06 +02:00
Ricardo JL Rufino
b914070c90 Avoid usueless double calls to rescanLibraries()
Previously rescanLibraries() was automatically called internally in
setLibrariesFolder(). This lead to double calls to rescanLibraries()
when setLibrariesFolder() was used in combination with an explicit
call to rescanLibraries().

This commit adds a new method setLibrariesFoldersAndRescan(..) and
removes the internal call to rescanLibraries() from setLibrariesFolder().

The existing setLibrariesFolder()+rescanLibraries() combos have been
replaced with setLibrariesFoldersAndRescan().

Fix #10228
2020-05-25 17:09:20 +02:00
Ricardo JL Rufino
cc65234582
[IDE] Title of sketch is misaligned on Linux (#10210)
Fix #10209
2020-05-20 11:29:31 +02:00
Matthijs Kooijman
6d3ad183ab Handle CR without NL printed in EditorConsole
Previously, any CR without NL was treated just like a NL. For tools that
used single CRs to update a progress bar (such as dfu-util), this would
end up printing the subsequent versions of the progress bar below each
other, instead of updating a single line as intended. Additionally,
since ConsoleOutputStream only scrolled the view on \n, these updates
would end up outside of the main view, making the upload progress quite
unclear.

This commit makes EditorConsole support lone CRs by resetting the insert
position to the start of the current line, so subsequent writes
overwrite existing content. If subsequent lines are shorter than an
earlier line, only part of the earlier line will be overwritten (this
mimics what terminal emulators do).
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
fa267da74b EditorConsole: Set up System.out/err redirection in setCurrentEditorConsole
Previously, the redirection would be triggered in the EditorConsole
constructor. However, this was problematic for unittests, which do not
need this redirection.

Since the redirection really is not useful intul there is a current
EditorConsole anyway, it can just be delayed a bit until
setCurrentEditorConsole is called.
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
3e3f54c3ca EditorConsole: Allow base to be null
This allows testing this class without going to a full initialization.
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
922661930d EditorConsole: Do not trim getText() result
Not trimming makes this method usable for unittesting. Since this method
is not currently used anywhere, it should not affect any behaviour.
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
07b3b9036a AbstractWithPreferencesTest: Disable update checks
This prevents the Arduino instance in tests from checking for updates. I
have not seen any problems resulting from this, but disabling network
requests is generally a good idea in tests (to prevent external factors
from influencing the test results).

In addition to update checks, there is also the CloudBoardResolver that
could do network requests, but there does not seem to be a preference
for disabling that.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
7bc6efa27e HittingEscapeOnCloseConfirmationDialogTest: Match dialog by title
This would match the "Close" dialog, by looking for any JDialog on
screen. However, in some cases, there could be a second dialog (I have
seen a "Install this package to use your xxx board" popup because I
happened to have an Arduino Zero connected, presumably an "Updates are
available" popup could cause this as well).

By matching not just the type of the dialog, but also the title, only
one dialog is matched and the testcase runs more reliably.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
af8e1e6dc4 Tests: Do not read system user's data
The tests would initialize Base, PreferencesData with default settings
and/or run the arduino executable, without specifying any settings to
use. In practice, this would read settings from e.g. `~/.arduino15`,
load libraries from the user's sketchbook, etc.

This is not a good idea, since this can be influence the test. For
example, the presence of invalid libraries would cause extra output to
be generated, which breaks the `--version` test. Or having the "Use
external editor" setting set would break tests that try to edit a
sketch.

This commit fixes this. The core of this commit is in
`AbstractWithPreferencesTest`, which sets up a clean settings dir (to
replace `~/.arduino15`) with a sketchbook and `preferences.txt` file
inside before every test (and removes it again after the test.

For some tests, this is enough, but some tests create an instance of
`Base`, which again initializes everything, including preferences, from
the default location. To prevent that, `--preferences-file` is passed to
the `Base` constructor, loading the previously set up preferences. This
is handled by the new `AbstractWithPreferencesTest.createBase()` method.

Furthermore, CommandLineTest calls the actual Arduino executable, which
has the same problem. This is fixed by passing the same
`--preferences-file` option on the commandline (generated by
`AbstractWithPreferencesTest.getBaseArgs()`).

This should prevent all tests from reading the the default settings
files, fixing some tests on my system and even speeding up the tests
somewhat (due less libraries and cores to load, probably).
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
0e4c900252 AbstractWithPreferencesTest: Clean up files after every test
Previously, this used the DeleteFilesOnShutdown class and a shutdown
hook, which would delete the files only after shutdown. However, the
shutdown handler would be re-added for every testcase, potentially
leading to a lot of threads trying to delete the same files.

This uses an alternative: Just keep a list of files to delete inside the
testcase and use an @After handler to delete the files directly after
each usecase.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
5700d2b539 AbstractGUITest: Make a subclass of AbstractWithPreferencesTest
Both classes contained some duplicate code, so unify that by making one
a subclass of the other. This also prepares for further additions that
should be inherited by both.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
2bd7be07fe CommandLineTest: Print commands being ran
This makes the test output a bit more easier to read.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
2c679f2cf4 CommandLineTest: Produce less verbose output
In one test, `--get-pref` is passed on the commandline to prevent
starting the full GUI. When ran without arguments, `--get-pref` causes
*all* preferences to be printed. Using `--version` achieves the same (no
GUI is started) with just a single line of output.
2020-05-11 17:13:17 +02:00