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

5890 Commits

Author SHA1 Message Date
Cristian Maglie
fd04767269 Renamed ContributedLibraryTableCell to ContributedLibraryTableCellRenderer
This is in preparation for the next refactoring.
2015-12-29 16:01:33 +01:00
Cristian Maglie
ed30cd7b58 Removed ContributedLibraryTableCell.Cell dependency from upper editorValue field 2015-12-29 16:01:33 +01:00
Cristian Maglie
268ae81759 Removed useless parentTable field in ContributedLibraryTableCell 2015-12-29 16:01:33 +01:00
Cristian Maglie
926a8c9101 Correct implementation of ContributedLibraryTableCell
getTableCellRendererComponent() interface requires to return independent
Component objects used for "stamping" the table element.
2015-12-29 16:01:33 +01:00
Cristian Maglie
29912a0ac9 Remove temporary files when updating library_index.json
Fix #4272 #4332
2015-12-28 19:17:29 +01:00
Matthijs Kooijman
7949e7e81f Randomize temporary sketch copy directory name
When a sketch has unsaved changes, a temporary copy of the sketch is
made with those changes applied. This copy is then passed to
arduino-builder.

Previously, the name of this directory contained a hash of the main
sketch filename, so the same directory would be used between builds. Now
that this directory is deleted after every build, it can just use a
randomized directory name, which is what this commit does.

Addtionally, the prefix used for generating the name is changed from
"arduino_" to "arduino_modified_sketch_" to make it slightly clearer
what the directory is for (just in case it somehow survives the build,
or a user sees it during the build).
2015-12-28 15:28:58 +01:00
Matthijs Kooijman
1029e0b78d Delete temporary sketch copy after build
When a sketch has unsaved changes, a temporary copy of the sketch is
made with those changes applied. This copy is then passed to
arduino-builder.

Previously, this temporary copy was kept around and only deleted when
the IDE was closed. However, all files were written to it again on every
build, so keeping the old files around did not serve any real purpose.

When a file was renamed in the IDE, the original name would still be
present in the temporary copy, and could cause linker errors because
both were compiled.

This commit makes sure the temporary copy is deleted after every build,
instead of at IDE exit, which fixes this problem with renames.

When a file is deleted from the sketch, the file would also be deleted
from the temporary copy, presumably to fix this same problem for
deletes (but renames were forgotten). With this commit, this special
handling for deleting files is no longer needed, so it is removed.

This fixes #4335
2015-12-28 15:19:55 +01:00
Cristian Maglie
a6e36fac9d update revisions log 2015-12-28 12:32:10 +01:00
vbextreme
b1231c39e9 fix delay/yield on avr, if function called by yield takes more a millisecond the delay fails 2015-12-27 14:50:56 +01:00
Cristian Maglie
d893aa0b65 Merge NicoHood's fix for USB_SendControl with len>64
Fix #4325
2015-12-23 15:35:08 +01:00
NicoHood
6367168925 Added >64 byte USB_RecvControl() support 2015-12-23 15:31:55 +01:00
Cristian Maglie
480f2fa0d3 Merge branch 'issue3502-indent' of https://github.com/damellis/Arduino
Fix #3502
2015-12-23 12:14:28 +01:00
Cristian Maglie
733a6d0821 update revision log 2015-12-23 11:59:56 +01:00
Cristian Maglie
a73d393554 Merge branch 'fix-npe-platform-json' into master 2015-12-22 17:57:28 +01:00
David A. Mellis
07903b8585 Use new IncreaseIndentAction for Edit > Increase Indent.
This simplifies the code a bit and fixes a small bug that would cause the cursor to fail to move with the text being indented.
2015-12-21 16:42:40 -08:00
David A. Mellis
05be1480d4 Fix issue #3502: behavior of Cmd+[ and Cmd+] on Mac OS X. 2015-12-21 16:41:12 -08:00
Cristian Maglie
2b4883f755 Merge branch 'keys' of https://github.com/matthijskooijman/Arduino into matthijskooijman-keys 2015-12-21 18:58:21 +01:00
Cristian Maglie
7c089c96d3 Fixed NPE in some rare combinations of JSON files
The error triggered inside ContributioIndexer.mergeContributions()
while trying to remove a platform:

    if (platform != null) {
      targetPackage.getPlatforms().remove(platform);
    }

