1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-26 20:54:22 +01:00

7260 Commits

Author SHA1 Message Date
Cristian Maglie
385a6738e9 autocompletion: factored filtering of completions 2020-04-07 14:09:06 +02:00
Martino Facchin
5e8895c475 Remove autocomplete for macros
Was causing NPE on certain cores
2020-04-07 14:09:06 +02:00
Cristian Maglie
79339d24f7 Added more debugging output for codecompletion errors 2020-04-07 14:09:06 +02:00
Cristian Maglie
77fd2b3919 Increase debugging info in json parsing from autocomplete 2020-04-07 14:09:06 +02:00
Cristian Maglie
46641780bf Refactored notification popup 2020-04-07 14:09:06 +02:00
Martino Facchin
8b53785c9f autocomplete: restore braces on functions
Also make the output more uniform (no differences between templates and funxtions)

New format is: functionName (bold) parameters (light grey) : returnType
2020-04-07 14:09:06 +02:00
Martino Facchin
d8d06134c7 cache + sort for autocomplete 2020-04-07 14:09:06 +02:00
Martino Facchin
ad2b97fff8 eclipse: add autocomplete to classpath 2020-04-07 14:09:06 +02:00
Martino Facchin
836c756493 Windows: add grpc jars to classpath 2020-04-07 14:09:06 +02:00
Cristian Maglie
2ccbb4928c Removed unused import 2020-04-07 14:09:06 +02:00
Cristian Maglie
7de9a3e483 Calling arduino builder with GPRC API [experimental] 2020-04-07 14:09:06 +02:00
Cristian Maglie
116cad067e Created getAllHardwareFolders and getAllToolsFolders 2020-04-07 14:09:06 +02:00
Cristian Maglie
b4b32f244a Added method to determine board FQBN
This simplifies a bit the organization of the arduino-builder calls.
2020-04-07 14:09:06 +02:00
Cristian Maglie
b693544c77 Added missing licenses 2020-04-07 14:09:06 +02:00
Cristian Maglie
a6652f938a codecompletion: added function parameters support. 2020-04-07 14:09:06 +02:00
Martino Facchin
41f0dde6f7 include autocomplete icons in pde.jar 2020-04-07 14:09:06 +02:00
Cristian Maglie
ce22446f60 Use FunctionCompletion when dealing with function autocompletions 2020-04-07 14:09:06 +02:00
Cristian Maglie
f949c79f63 Added some more infos in CompletionDetails 2020-04-07 14:09:06 +02:00
Cristian Maglie
fae321cd99 Added CompletionsRenderer 2020-04-07 14:09:06 +02:00
Cristian Maglie
42930e22b0 Testing autocomplete with arduino-preprocessor 2020-04-07 14:09:06 +02:00
Cristian Maglie
ff17c8667f pr-builder: Build linux64 first 2020-04-07 14:09:06 +02:00
Cristian Maglie
d72302bc8f Introducing arduino-preprocessor (linux64 only for now) 2020-04-07 14:09:06 +02:00
ricardo.jl.rufino@gmail.com
5f1c9af83f fix windows build - add autocomplete libs 2020-04-07 14:09:06 +02:00
ricardo.jl.rufino@gmail.com
2015c98908 Refactoring autocomplete structure 2020-04-07 14:09:06 +02:00
ricardo.jl.rufino@gmail.com
c84fd1a398 Base implementation of autocomplete #849 2020-04-07 14:09:06 +02:00
Martino Facchin
831c9bba2a Add symlink support for Windows
Fixes https://github.com/arduino/Arduino/issues/6893
2020-04-07 14:09:06 +02:00
Martino Facchin
cabd626f0a Limit selected tab size in case of crowded header 2020-04-07 14:09:06 +02:00
Martino Facchin
336cde194d [tabs] some heavy lifting on tabs handling
The situation is still a shit, but at least better than before.
2020-04-07 14:09:06 +02:00
Martino Facchin
56dcf6bde4 Implement MouseWheelListener on tabs
tested with Marlin Firmware, solves #6109 #3601 #1193
2020-04-07 14:09:06 +02:00
Martino Facchin
578d34e203 Shift tabs if selected one if being painted offscreen
Implemented using a dry run to get the metrics and the needed shift
Fixes #1193 and #6109
2020-04-07 14:09:06 +02:00
Martino Facchin
2bcbaf7a68 Add clickable HTML view of Serial Monitor
The HTML view only activates if:
- the output is steady
- the "frame" contains a link
- the length of the entire content is < 1KB

No performance penalty compared to normal view (in standard conditions)
2020-04-07 14:09:06 +02:00
Martino Facchin
58eeaafde1 Extend UpdatableBoardsLibsFakeURLsHandler to handle real links 2020-04-07 14:09:06 +02:00
Martino Facchin
97fd81ac0c Avoid board change during compilation/upload
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
2020-04-07 14:09:06 +02:00
Martino Facchin
70d5537fb0 Add watcher on sketch files
Reloads sketch content if the Editor is not in foreground and isomething happens in the backing storage files.

Note that no confirmation dialog is displayed (same behaviour as SublimeText, differs from other IDEs)

