Commit Graph

576 Commits

Author SHA1 Message Date
Cristian Maglie de65c3d89f Updated translations 2016-11-21 18:14:40 +01:00
Cristian Maglie 954941c0aa Updated string 2016-11-21 18:14:38 +01:00
Cristian Maglie 27d1b8d9a1 Merge branch 'windows-dpi-awareness' 2016-11-21 12:43:01 +01:00
Cristian Maglie 5b690b9b9e Win32: use legacy SHGetFolderPath if SHGetKnownFolderPath is not available
This ensure windows XP compatibility
2016-11-21 12:42:58 +01:00
Cristian Maglie 1f1092fb3a Removed debug messages in 39577072 2016-11-21 11:50:24 +01:00
Cristian Maglie 3957707218 Use Win10 API SetThreadDpiAwarenessContext to force DPI Awareness
This commit contains debug messages used for testing purposes.
2016-11-10 16:14:25 +02:00
Cristian Maglie 41092be596 Merge branch 'editor-refactor-fixup' 2016-11-09 14:25:45 +01:00
Cristian Maglie 650840381f Small cleanup, no code change 2016-11-07 14:51:25 +01:00
Cristian Maglie 5b4af28f47 Removed dead code 2016-11-07 14:47:33 +01:00
Cristian Maglie 5244daa5d1 Use the same Comparator to sort EditorTab and SketchFile 2016-11-07 12:13:30 +01:00
Cristian Maglie c35469ea81 Updated translations strings 2016-11-07 10:48:18 +01:00
Cristian Maglie 8c5b064956 Added error message if a referenced core is not found 2016-11-07 10:48:04 +01:00
Cristian Maglie 03225e787f Windows: Autodetection of display resolution 2016-11-04 10:23:49 +02:00
Cristian Maglie d63162b5a1 Added Platform.getSystemDPI() API 2016-11-04 10:23:48 +02:00
Cristian Maglie af70053218 Improved Plaftorm.openUrl(..) for Windows
If a local file is being opened, now the function tries to convert
the path into a URI. This seems to be a more reliable way to open file
on Windows 10 that has a more strict permission policy on cmd.exe.
2016-11-03 19:37:52 +02:00
Cristian Maglie 21ff728c59 Merge remote-tracking branch 'cmaglie/fix-win-paths' 2016-11-03 12:10:24 +01:00
Martino Facchin 12eb09f0b9 Fix NPE if referred core is nonexistent
Fixes #5502
2016-10-27 12:46:44 +02:00
Cristian Maglie 3af99c0847 Use Documents/ArduinoData when running as a Windows UWP
LocalAppData is restricted for Windows Apps, so we are forced to use
a document folder.
2016-10-19 16:28:21 +02:00
Cristian Maglie cb50ebc9c1 Slightly simplified argument passing to arduino-builder 2016-10-19 16:28:21 +02:00
Cristian Maglie 2856600463 Windows: Use Shell32 utility to determine known paths 2016-10-19 16:28:21 +02:00
Cristian Maglie cbf3cdcfbb Added Win32KnownFolders class 2016-10-19 16:28:21 +02:00
Cristian Maglie 7d9ec39ca9 Update jna.jar to 4.2.2 2016-10-19 16:28:20 +02:00
Cristian Maglie 31a9029c1d Updated i18n strings 2016-10-05 15:55:32 +02:00
Cristian Maglie 7883835b84 If an archive is corrupted (CRC error) retry the download
Previously the CRC error was quite annoying to recover because
the user needed to manually delete the corrupted file from the
staging folder (without knowing the exact path of the file to
remove).

Now the IDE tries autonomously to resolve the situation by
removing the file and downloading it again.

Fixes #5394 #4303
2016-10-05 12:56:40 +02:00
Cristian Maglie 653a05273d Check sanitaryName only on basename without extension
This regression originates from:

8725bb1e Clean up sketch loading

before this commit the sketch name sanitization was made on the sketch
name without the extension.
After 8725bb1e instead the name sanitization is made on the filename, so
including the ".ino" extension.

This lead to a weird corner case, caused by the limit of 63 characters
on the sketch name: before 8725bb1e it would be possible to save a sketch
with a name of exactly 63 characters, but after 8725bb1e this sketch will
suddenly becomes invalid becuase the 63 chars name + extension would exceed
the 63 characters limit.

This commit fix this regression.