remove() method calls ContributedPlatform.equals() to find the
element to remove but since the parentPackage fields are resolved
*after* merging contributions, the equls() method will fail with
a NullPointerException.
2015-12-21 18:15:52 +01:00
Cristian Maglie
fa4876b7b1 Fixed unit-test UploaderFactoryTest
It was broken after merging #4107
2015-12-21 15:19:22 +01:00
Martino Facchin
376cb56fc0 Starting version 1.6.8 2015-12-21 12:05:04 +00:00
Martino Facchin
746133dece Merge pull request #4317 from NicoHood/RecvControlLong
Added Long USB RecvControl call for >64 bytes
2015-12-21 10:52:19 +00:00
Arnie97
89294855fe Fix typo in a Ethernet Shield example 2015-12-19 21:10:24 +08:00
NicoHood
ced86a9c48 Added Long USB RecvControl call for >64 bytes 2015-12-19 01:53:24 +01:00
Cristian Maglie
0b97e57b2c Updated revision log 2015-12-17 15:36:35 +01:00
Martino Facchin
767867bacb Revert "Moved -Dawt.useSystemAAFontSettings=on out of java code, where, apparently,"
Fonts on Windows became ugly, reverting whole the commit since it brings no visible changes to Linux and OSX

This reverts commit 6c5e584454.
2015-12-16 10:02:37 +01:00
Martino Facchin
22a37ea41e Merge pull request #4107 from me-no-dev/esp8266-ota
Enable OTA Update mechanism for any mDNS enabled platform
2015-12-16 09:28:13 +01:00
agdl
ef25a2b308 Revert "Fix for serialEvent example"
This reverts commit 4648330a7f.
2015-12-15 12:20:45 +01:00
Martino Facchin
75520c4175 Updating arduino-builder to 1.3.9 2015-12-15 11:46:43 +01:00
Federico Fissore
de5ef66c6f Update revisions.txt 2015-12-14 15:41:46 +01:00
Martino Facchin
e89bb8efce releasing 1.6.7 2015-12-14 14:59:38 +01:00
Federico Fissore
85a79b4a98 Updated translations 2015-12-14 11:19:34 +01:00
Federico Fissore
6c5e584454 Moved -Dawt.useSystemAAFontSettings=on out of java code, where, apparently,
has no effect
2015-12-14 10:03:16 +01:00
Matthijs Kooijman
7eea624dfa Remove EditorListener class
It did not contain any actual code anymore, so it can be removed, along
with the infrastructure for setting it up.
2015-12-11 19:31:16 +01:00
Matthijs Kooijman
ac66a9c64a Change workaround for ctrl-slash handling in RSyntaxTextArea
Previously, there was a handler on the text area that consumed most
KEY_TYPED events with control pressed. This was added a long time ago to
fix a problem with ctrl-slash doing both the toggle comment action and
inserting a /. Further investigation shows that with RSyntaxTextArea
this problem is still present, but is caused by a weird binding on the
slash key that Arduino is not even using. Removing that binding is a
cleaner workaround for this problem, so this commit switches to that
workaround.

Ideally this would be fixed in RSyntaxTextArea, see
https://github.com/bobbylight/RSyntaxTextArea/issues/157
2015-12-11 19:31:16 +01:00
Matthijs Kooijman
f06820713e Make ctrl-tab and ctrl-shift-tab work again
In the previous commit, these bindings were moved to EditorTab and
registered in a cleaner way, but this move also allows more components
to hijack these keystrokes and prevent them from reaching EditorTab.

This commit makes the keybindings work again, by preventing other
components from handling the keys. In particular:
 - JSplitPane had a binding to switch between its two panes, which is
   now removed after creating the JSplitPane.
 - The default focus traversal manager in Swing uses these keys to
   traverse focus (in addition to the the normal tab and shift-tab
   keys). By removing these keys from the set of "focus traversal keys"
   defined for the window, this should be prevented when the focus is on
   any component inside the window.
 - JTextPane didn't respond to the previous modification of the
   window-default focus traversal keys, since it defines its own set (to
   only contain ctrl-tab and ctrl-shift-tab, but not tab and shift-tab,
   for undocumented reasons). To fix this, focus traversal is simply
   disabled on the JTextPane, since this wasn't really being used
   anyway.

There was some code in SketchTextArea that tried to modify the focus
traversal keys for just the text area, which is now removed. This code
wasn't really useful, since focus traversal is disabled for the text
area already. Also, the code contained a bug where it would not actually
set the new set of keys for the backward focus traversal.

Closes #195
2015-12-11 19:31:16 +01:00
Matthijs Kooijman
fc4b2028fa Move ctrl-tab and ctrl-shift-tab handling into EditorHeader
Previously, EditorListener handled these keys, by registering a handler
in the text area. This meant that they would only work while the text
area was focused. By registering the keys as WHEN_IN_FOCUSED_WINDOW
bindings, they can always be handled, and EditorHeader seems like a more
appropriate place.

Note that this does not currently work (so this commit breaks these
keys), since these keys are also handled in a few different places as
well, preventing these newly added keybindings to take effect. This will
be fixed in the next commit.

One additional change is that previously, these keybindings did not work
when the text area was readonly. This was probably a remnant from when
EditorListener took care of a lot of other editing keybindings, but
this does not make much sense anymore now.