Fixes #4551 and #5345
2020-04-07 14:09:06 +02:00
Martino Facchin
abbd40242d [RecentlyUsedBoards] Fix merge conflicts 2020-04-07 14:09:06 +02:00
Martino Facchin
917b1321d6 Prepare for LRU persistency 2020-04-07 14:09:06 +02:00
Martino Facchin
ddd876ca4e Make Recently used boards size configurable from preferences 2020-04-07 14:09:06 +02:00
Martino Facchin
14e59208b3 Fix concurrent access to menuItemsToClickAfterStartup 2020-04-07 14:09:06 +02:00
Martino Facchin
8a410a8a7f Add per-session recently used boards list
The list appears at the top of Board submenu
Boards are also reachable via a CTRL+SHIFT+number (starting from 1)
2020-04-07 14:09:06 +02:00
Martino Facchin
d0b74b0263 Refactor boardMenu creation
This commit is part of https://github.com/arduino/Arduino/pull/7120 by @sandeepmistry
2020-04-07 14:09:06 +02:00
Cristian Maglie
a1e43ce490 Removed some trivial warnings 2020-03-25 15:26:53 +01:00
Cristian Maglie
931c2b7f21 Do not translate labels of boards submenus
Otherwise it may happen some weird sorting when untraslated and
translated labels are sorted together:

    Arduino megaAVR Boards
    Arduino nRF52 Board
    ESP32 Arduino
    ESP8266 Modules
    Schede Arduino AVR   <-- the localized string falls to the bottom

Also there is no way for 3rd party boards developers to actually provide
a translation, so let's just remove them.
2020-03-25 15:26:53 +01:00
Matthijs Kooijman
9b48e8d047 Sort board submenus alphabetically
This sorts the board submenus themselves, based on the displayed name.
This does not change the ordering of board items within these submenus
(which uses the order from boards.txt).
2020-03-25 15:26:53 +01:00
Matthijs Kooijman
6c1100f9ec Do not use a boards submenu with just one platform
When just one platform is installed, it does not make much sense to use
a submenu, so just add the boards directly under the boards menu as
before.
2020-03-25 15:26:53 +01:00
Matthijs Kooijman
7bcd76332e Separate the boards menu per platform
Previously, the Tools->Boards menu was one long list, divided into
different platforms by (unselectable) headers. When more than one or two
platforms were installed, this quickly results in a very long list of
boards that is hard to navigate.

This commit changes the board menu to have a submenu for each platform,
where each submenu contains just the boards for that platform.

Note that this first keeps a list of board items and then adds those to
the boards menu later. This could have been done directly, but the
intermediate list makes it easier to special-case single platform
installations, as well as sort the list in subsequent commits.

This fixes part of #8858.
2020-03-25 15:26:53 +01:00
Matthijs Kooijman
7c4205b412 Handle nested submenus of the Tools menu
There is some code that, for each submenu under Tools, shows the
selected item in the label of the submenu itself (e.g. before opening
the submenu). This was done whenever the Tools menu is opened and
iterated over all the items in the submenu to identify the s

Previously, this code only looked at direct children of the submenu.
Now, this code also looks through submenus recursively, to keep the code
working even when items are divided over sub-submenus.

This makes a small behaviour change: previously, the first selected item
with a non-zero label was used. Now, the first selected item is used,
which makes the code a bit cleaner. I cannot quickly see any case where
the first selected item would have an empty text (and even more that
there is *another* selected item), so this check seems unnecessary. If
this case would occur nonetheless, it would only mean the selected item
is not displayed in the tools menu, nothing would otherwise break.
2020-03-25 15:26:53 +01:00
Martino Facchin
6c7d1042a9
Merge pull request #9912 from matthijskooijman/no-empty-programmers-menu
Never leave programmers menu empty
2020-03-25 09:10:40 +01:00
Matthijs Kooijman
e803061709 Never leave programmers menu empty
When there are no programmers available for the current board, the
programmers menu would remain empty, which would prevent it from
unfolding and could make users think there was something wrong with the
menu.

Now, a disabled item with a message is added if no programmers are
available, which should make it more clear what is going on.

This is a followup for #9373.
2020-03-24 20:37:12 +01:00
Matthijs Kooijman
a1d6da9dfe Prevent bytes from lingering in the serial buffer
This fixes a problem with the Serial UTF-8 decoder. This decoding moves
data from char[] buf, into a ByteBuffer inFromSerial, then decodes them
into a CharBuffer outToMessage and converts to a char[] to pass on.

When the buf read contained just over a full buffer worth of bytes and
contained some multi-byte characters, a situation could arise where two
decodes were needed to fill up outToMessage, leaving some data in
inFromSerial. If in this case no data would be left in buf, decoding
would stop until more data came in from serial.

This commit fixes this problem by:
 - Changing the outer loop to continue running when buf is empty, but
   inFromSerial is not.
 - Changing the inner loop to run at least once (so it runs when buf is
   empty, but inFromSerial is no).
 - Breaking out of the outer loop when no characters were produced (this
   handles the case where only an incomplete UTF-8 character remains in
   inFromSerial, which would otherwise prevent the loop from
   terminating.
 - Removes a `if (outToMessage.hasRemaining()` check that is now
   necessarily true if the break was not done.

This fixes #9808.
2020-03-24 15:24:50 +01:00
Matthijs Kooijman
d244a45c4a Use Math.min instead of ternary if in Serial data copy
This makes the code slightly more compact and easier to read.
2020-03-24 15:24:50 +01:00