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.
Arduino
-
Arduino is an open-source physical computing platform based on a simple I/O board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing and MaxMSP). The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free at http://www.arduino.cc/en/Main/Software
-
For more information, see the website at: http://www.arduino.cc/ or the forums at: http://www.arduino.cc/forum/
You can also follow Arduino on Twitter at: https://twitter.com/arduino or like Arduino on Facebook at: https://www.facebook.com/official.arduino -
To report a bug in the software or to request a simple enhancement go to: http://github.com/arduino/Arduino/issues
-
More complex requests and technical discussion should go on the Arduino Developers mailing list: https://groups.google.com/a/arduino.cc/forum/#!forum/developers
-
If you're interested in modifying or extending the Arduino software, we strongly suggest discussing your ideas on the Developers mailing list before starting to work on them. That way you can coordinate with the Arduino Team and others, giving your work a higher chance of being integrated into the official release https://groups.google.com/a/arduino.cc/forum/#!forum/developers
Installation
Detailed instructions are in reference/Guide_Windows.html and reference/Guide_MacOSX.html. For Linux, see the Arduino playground: http://www.arduino.cc/playground/Learning/Linux
Credits
Arduino is an open source project, supported by many.
The Arduino team is composed of Massimo Banzi, David Cuartielles, Tom Igoe and David A. Mellis.
Arduino uses GNU avr-gcc toolchain, GCC ARM Embedded toolchain, avr-libc, avrdude, bossac, openOCD and code from Processing and Wiring.
Icon and about image designed by ToDo