Finally, with the old bindings, ctrl-shift-tab did not (seem to) work.
What happened is that the binding for ctrl-tab did not check the shift
state, so both bindings would fire on ctrl-shift-tab, switching forward
and back again, making it seem the keys did not work. The Swing
keybinding mechanism that is now used for these bindings checks the
complete keystroke, including all modifier keys, so this problem is
fixed by this change.

References #195
2015-12-11 19:31:16 +01:00
Matthijs Kooijman
e98285f900 Remove duplicate ctrl+alt+left/right handling
These key combinations were registered as accelerator keystrokes in the
tab bar popup menu, but also handled by EditorListener. This was
probably added in an attempt to work around the broken accelerator keys
on the tab bar popup menus, but in practice this only meant that the
shortcut would sometimes (and now that the accelerator keys are fixed,
always) switch tabs *twice*. Removing the handling from EditorListener
helps to fix this.

References: #4228
2015-12-11 19:31:16 +01:00
Matthijs Kooijman
a3ba935a57 Slightly simplify EditorHeader tab selection menu items
Previously, this would use a single ActionListener object, and pass the
filename of the file to switch to in the action command. This means that
whenever switching the filename needs to be looked up. This commit
instead uses a lambda to capture the index of the tab to switch to for
every tab (so it uses a different ActionListener for each tab).
2015-12-11 19:31:16 +01:00
Matthijs Kooijman
2f5375d523 Fix accelerator keybindings for the tab menu
Some items in this menu had accelerator keys (shortcuts) defined.
Normally, this automatically takes care of registering such keybindings
when the menu item is added to a menu. However, this requires adding the
item (indirectly) to a menubar, which is again added to a window. Since
the tab menu is just a separate popup menu, this did not work.

It seems an attempt was made to fix this by adding the popup menu to the
EditorHeader JComponent, which indeed made the keybindings work.
However, this is a hack at best, and as soon as the popup menu was
opened, it would be moved to another container and again detached when
the menu was closed, breaking the keyboard shortcuts again (re-adding
the popup menu turned out not to work either, then the menu would
actually be drawn on top of the tab bar).

To properly fix this, keybindings for the menu items are added to the
EditorHeader itself. By looking at the existing accelerator keystroke
property of the actions, there is no need to duplicate the keystrokes
themselves, and the displayed value will always match the actually bound
value. To simplify this, some methods are added to the Keys helper
class, which will likely come in handy in other places as well.
2015-12-11 19:31:15 +01:00
Matthijs Kooijman
957331299b Use Actions to simplify the EditorHeader popup menu building
Instead of defining JMenuItems, setting accelerator keys, and attaching
an ActionListener inline, this first defines a list of actions (with a
name, optional accelerator key and using a lambda as the action
listener). Then menu items are added, that simply refer to the
previously defined actions.

The actions are defined in a inner class named Actions, of which one
instance is created. This allows grouping the actions together inside
the `actions` attribute, and allows external access to the actions (in
case the same action is present in multiple menus, or otherwise
performed from other places). This might not be the best way to expose
these actions, and perhaps they should be moved elsewhere, but for now
this seems like a good start.

This adds new helper classes SimpleAction, to allow more consisely
defining Action instances, and a new class Keys, to allow consisely
defining keyboard shortcuts.
2015-12-11 19:31:15 +01:00
Federico Fissore
f702f1a4e7 Updated translations 2015-12-11 17:35:04 +01:00
Matthijs Kooijman
8c176e7429 Remove some old, commented out code 2015-12-11 16:16:01 +01:00
Matthijs Kooijman
f9e1dbd484 Remove unused method 2015-12-11 16:16:01 +01:00
Federico Fissore
78ddbdbfb3 Updating arduino-builder to 1.3.8 2015-12-11 14:34:54 +01:00
Federico Fissore
be2d4c6a52 Merge pull request #4288 from arduino/builder-log-levels
arduino-builder uses log levels
2015-12-11 14:26:37 +01:00
Federico Fissore
98d5ff79eb Upgrading arduino-builder to 1.3.7, which changes the way messages are sent
back to the IDE. Instead of having just stdour and stderr, stdout only is
used, but each message has a log level: info, warn, debug, error
Plain stdout/stderr are still used by child processes
2015-12-11 14:25:13 +01:00
NicoHood
bab9b6c4f7 Added HID_REPORT_TYPE definitions 2015-12-10 10:30:04 +01:00
Federico Fissore
ff13b303d4 Forgot to remove old arduino-builder SHAs 2015-12-04 14:14:15 +01:00
Federico Fissore
580bcb5003 Updating arduino-builder to 1.3.6 2015-12-04 14:03:54 +01:00
Federico Fissore
9a39e5e6ac Some configuration may totally miss network interfaces, even localhost. Fixes #4249 2015-12-04 09:55:32 +01:00