Fix #5431
2016-10-03 17:00:08 +02:00
Martino Facchin 0a8e7a14f1 Make sure DiscoveryManager is not null when calling it
Solves #5413
2016-10-03 11:07:10 +02:00
Cristian Maglie ec2e9a642a Added all missing @Override annotations 2016-09-29 20:15:57 +02:00
Cristian Maglie 46dfd7603c Removed warning about accessing a non-accessible member of an enclosing type 2016-09-29 20:15:56 +02:00
Cristian Maglie bd7e76533a Removed redundant type specifiers for generics 2016-09-29 20:15:56 +02:00
Cristian Maglie 72a1d928b4 Removed useless cast 2016-09-29 20:15:56 +02:00
Cristian Maglie 4d579f7652 Removed extra semicolon 2016-09-29 20:15:56 +02:00
Cristian Maglie 53e456936d Silenced lint warnings in ContributedLibrary
Comparing strings with `==` operator triggers a lint4j warning.
This refactoring avoids the use of `thisVersion == otherVersion`.
2016-09-29 20:15:55 +02:00
Cristian Maglie 5c097c03c5 Fixed regression: trivial error on String comparison
Fix #5423

The regression has been introduced in:
72f815b Refactor file adding and renaming, and save as handling
2016-09-29 18:21:09 +02:00
Martino Facchin 69fd6debbd Starting version 1.6.13 2016-09-22 12:42:35 +02:00
Cristian Maglie e1c2d0dfcd Updated translations from transifex 2016-09-21 10:07:01 +02:00
Cristian Maglie 0ddc8e6300 Fixed wrong string check 2016-08-31 19:12:09 +02:00
Cristian Maglie 7d27c43ff2 Launch DiscoveryManager after populating indexes 2016-08-31 19:11:24 +02:00
Martino Facchin 84ede60df8 Start board discovery after loading all platforms 2016-08-30 16:22:40 +02:00
Martino Facchin e3177a5ed8 Starting version 1.6.12 2016-08-26 18:27:00 +02:00
Martino Facchin 29e79c8157 update API to v1 2016-08-26 16:42:44 +02:00
Martino Facchin efc07a1c0e Add Cloud API integration
This method discovers if a connected board needs an additional core and helps the user downloading it via BoardManager
2016-08-26 16:42:44 +02:00
Matthijs Kooijman 59b70c8373 Randomize the the build path name
Previously, this used a hash of the sketch filename, so the same build
path would be generated for the same sketch between multiple
compilations. Now that the build path is stored, this requirement has
disappeared, so a random filename can be generated again. While here,
this commit also changes the prefix from "build" to "arduino_build_",
which makes it a bit more clear what the directory's purpose is.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman 4f0af2af57 Store the build path used in Sketch
Previously, everywhere where it was needed, the path was requested from
BaseNoGui. Because the path is based on a hash of the sketch filename,
every caller would get the same path for the same sketch.

However, it makes more sense to store the path used for a given sketch
inside the Sketch object. This prevents having to pass around or
regenerate the build path everywhere, and no longer requires the build
path to be deterministic (though it still is in this commit).

This allows removing some methods and constructors of which two versions
were available - one with a build path argument and one without.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman c4e77a7c3c Let SketchFile figure out if it is primary by itself
Previously, the caller of the constructor did this, but now that
SketchFile keeps a reference to its containing sketch, it can figure it
out itself.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman 1d15c434dc Let `SketchFile.delete()` call `Sketch.removeFile()`
Previously, callers of `SketchFile.delete()` would also call
`Sketch.removeFile()`, but letting SketchFile handle this is more
robust.

This is possible now that SketchFile keeps a reference to Sketch and
makes updating the Sketch file list less fragile.

Eventually this might be further decoupled by letting SketchFile
broadcast a "deleted" event instead.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman aae0bc4c47 Rename `SketchFile.deleteFile()` to `delete()`
The extra "File" in the name was a bit redundant, and this is more
consistent with `Sketch.delete()`.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman ccec28ea45 Move sketch deletion from SketchController into Sketch
This isn't much code, but it makes deletion more consistent with
renaming and saving with the SketchController handling the UI part and
Sketch actually doing the delete.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman 85d48394a4 Merge `Sketch.renameFileTo()` into `SketchFile.renameTo()`
Now that SketchFile keeps a reference to its Sketch,
`SketchFile.renameTo()` can call `Sketch.checkNewFilename()`, so there
is no need for the renaming itself to go through Sketch.

This changes the parameter for `SketchFile.renameTo()` from File to
String, to enforce that only the filename is changed, not the directory
name.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman 74e5228a0f Let SketchFile store a reference to the Sketch it belongs to
This allows simplifying some other things later.
2016-08-26 16:42:44 +02:00
Matthijs Kooijman c0f41cae5d Remove `Base.removeDir()` and `Base.removeDescendants()`
These methods shouldn't really be in Base (or BaseNoGui, which did the
actual work), especially since there is already a
`FileUtils.recursiveDelete()` which just does the same thing. This
commit removes the code from Base and BaseNoGui and instead uses the
method from FileUtils.

There is one difference between these methods: the Base methods did not
delete files if the "compiler.save_build_files" preference was set.
However, the Base methods were only used when deleting a sketch, or
deleting an existing folder before overwriting it on save as, so this
preference didn't actually do what it was supposed to anyway, so
dropping it shouldn't be a problem.
2016-08-26 16:42:44 +02:00