diff --git a/.classpath b/.classpath
index 1ebf54417dd..574e1c7f83d 100644
--- a/.classpath
+++ b/.classpath
@@ -23,7 +23,6 @@
-
diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
similarity index 100%
rename from ISSUE_TEMPLATE.md
rename to .github/ISSUE_TEMPLATE.md
diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
similarity index 100%
rename from PULL_REQUEST_TEMPLATE.md
rename to .github/PULL_REQUEST_TEMPLATE.md
diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml
new file mode 100644
index 00000000000..0a2e0a343e6
--- /dev/null
+++ b/.github/workflows/ant.yml
@@ -0,0 +1,34 @@
+name: Java CI
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: Build with Ant
+ working-directory: ./build
+ run: |
+ sed -i 's###' build.xml
+ ant clean dist
+ - name: Install X virtual framebuffer
+ run: sudo apt-get install -y xvfb
+ - name: Run tests
+ working-directory: ./app
+ run: xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" ant test -Drunning-from-github-action=1
+ - name: Publish results
+ uses: actions/upload-artifact@v1
+ with:
+ name: html-results
+ path: app/test-bin/results/html/
+ - name: Cleanup xvfb
+ uses: bcomnes/cleanup-xvfb@v1
diff --git a/.gitignore b/.gitignore
index 0ff213c4047..52ef58c5d36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,6 +48,7 @@ build/linux/*.tar.bz2
build/linux/*.zip
build/linux/libastylej*
build/linux/liblistSerials*
+build/shared/arduino-examples*
build/shared/reference*.zip
build/shared/Edison*.zip
build/shared/Galileo*.zip
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6baf56678b4..e84deb9c3a0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -18,10 +18,11 @@ Thanks for your interest in contributing to this free open source project! Ardui
| Issue topic | Report at |
|-|-|
-| Arduino IDE, Arduino AVR Boards, arduino.cc (but not the Arduino Forum), Library Manager additions | [arduino/Arduino](https://github.com/arduino/Arduino/issues) |
+| Arduino IDE, arduino.cc (but not the Arduino Forum), Library Manager additions | [arduino/Arduino](https://github.com/arduino/Arduino/issues) |
| [Language Reference](https://www.arduino.cc/reference) | [Reference repositories](https://github.com/arduino?q=reference-) |
| Arduino Forum | [arduino/forum-issues](https://github.com/arduino/forum-issues/issues) |
| Arduino libraries | [arduino-libraries](https://github.com/arduino-libraries) |
+| Built-in examples | [arduino/arduino-examples](https://github.com/arduino/arduino-examples/issues) |
| arduino-builder | [arduino/arduino-builder](https://github.com/arduino/arduino-builder/issues) |
| [Arduino Web Editor](https://create.arduino.cc/editor) | [**Create > Editor** section of the Arduino Forum](http://forum.arduino.cc/index.php?board=101.0) |
| Arduino AVR Boards (Uno, Mega, Leonardo, etc.) | [arduino/ArduinoCore-avr](https://github.com/arduino/ArduinoCore-avr/issues) |
@@ -37,8 +38,18 @@ When you're not sure where your issue belongs, report it at [arduino/Arduino](ht
- Search [existing pull requests and issues](https://github.com/arduino/Arduino/issues?q=) to be sure it hasn't already been reported. If you have additional information to provide about an existing issue then please comment on that issue. If you simply want to express your support then use the [Reactions feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments).
- State the newest version of the Arduino IDE you have verified the issue with and which operating system you are using.
- The issue title should be concise yet descriptive. Vague titles make it difficult to know the purpose of the issue when looking through the list of reports and may cause your issue to not be given proper attention.
-- Describe the issue and what behavior you were expecting. Post complete error messages using [Markdown code fencing](https://guides.github.com/features/mastering-markdown/#examples).
-- Provide a full set of steps necessary to reproduce the issue. Demonstration code should be complete, correct, and simplified to the minimum amount of code necessary to reproduce the issue. Please use [Markdown code fencing](https://guides.github.com/features/mastering-markdown/#examples) when posting code.
+- Describe the issue and what behavior you were expecting. Post complete error messages using [Markdown code fencing](https://guides.github.com/features/mastering-markdown/#examples), three backticks before and after the error message:
+ ````
+ ```
+ my error message here
+ ```
+ ````
+- Provide a full set of steps necessary to reproduce the issue. Demonstration code should be complete, correct, and simplified to the minimum amount of code necessary to reproduce the issue. Please use [Markdown code fencing](https://guides.github.com/features/mastering-markdown/#examples), three backticks before and after the code:
+ ````
+ ```
+ my code here
+ ```
+ ````
- Be responsive. We may need you to provide more information, please respond as soon as possible.
- If you find a solution to your problem update your issue report with an explanation of how you were able to fix it and close the issue.
- Library Manager submissions: make sure your library meets all the requirements listed in the [Library Manager FAQ](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ).
@@ -50,7 +61,6 @@ Pull requests are an easy and effective way to submit a proposal for a change to
- Search [existing pull requests](https://github.com/arduino/Arduino/pulls?q=) to see if one has already been submitted for this change. Search the [issues](https://github.com/arduino/Arduino/issues?q=is%3Aissue) to see if there has been a discussion on this topic and whether your pull request can close any issues.
- Code formatting should be consistent with the style used in the existing code.
- Don't leave commented out code. A record of this code is already preserved in the commit history.
-- Note that the Arduino core libraries support many boards and processors. When fixing or adding functionality for one of them, it's easy to break something on the others. Please test your changes on as many processors as possible. Even if you don't have a particular board, try compiling your patch for it to make sure that you haven't introduced any errors.
- All commits must be atomic. This means that the commit completely accomplishes a single task. Each commit should result in fully functional code. Multiple tasks should not be combined in a single commit, but a single task should not be split over multiple commits (e.g. one commit per file modified is not a good practice). For more information see http://www.freshconsulting.com/atomic-commits.
- Each pull request should address a single bug fix or enhancement. This may consist of multiple commits. If you have multiple, unrelated fixes or enhancements to contribute, submit them as separate pull requests.
- Commit messages:
diff --git a/README.md b/README.md
index 0bc3e34fb3a..ab7504dd2fc 100644
--- a/README.md
+++ b/README.md
@@ -1,54 +1,59 @@
-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 https://www.arduino.cc/en/Main/Software
-
-* For more information, see the website at: https://www.arduino.cc/
-or the forums at: https://forum.arduino.cc/
-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:
-https://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 for installation in popular operating systems.
-For Linux: https://www.arduino.cc/en/Guide/Linux (see also the Arduino playground page https://playground.arduino.cc/Learning/Linux)
-For macOS X: https://www.arduino.cc/en/Guide/MacOSX
-For Windows: https://www.arduino.cc/en/Guide/Windows
-
-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](https://gcc.gnu.org/wiki/avr-gcc),
-[GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded),
-[avr-libc](http://www.nongnu.org/avr-libc/),
-[avrdude](http://www.nongnu.org/avrdude/),
-[bossac](http://www.shumatech.com/web/products/bossa),
-[openOCD](http://openocd.org/)
-and code from [Processing](https://www.processing.org)
-and [Wiring](http://wiring.org.co).
-
-Icon and about image designed by [ToDo](https://www.todo.to.it/)
+
+
+
+**Important Notice**: This repository contains the legacy Arduino IDE 1.x, which is no longer in active development. For the latest features and updates, please visit the [Arduino IDE 2.x](https://github.com/arduino/arduino-ide) repository. If you encounter issues related to the newer IDE, please report them there.
+
+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 [https://arduino.cc](https://www.arduino.cc/en/Main/Software).
+
+
+
+## More info at
+
+- [Our website](https://www.arduino.cc/)
+- [The forums](https://forum.arduino.cc/)
+- Follow us on [Twitter](https://twitter.com/arduino)
+- And like us at [Facebook](https://www.facebook.com/official.arduino)
+
+## Bug reports and technical discussions
+
+- To report a *bug* in the software or to request *a simple enhancement*, go to [Github Issues](https://github.com/arduino/Arduino/issues).
+- More complex requests and technical discussions 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](https://groups.google.com/a/arduino.cc/forum/#!forum/developers) *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.
+
+### Security
+
+If you think you found a vulnerability or other security-related bug in this project, please read our [security policy](https://github.com/arduino/Arduino/security/policy) and report the bug to our Security Team 🛡️. Thank you!
+
+e-mail contact: security@arduino.cc
+
+## Installation
+
+Detailed instructions for installation on popular operating systems can be found at:
+
+- [Linux](https://www.arduino.cc/en/Guide/Linux) (see also the [Arduino playground](https://playground.arduino.cc/Learning/Linux))
+- [macOS](https://www.arduino.cc/en/Guide/macOS)
+- [Windows](https://www.arduino.cc/en/Guide/Windows)
+
+## Contents of this repository
+
+This repository contains just the code for the Arduino IDE itself. Originally, it also contained the AVR and SAM Arduino core and libraries (i.e. the code that is compiled as part of a sketch and runs on the actual Arduino device), but those have been moved into their own repositories. They are still automatically downloaded as part of the build process and included in built releases, though.
+
+The repositories for these extra parts can be found here:
+- Non-core specific Libraries are listed under: [Arduino Libraries](https://github.com/arduino-libraries/) (and also a few other places, see `build/build.xml`).
+- The AVR core can be found at: [ArduinoCore-avr](https://github.com/arduino/ArduinoCore-avr).
+- Other cores are not included by default but can be installed through the board manager. Their repositories can also be found under [Arduino GitHub organization](https://github.com/arduino/).
+
+## Building and testing
+
+Instructions for building the IDE and running unit tests can be found on the wiki:
+- [Building Arduino](https://github.com/arduino/Arduino/wiki/Building-Arduino)
+- [Testing Arduino](https://github.com/arduino/Arduino/wiki/Testing-Arduino)
+
+## 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](https://gcc.gnu.org/wiki/avr-gcc), [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), [avr-libc](https://www.nongnu.org/avr-libc/), [avrdude](https://www.nongnu.org/avrdude/), [bossac](http://www.shumatech.com/web/products/bossa), [openOCD](http://openocd.org/), and code from [Processing](https://www.processing.org) and [Wiring](http://wiring.org.co).
+
+Icon and about image designed by [ToDo](https://www.todo.to.it/).
diff --git a/app/.classpath b/app/.classpath
index 4a1f51314f8..ea9425b4990 100644
--- a/app/.classpath
+++ b/app/.classpath
@@ -34,13 +34,10 @@
-
-
+
-
-
diff --git a/app/build.xml b/app/build.xml
index 411fe0f6494..d2e9ad0069d 100644
--- a/app/build.xml
+++ b/app/build.xml
@@ -1,5 +1,5 @@
-
+
@@ -80,10 +80,6 @@
includeAntRuntime="false"
debug="true"
classpathref="class.path" />
-
-
-
-
@@ -109,7 +105,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -121,9 +130,20 @@
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -131,6 +151,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/lib/jackson-module-mrbean-2.9.5.jar b/app/lib/jackson-module-mrbean-2.9.5.jar
deleted file mode 100644
index dc7f5a05721..00000000000
Binary files a/app/lib/jackson-module-mrbean-2.9.5.jar and /dev/null differ
diff --git a/app/lib/jmdns-3.5.3.jar b/app/lib/jmdns-3.5.3.jar
deleted file mode 100644
index d4d9c67f46c..00000000000
Binary files a/app/lib/jmdns-3.5.3.jar and /dev/null differ
diff --git a/app/lib/jmdns-3.5.5.jar b/app/lib/jmdns-3.5.5.jar
new file mode 100644
index 00000000000..a8b65ff2ec7
Binary files /dev/null and b/app/lib/jmdns-3.5.5.jar differ
diff --git a/app/lib/jtouchbar-1.0.0.jar b/app/lib/jtouchbar-1.0.0.jar
index a6bf9a091a6..2c473bec881 100644
Binary files a/app/lib/jtouchbar-1.0.0.jar and b/app/lib/jtouchbar-1.0.0.jar differ
diff --git a/app/lib/log4j-api-2.12.0.jar b/app/lib/log4j-api-2.12.0.jar
deleted file mode 100644
index 93f770d64a9..00000000000
Binary files a/app/lib/log4j-api-2.12.0.jar and /dev/null differ
diff --git a/app/lib/log4j-core-2.12.0.jar b/app/lib/log4j-core-2.12.0.jar
deleted file mode 100644
index fbab720635d..00000000000
Binary files a/app/lib/log4j-core-2.12.0.jar and /dev/null differ
diff --git a/app/src/cc/arduino/contributions/ContributionsSelfCheck.java b/app/src/cc/arduino/contributions/ContributionsSelfCheck.java
index 96fd987b099..50e5e8617ea 100644
--- a/app/src/cc/arduino/contributions/ContributionsSelfCheck.java
+++ b/app/src/cc/arduino/contributions/ContributionsSelfCheck.java
@@ -35,7 +35,6 @@
import cc.arduino.contributions.packages.ContributionInstaller;
import cc.arduino.contributions.packages.filters.UpdatablePlatformPredicate;
import cc.arduino.view.NotificationPopup;
-import org.apache.logging.log4j.LogManager;
import processing.app.*;
import javax.swing.*;
@@ -160,12 +159,14 @@ public void windowGainedFocus(WindowEvent evt) {
private void goToManager(String link) {
try {
- ((UpdatableBoardsLibsFakeURLsHandler) hyperlinkListener).openBoardLibManager(new URL(link));
- }
- catch (Exception e){
- LogManager.getLogger(ContributionsSelfCheck.class).warn("Exception while attempting to go to board manager", e);
+ ((UpdatableBoardsLibsFakeURLsHandler) hyperlinkListener)
+ .openBoardLibManager(new URL(link));
+ } catch (Exception e) {
+ System.err.println("Error while attempting to open board manager: "
+ + e.getMessage());
}
}
+
// callback for boards button
public void onOptionalButton1Callback() {
goToManager(boardsManagerURL);
diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryReleasesComparator.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryReleasesComparator.java
index b302306523c..11436b2ccfb 100644
--- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryReleasesComparator.java
+++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryReleasesComparator.java
@@ -32,7 +32,9 @@
import cc.arduino.contributions.libraries.ContributedLibrary;
import cc.arduino.contributions.libraries.ContributedLibraryReleases;
+import java.util.Arrays;
import java.util.Comparator;
+import java.util.List;
public class ContributedLibraryReleasesComparator implements Comparator {
@@ -47,9 +49,11 @@ public int compare(ContributedLibraryReleases o1, ContributedLibraryReleases o2)
ContributedLibrary lib1 = o1.getLatest();
ContributedLibrary lib2 = o2.getLatest();
- if (lib1.getTypes() == null || lib2.getTypes() == null) {
- return compareName(lib1, lib2);
- }
+ List types1 = lib1.getTypes();
+ List types2 = lib2.getTypes();
+ if (types1 == null) types1 = Arrays.asList();
+ if (types2 == null) types2 = Arrays.asList();
+
if (lib1.getTypes().contains(firstType) && lib2.getTypes().contains(firstType)) {
return compareName(lib1, lib2);
}
diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java
index c5c2e41751c..7c2ecff383f 100644
--- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java
+++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java
@@ -125,6 +125,7 @@ public Component getTableCellEditorComponent(JTable table, Object value,
editorCell.versionToInstallChooser
.setVisible(!mayInstalled.isPresent() && notInstalled.size() > 1);
+ editorCell.setForeground(Color.BLACK);
editorCell.setBackground(new Color(218, 227, 227)); // #dae3e3
return editorCell;
}
diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java
index 865de577630..a5bb940babc 100644
--- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java
+++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java
@@ -3,21 +3,12 @@
import static processing.app.I18n.format;
import static processing.app.I18n.tr;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Insets;
+import java.awt.*;
import java.util.Optional;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTable;
-import javax.swing.JTextPane;
+import javax.swing.*;
import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
import javax.swing.event.HyperlinkEvent;
import javax.swing.text.Document;
import javax.swing.text.html.HTMLDocument;
@@ -42,6 +33,8 @@ public class ContributedLibraryTableCellJPanel extends JPanel {
final JPanel buttonsPanel;
final JPanel inactiveButtonsPanel;
final JLabel statusLabel;
+ final JTextPane description;
+ final TitledBorder titledBorder;
private final String moreInfoLbl = tr("More info");
public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
@@ -49,6 +42,11 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
super();
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ // Actual title set below
+ titledBorder = BorderFactory.createTitledBorder("");
+ titledBorder.setTitleFont(getFont().deriveFont(Font.BOLD));
+ setBorder(titledBorder);
+
moreInfoButton = new JButton(moreInfoLbl);
moreInfoButton.setVisible(false);
installButton = new JButton(tr("Install"));
@@ -77,7 +75,8 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
versionToInstallChooser
.setMinimumSize(new Dimension((int)versionToInstallChooser.getPreferredSize().getWidth() + 50, (int)versionToInstallChooser.getPreferredSize().getHeight()));
- makeNewDescription();
+ description = makeNewDescription();
+ add(description);
buttonsPanel = new JPanel();
buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS));
@@ -121,13 +120,13 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
add(Box.createVerticalStrut(15));
ContributedLibraryReleases releases = (ContributedLibraryReleases) value;
- JTextPane description = makeNewDescription();
// FIXME: happens on macosx, don't know why
if (releases == null)
return;
ContributedLibrary selected = releases.getSelected();
+ titledBorder.setTitle(selected.getName());
Optional mayInstalled = releases.getInstalled();
boolean installable, upgradable;
@@ -149,8 +148,8 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
installButtonPlaceholder.setVisible(!(installable || upgradable));
String name = selected.getName();
- String author = selected.getAuthor();
- // String maintainer = selectedLib.getMaintainer();
+ // String author = selected.getAuthor();
+ String maintainer = selected.getMaintainer();
final String website = selected.getWebsite();
String sentence = selected.getSentence();
String paragraph = selected.getParagraph();
@@ -162,15 +161,15 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
String desc = "";
// Library name...
- desc += format("{0}", name);
+// desc += format("{0}", name);
if (mayInstalled.isPresent() && mayInstalled.get().isIDEBuiltIn()) {
desc += " Built-In ";
}
// ...author...
desc += format("", midcolor);
- if (author != null && !author.isEmpty()) {
- desc += format(" by {0}", author);
+ if (maintainer != null && !maintainer.isEmpty()) {
+ desc += format(" by {0}", maintainer);
}
// ...version.
@@ -197,7 +196,7 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
desc += format("{0}", paragraph);
desc += " ";
}
- if (author != null && !author.isEmpty()) {
+ if (maintainer != null && !maintainer.isEmpty()) {
desc = setButtonOrLink(moreInfoButton, desc, moreInfoLbl, website);
}
@@ -205,7 +204,6 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
description.setText(desc);
// copy description to accessibility context for screen readers to use
description.getAccessibleContext().setAccessibleDescription(desc);
- description.setBackground(Color.WHITE);
// for modelToView to work, the text area has to be sized. It doesn't
// matter if it's visible or not.
@@ -215,14 +213,6 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
InstallerTableCell
.setJTextPaneDimensionToFitContainedText(description,
parentTable.getBounds().width);
-
- if (isSelected) {
- setBackground(parentTable.getSelectionBackground());
- setForeground(parentTable.getSelectionForeground());
- } else {
- setBackground(parentTable.getBackground());
- setForeground(parentTable.getForeground());
- }
}
// same function as in ContributedPlatformTableCellJPanel - is there a utils file this can move to?
@@ -246,9 +236,6 @@ private String setButtonOrLink(JButton button, String desc, String label, String
// TODO Make this a method of Theme
private JTextPane makeNewDescription() {
- if (getComponentCount() > 0) {
- remove(0);
- }
JTextPane description = new JTextPane();
description.setInheritsPopupMenu(true);
Insets margin = description.getMargin();
@@ -274,7 +261,6 @@ private JTextPane makeNewDescription() {
}
});
// description.addKeyListener(new DelegatingKeyListener(parentTable));
- add(description, 0);
return description;
}
@@ -283,4 +269,13 @@ public void setButtonsVisible(boolean enabled) {
buttonsPanel.setVisible(enabled);
inactiveButtonsPanel.setVisible(!enabled);
}
+
+ public void setForeground(Color c) {
+ super.setForeground(c);
+ // The description is not opaque, so copy our foreground color to it.
+ if (description != null)
+ description.setForeground(c);
+ if (titledBorder != null)
+ titledBorder.setTitleColor(c);
+ }
}
diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellRenderer.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellRenderer.java
index bc4b3ffd940..d107f90208a 100644
--- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellRenderer.java
+++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellRenderer.java
@@ -46,6 +46,7 @@ public Component getTableCellRendererComponent(JTable table, Object value,
value, isSelected);
cell.setButtonsVisible(false);
+ cell.setForeground(Color.BLACK);
if (row % 2 == 0) {
cell.setBackground(new Color(236, 241, 241)); // #ecf1f1
} else {
diff --git a/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java b/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java
index 66ad0e44ba5..69ab10006c9 100644
--- a/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java
+++ b/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java
@@ -35,12 +35,12 @@
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
-import java.util.function.Predicate;
import javax.swing.Box;
import javax.swing.JComboBox;
@@ -66,13 +66,16 @@ public class LibraryManagerUI extends InstallerJDialog typeFilter;
@Override
protected FilteredAbstractTableModel createContribModel() {
return new LibrariesIndexTableModel();
}
+ private LibrariesIndexTableModel getContribModel() {
+ return (LibrariesIndexTableModel) contribModel;
+ }
+
@Override
protected TableCellRenderer createCellRenderer() {
return new ContributedLibraryTableCellRenderer();
@@ -115,63 +118,60 @@ public LibraryManagerUI(Frame parent, LibraryInstaller installer) {
}
protected final ActionListener typeChooserActionListener = new ActionListener() {
-
@Override
public void actionPerformed(ActionEvent event) {
DropdownItem selected = (DropdownItem) typeChooser.getSelectedItem();
previousRowAtPoint = -1;
- if (selected != null && typeFilter != selected.getFilterPredicate()) {
- typeFilter = selected.getFilterPredicate();
+ if (selected != null && extraFilter != selected.getFilterPredicate()) {
+ extraFilter = selected.getFilterPredicate();
if (contribTable.getCellEditor() != null) {
contribTable.getCellEditor().stopCellEditing();
}
- updateIndexFilter(filters, categoryFilter.and(typeFilter));
+ updateIndexFilter(filters, categoryFilter.and(extraFilter));
}
}
};
+ private Collection oldCategories = new ArrayList<>();
+ private Collection oldTypes = new ArrayList<>();
+
public void updateUI() {
- DropdownItem previouslySelectedCategory = (DropdownItem) categoryChooser.getSelectedItem();
- DropdownItem previouslySelectedType = (DropdownItem) typeChooser.getSelectedItem();
+ // Check if categories or types have changed
+ Collection categories = BaseNoGui.librariesIndexer.getIndex().getCategories();
+ List types = new LinkedList<>(BaseNoGui.librariesIndexer.getIndex().getTypes());
+ Collections.sort(types, new LibraryTypeComparator());
- categoryChooser.removeActionListener(categoryChooserActionListener);
- typeChooser.removeActionListener(typeChooserActionListener);
+ if (categories.equals(oldCategories) && types.equals(oldTypes)) {
+ return;
+ }
+ oldCategories = categories;
+ oldTypes = types;
// Load categories
categoryFilter = x -> true;
+ categoryChooser.removeActionListener(categoryChooserActionListener);
categoryChooser.removeAllItems();
categoryChooser.addItem(new DropdownAllLibraries());
- Collection categories = BaseNoGui.librariesIndexer.getIndex().getCategories();
for (String category : categories) {
categoryChooser.addItem(new DropdownLibraryOfCategoryItem(category));
}
-
categoryChooser.setEnabled(categoryChooser.getItemCount() > 1);
-
categoryChooser.addActionListener(categoryChooserActionListener);
- if (previouslySelectedCategory != null) {
- categoryChooser.setSelectedItem(previouslySelectedCategory);
- } else {
- categoryChooser.setSelectedIndex(0);
- }
+ categoryChooser.setSelectedIndex(0);
- typeFilter = x -> true;
+ // Load types
+ extraFilter = x -> true;
+ typeChooser.removeActionListener(typeChooserActionListener);
typeChooser.removeAllItems();
typeChooser.addItem(new DropdownAllLibraries());
typeChooser.addItem(new DropdownUpdatableLibrariesItem());
typeChooser.addItem(new DropdownInstalledLibraryItem());
- List types = new LinkedList<>(BaseNoGui.librariesIndexer.getIndex().getTypes());
- Collections.sort(types, new LibraryTypeComparator());
for (String type : types) {
typeChooser.addItem(new DropdownLibraryOfTypeItem(type));
}
typeChooser.setEnabled(typeChooser.getItemCount() > 1);
typeChooser.addActionListener(typeChooserActionListener);
- if (previouslySelectedType != null) {
- typeChooser.setSelectedItem(previouslySelectedType);
- } else {
- typeChooser.setSelectedIndex(0);
- }
+ typeChooser.setSelectedIndex(0);
filterField.setEnabled(contribModel.getRowCount() > 0);
}
@@ -201,8 +201,11 @@ protected void onUpdatePressed() {
try {
setProgressVisible(true, "");
installer.updateIndex(this::setProgress);
- ((LibrariesIndexTableModel) contribModel).update();
onIndexesUpdated();
+ if (contribTable.getCellEditor() != null) {
+ contribTable.getCellEditor().stopCellEditing();
+ }
+ getContribModel().update();
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
@@ -238,12 +241,11 @@ public void onInstallPressed(final ContributedLibrary lib) {
} else {
installer.install(lib, this::setProgress);
}
- // TODO: Do a better job in refreshing only the needed element
+ onIndexesUpdated();
if (contribTable.getCellEditor() != null) {
contribTable.getCellEditor().stopCellEditing();
}
- ((LibrariesIndexTableModel) contribModel).update();
- onIndexesUpdated();
+ getContribModel().update();
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
@@ -270,12 +272,11 @@ public void onRemovePressed(final ContributedLibrary lib) {
try {
setProgressVisible(true, tr("Removing..."));
installer.remove(lib, this::setProgress);
- // TODO: Do a better job in refreshing only the needed element
+ onIndexesUpdated();
if (contribTable.getCellEditor() != null) {
contribTable.getCellEditor().stopCellEditing();
}
- ((LibrariesIndexTableModel) contribModel).update();
- onIndexesUpdated();
+ getContribModel().update();
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java
index 3545b1ff42b..fc516512d44 100644
--- a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java
+++ b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java
@@ -44,12 +44,14 @@ public class ContributedPlatformReleases {
public final List releases;
public final List versions;
public ContributedPlatform selected = null;
+ public boolean deprecated;
public ContributedPlatformReleases(ContributedPlatform platform) {
packager = platform.getParentPackage();
arch = platform.getArchitecture();
releases = new LinkedList<>();
versions = new LinkedList<>();
+ deprecated = platform.isDeprecated();
add(platform);
}
@@ -65,7 +67,9 @@ public void add(ContributedPlatform platform) {
if (version != null) {
versions.add(version);
}
- selected = getLatest();
+ ContributedPlatform latest = getLatest();
+ selected = latest;
+ deprecated = latest.isDeprecated();
}
public ContributedPlatform getInstalled() {
@@ -89,6 +93,10 @@ public ContributedPlatform getSelected() {
return selected;
}
+ public boolean isDeprecated() {
+ return deprecated;
+ }
+
public void select(ContributedPlatform value) {
for (ContributedPlatform plat : releases) {
if (plat == value) {
diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellEditor.java b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellEditor.java
index 26bcb1c9d3b..7fe221fa340 100644
--- a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellEditor.java
+++ b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellEditor.java
@@ -129,7 +129,8 @@ public Component getTableCellEditorComponent(JTable table, Object _value,
cell.versionToInstallChooser
.setVisible(installed == null && uninstalledReleases.size() > 1);
- cell.update(table, _value, true, !installedBuiltIn.isEmpty());
+ cell.update(table, _value, !installedBuiltIn.isEmpty());
+ cell.setForeground(Color.BLACK);
cell.setBackground(new Color(218, 227, 227)); // #dae3e3
return cell;
}
diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java
index d59538823f7..19961c1c97f 100644
--- a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java
+++ b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java
@@ -32,20 +32,11 @@
import static processing.app.I18n.format;
import static processing.app.I18n.tr;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Insets;
-
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTable;
-import javax.swing.JTextPane;
+import java.awt.*;
+
+import javax.swing.*;
import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
import javax.swing.event.HyperlinkEvent;
import javax.swing.text.Document;
import javax.swing.text.html.HTMLDocument;
@@ -75,6 +66,8 @@ public class ContributedPlatformTableCellJPanel extends JPanel {
final JPanel buttonsPanel;
final JPanel inactiveButtonsPanel;
final JLabel statusLabel;
+ final JTextPane description;
+ final TitledBorder titledBorder;
private final String moreInfoLbl = tr("More Info");
private final String onlineHelpLbl = tr("Online Help");
@@ -82,6 +75,11 @@ public ContributedPlatformTableCellJPanel() {
super();
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ // Actual title set by update()
+ titledBorder = BorderFactory.createTitledBorder("");
+ titledBorder.setTitleFont(getFont().deriveFont(Font.BOLD));
+ setBorder(titledBorder);
+
{
installButton = new JButton(tr("Install"));
moreInfoButton = new JButton(moreInfoLbl);
@@ -117,7 +115,8 @@ public ContributedPlatformTableCellJPanel() {
versionToInstallChooser
.setMaximumSize(versionToInstallChooser.getPreferredSize());
- makeNewDescription();
+ description = makeNewDescription();
+ add(description);
buttonsPanel = new JPanel();
buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS));
@@ -184,18 +183,16 @@ private String setButtonOrLink(JButton button, String desc, String label, String
return retString;
}
- void update(JTable parentTable, Object value, boolean isSelected,
- boolean hasBuiltInRelease) {
+ void update(JTable parentTable, Object value, boolean hasBuiltInRelease) {
ContributedPlatformReleases releases = (ContributedPlatformReleases) value;
- JTextPane description = makeNewDescription();
-
// FIXME: happens on macosx, don't know why
if (releases == null) {
return;
}
ContributedPlatform selected = releases.getSelected();
+ titledBorder.setTitle(selected.getName());
ContributedPlatform installed = releases.getInstalled();
boolean removable, installable, upgradable;
@@ -221,7 +218,7 @@ void update(JTable parentTable, Object value, boolean isSelected,
removeButtonPlaceholder.setVisible(!removable);
String desc = "";
- desc += "" + selected.getName() + "";
+// desc += "" + selected.getName() + "";
if (installed != null && installed.isBuiltIn()) {
desc += " Built-In ";
}
@@ -235,6 +232,9 @@ void update(JTable parentTable, Object value, boolean isSelected,
+ format(tr("version {0}"), installed.getParsedVersion())
+ " INSTALLED";
}
+ if (releases.isDeprecated()) {
+ desc += " DEPRECATED";
+ }
desc += " ";
desc += tr("Boards included in this package:") + " ";
@@ -268,7 +268,6 @@ void update(JTable parentTable, Object value, boolean isSelected,
description.setText(desc);
// copy description to accessibility context for screen readers to use
description.getAccessibleContext().setAccessibleDescription(desc);
- description.setBackground(Color.WHITE);
// for modelToView to work, the text area has to be sized. It doesn't
// matter if it's visible or not.
@@ -278,20 +277,9 @@ void update(JTable parentTable, Object value, boolean isSelected,
int width = parentTable.getBounds().width;
InstallerTableCell.setJTextPaneDimensionToFitContainedText(description,
width);
-
- if (isSelected) {
- setBackground(parentTable.getSelectionBackground());
- setForeground(parentTable.getSelectionForeground());
- } else {
- setBackground(parentTable.getBackground());
- setForeground(parentTable.getForeground());
- }
}
private JTextPane makeNewDescription() {
- if (getComponentCount() > 0) {
- remove(0);
- }
JTextPane description = new JTextPane();
description.setInheritsPopupMenu(true);
Insets margin = description.getMargin();
@@ -315,7 +303,6 @@ private JTextPane makeNewDescription() {
Base.openURL(e.getDescription());
}
});
- add(description, 0);
return description;
}
@@ -326,4 +313,12 @@ public void setButtonsVisible(boolean enabled) {
inactiveButtonsPanel.setVisible(!enabled);
}
+ public void setForeground(Color c) {
+ super.setForeground(c);
+ // The description is not opaque, so copy our foreground color to it.
+ if (description != null)
+ description.setForeground(c);
+ if (titledBorder != null)
+ titledBorder.setTitleColor(c);
+ }
}
diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellRenderer.java b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellRenderer.java
index cc4b1d0c186..b6f6aae015c 100644
--- a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellRenderer.java
+++ b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellRenderer.java
@@ -44,8 +44,9 @@ public Component getTableCellRendererComponent(JTable table, Object value,
int column) {
ContributedPlatformTableCellJPanel cell = new ContributedPlatformTableCellJPanel();
cell.setButtonsVisible(false);
- cell.update(table, value, isSelected, false);
+ cell.update(table, value, false);
+ cell.setForeground(Color.BLACK);
if (row % 2 == 0) {
cell.setBackground(new Color(236, 241, 241)); // #ecf1f1
} else {
diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributionIndexTableModel.java b/app/src/cc/arduino/contributions/packages/ui/ContributionIndexTableModel.java
index f143e33172a..2c9939849bb 100644
--- a/app/src/cc/arduino/contributions/packages/ui/ContributionIndexTableModel.java
+++ b/app/src/cc/arduino/contributions/packages/ui/ContributionIndexTableModel.java
@@ -36,6 +36,7 @@
import processing.app.BaseNoGui;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
@@ -47,12 +48,29 @@ public class ContributionIndexTableModel
private final List contributions = new ArrayList<>();
private final String[] columnNames = { "Description" };
private final Class>[] columnTypes = { ContributedPlatform.class };
+ private Predicate filter;
+ private String[] filters;
public void updateIndexFilter(String[] filters,
Predicate filter) {
+ this.filter = filter;
+ this.filters = filters;
+ updateContributions();
+ }
+
+ private void updateContributions() {
contributions.clear();
+
+ // Generate ContributedPlatformReleases from all platform releases
for (ContributedPackage pack : BaseNoGui.indexer.getPackages()) {
for (ContributedPlatform platform : pack.getPlatforms()) {
+ addContribution(platform);
+ }
+ }
+
+ // Filter ContributedPlatformReleases based on search terms
+ contributions.removeIf(releases -> {
+ for (ContributedPlatform platform : releases.releases) {
String compoundTargetSearchText = platform.getName() + "\n"
+ platform.getBoards().stream()
.map(ContributedBoard::getName)
@@ -62,9 +80,25 @@ public void updateIndexFilter(String[] filters,
}
if (!stringContainsAll(compoundTargetSearchText, filters))
continue;
- addContribution(platform);
+ return false;
}
- }
+ return true;
+ });
+
+ // Sort ContributedPlatformReleases and put deprecated platforms to the bottom
+ Collections.sort(contributions, (x,y)-> {
+ if (x.isDeprecated() != y.isDeprecated()) {
+ return x.isDeprecated() ? 1 : -1;
+ }
+ ContributedPlatform x1 = x.getLatest();
+ ContributedPlatform y1 = y.getLatest();
+ int category = (x1.getCategory().equals("Arduino") ? -1 : 0) + (y1.getCategory().equals("Arduino") ? 1 : 0);
+ if (category != 0) {
+ return category;
+ }
+ return x1.getName().compareToIgnoreCase(y1.getName());
+ });
+
fireTableDataChanged();
}
@@ -89,12 +123,12 @@ private boolean stringContainsAll(String string, String set[]) {
private void addContribution(ContributedPlatform platform) {
for (ContributedPlatformReleases contribution : contributions) {
- if (!contribution.shouldContain(platform))
+ if (!contribution.shouldContain(platform)) {
continue;
+ }
contribution.add(platform);
return;
}
-
contributions.add(new ContributedPlatformReleases(platform));
}
@@ -146,6 +180,7 @@ public ContributedPlatform getSelectedRelease(int row) {
}
public void update() {
+ updateContributions();
fireTableDataChanged();
}
diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java b/app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java
index 6f9c903c3c0..c00e91e9d13 100644
--- a/app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java
+++ b/app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java
@@ -29,7 +29,6 @@
package cc.arduino.contributions.packages.ui;
-import cc.arduino.contributions.DownloadableContribution;
import cc.arduino.contributions.packages.ContributedPlatform;
import cc.arduino.contributions.packages.ContributionInstaller;
import cc.arduino.contributions.ui.*;
@@ -41,6 +40,7 @@
import javax.swing.table.TableCellRenderer;
import java.awt.*;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
@@ -92,30 +92,28 @@ public ContributionManagerUI(Frame parent, ContributionInstaller installer) {
this.installer = installer;
}
+ private Collection oldCategories = new ArrayList<>();
+
public void updateUI() {
- DropdownItem previouslySelectedCategory = (DropdownItem) categoryChooser
- .getSelectedItem();
+ // Check if categories have changed
+ Collection categories = BaseNoGui.indexer.getCategories();
+ if (categories.equals(oldCategories)) {
+ return;
+ }
+ oldCategories = categories;
categoryChooser.removeActionListener(categoryChooserActionListener);
-
- filterField.setEnabled(getContribModel().getRowCount() > 0);
-
- categoryChooser.addActionListener(categoryChooserActionListener);
-
// Enable categories combo only if there are two or more choices
+ filterField.setEnabled(getContribModel().getRowCount() > 0);
categoryFilter = x -> true;
categoryChooser.removeAllItems();
categoryChooser.addItem(new DropdownAllCoresItem());
categoryChooser.addItem(new DropdownUpdatableCoresItem());
- Collection categories = BaseNoGui.indexer.getCategories();
for (String s : categories) {
categoryChooser.addItem(new DropdownCoreOfCategoryItem(s));
}
- if (previouslySelectedCategory != null) {
- categoryChooser.setSelectedItem(previouslySelectedCategory);
- } else {
- categoryChooser.setSelectedIndex(0);
- }
+ categoryChooser.addActionListener(categoryChooserActionListener);
+ categoryChooser.setSelectedIndex(0);
}
public void setProgress(Progress progress) {
@@ -142,10 +140,12 @@ public void onUpdatePressed() {
installerThread = new Thread(() -> {
try {
setProgressVisible(true, "");
- List downloadedPackageIndexFiles = installer
- .updateIndex(this::setProgress);
- installer.deleteUnknownFiles(downloadedPackageIndexFiles);
+ installer.updateIndex(this::setProgress);
onIndexesUpdated();
+ if (contribTable.getCellEditor() != null) {
+ contribTable.getCellEditor().stopCellEditing();
+ }
+ getContribModel().update();
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
@@ -171,6 +171,10 @@ public void onInstallPressed(final ContributedPlatform platformToInstall,
}
errors.addAll(installer.install(platformToInstall, this::setProgress));
onIndexesUpdated();
+ if (contribTable.getCellEditor() != null) {
+ contribTable.getCellEditor().stopCellEditing();
+ }
+ getContribModel().update();
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
@@ -209,6 +213,10 @@ public void onRemovePressed(final ContributedPlatform platform,
setProgressVisible(true, tr("Removing..."));
installer.remove(platform);
onIndexesUpdated();
+ if (contribTable.getCellEditor() != null) {
+ contribTable.getCellEditor().stopCellEditing();
+ }
+ getContribModel().update();
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
diff --git a/app/src/cc/arduino/contributions/ui/FilterJTextField.java b/app/src/cc/arduino/contributions/ui/FilterJTextField.java
index f4cb3420340..83aeba45430 100644
--- a/app/src/cc/arduino/contributions/ui/FilterJTextField.java
+++ b/app/src/cc/arduino/contributions/ui/FilterJTextField.java
@@ -101,13 +101,16 @@ private void spawnTimer() {
}
public void applyFilter() {
- String filter = showingHint ? "" : getText();
- filter = filter.toLowerCase();
-
- // Replace anything but 0-9, a-z, or : with a space
- filter = filter.replaceAll("[^\\x30-\\x39^\\x61-\\x7a^\\x3a]", " ");
-
- onFilter(filter.split(" "));
+ String[] filteredText = new String[0];
+ if (!showingHint) {
+ String filter = getText().toLowerCase();
+
+ // Replace anything but 0-9, a-z, or : with a space
+ filter = filter.replaceAll("[^\\x30-\\x39^\\x61-\\x7a^\\x3a]", " ");
+
+ filteredText = filter.split(" ");
+ }
+ onFilter(filteredText);
}
protected void onFilter(String[] strings) {
diff --git a/app/src/cc/arduino/contributions/ui/InstallerJDialog.java b/app/src/cc/arduino/contributions/ui/InstallerJDialog.java
index dd2998bc441..8abff8f3454 100644
--- a/app/src/cc/arduino/contributions/ui/InstallerJDialog.java
+++ b/app/src/cc/arduino/contributions/ui/InstallerJDialog.java
@@ -71,7 +71,6 @@
import cc.arduino.contributions.ui.listeners.AbstractKeyListener;
import processing.app.Base;
-import processing.app.Theme;
public abstract class InstallerJDialog extends JDialog {
@@ -82,6 +81,7 @@ public abstract class InstallerJDialog extends JDialog {
protected final FilterJTextField filterField;
protected final JPanel filtersContainer;
// Currently selected category and filters
+ protected Predicate extraFilter = x -> true;
protected Predicate categoryFilter;
protected String[] filters;
protected final String noConnectionErrorMessage;
@@ -180,7 +180,6 @@ public void windowOpened(WindowEvent e) {
contribTable.setDragEnabled(false);
contribTable.setIntercellSpacing(new Dimension(0, 1));
contribTable.setShowVerticalLines(false);
- contribTable.setSelectionBackground(Theme.getColor("status.notice.bgcolor"));
contribTable.addKeyListener(new AbstractKeyListener() {
@Override
@@ -330,7 +329,6 @@ private void setErrorMessageVisible(boolean visible) {
}
protected final ActionListener categoryChooserActionListener = new ActionListener() {
-
@Override
public void actionPerformed(ActionEvent event) {
DropdownItem selected = (DropdownItem) categoryChooser.getSelectedItem();
@@ -340,7 +338,7 @@ public void actionPerformed(ActionEvent event) {
if (contribTable.getCellEditor() != null) {
contribTable.getCellEditor().stopCellEditing();
}
- updateIndexFilter(filters, categoryFilter);
+ updateIndexFilter(filters, categoryFilter.and(extraFilter));
}
}
};
diff --git a/app/src/cc/arduino/view/preferences/Preferences.java b/app/src/cc/arduino/view/preferences/Preferences.java
index 8711ac8b577..005d2f83e54 100644
--- a/app/src/cc/arduino/view/preferences/Preferences.java
+++ b/app/src/cc/arduino/view/preferences/Preferences.java
@@ -840,10 +840,14 @@ private void savePreferencesData() {
PreferencesData.set(Constants.PREF_PROXY_MANUAL_TYPE, manualProxyTypeButtonGroup.getSelection().getActionCommand());
PreferencesData.set(Constants.PREF_PROXY_MANUAL_HOSTNAME, manualProxyHostName.getText());
PreferencesData.set(Constants.PREF_PROXY_MANUAL_PORT, manualProxyPort.getText());
- PreferencesData.set(Constants.PREF_PROXY_MANUAL_USERNAME, manualProxyUsername.getText());
- PreferencesData.set(Constants.PREF_PROXY_MANUAL_PASSWORD, String.valueOf(manualProxyPassword.getPassword()));
- PreferencesData.set(Constants.PREF_PROXY_AUTO_USERNAME, autoProxyUsername.getText());
- PreferencesData.set(Constants.PREF_PROXY_AUTO_PASSWORD, String.valueOf(autoProxyPassword.getPassword()));
+ if (PreferencesData.get(Constants.PREF_PROXY_TYPE).equals(Constants.PROXY_TYPE_MANUAL)) {
+ PreferencesData.set(Constants.PREF_PROXY_USERNAME, manualProxyUsername.getText());
+ PreferencesData.set(Constants.PREF_PROXY_PASSWORD, String.valueOf(manualProxyPassword.getPassword()));
+ }
+ if (PreferencesData.get(Constants.PREF_PROXY_TYPE).equals(Constants.PROXY_TYPE_AUTO)) {
+ PreferencesData.set(Constants.PREF_PROXY_USERNAME, autoProxyUsername.getText());
+ PreferencesData.set(Constants.PREF_PROXY_PASSWORD, String.valueOf(autoProxyPassword.getPassword()));
+ }
}
private void showPreferencesData() {
@@ -924,16 +928,16 @@ private void showPreferencesData() {
if (!PreferencesData.get(Constants.PREF_PROXY_PAC_URL, "").isEmpty()) {
autoProxyUsePAC.setSelected(true);
autoProxyPACURL.setText(PreferencesData.get(Constants.PREF_PROXY_PAC_URL));
- autoProxyUsername.setText(PreferencesData.get(Constants.PREF_PROXY_AUTO_USERNAME));
- autoProxyPassword.setText(PreferencesData.get(Constants.PREF_PROXY_AUTO_PASSWORD));
+ autoProxyUsername.setText(PreferencesData.get(Constants.PREF_PROXY_USERNAME));
+ autoProxyPassword.setText(PreferencesData.get(Constants.PREF_PROXY_PASSWORD));
}
} else {
manualProxy.setSelected(true);
manualProxyFieldsSetEnabled(true);
manualProxyHostName.setText(PreferencesData.get(Constants.PREF_PROXY_MANUAL_HOSTNAME));
manualProxyPort.setText(PreferencesData.get(Constants.PREF_PROXY_MANUAL_PORT));
- manualProxyUsername.setText(PreferencesData.get(Constants.PREF_PROXY_MANUAL_USERNAME));
- manualProxyPassword.setText(PreferencesData.get(Constants.PREF_PROXY_MANUAL_PASSWORD));
+ manualProxyUsername.setText(PreferencesData.get(Constants.PREF_PROXY_USERNAME));
+ manualProxyPassword.setText(PreferencesData.get(Constants.PREF_PROXY_PASSWORD));
}
String selectedManualProxyType = PreferencesData.get(Constants.PREF_PROXY_MANUAL_TYPE, Constants.PROXY_MANUAL_TYPE_HTTP);
diff --git a/app/src/log4j2.xml b/app/src/log4j2.xml
deleted file mode 100644
index 64f6b8f063f..00000000000
--- a/app/src/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.}:%L [%t] %m%n
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/processing/app/AbstractMonitor.java b/app/src/processing/app/AbstractMonitor.java
index 42c095aad13..b6ba0d7652e 100644
--- a/app/src/processing/app/AbstractMonitor.java
+++ b/app/src/processing/app/AbstractMonitor.java
@@ -1,7 +1,6 @@
package processing.app;
import cc.arduino.packages.BoardPort;
-import cc.arduino.packages.DiscoveryManager;
import processing.app.legacy.PApplet;
import javax.swing.*;
@@ -10,7 +9,6 @@
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import java.util.List;
@SuppressWarnings("serial")
public abstract class AbstractMonitor extends JFrame implements ActionListener {
@@ -85,7 +83,7 @@ public void actionPerformed(ActionEvent ae) {
suspend();
}
} else {
- if (closed && (Editor.isUploading() == false)) {
+ if (closed && !Editor.isUploading()) {
resume(boardPort);
}
}
diff --git a/app/src/processing/app/AbstractTextMonitor.java b/app/src/processing/app/AbstractTextMonitor.java
index 4e35d4e448f..00eabb20649 100644
--- a/app/src/processing/app/AbstractTextMonitor.java
+++ b/app/src/processing/app/AbstractTextMonitor.java
@@ -3,6 +3,7 @@
import static processing.app.I18n.tr;
import java.awt.BorderLayout;
+import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
@@ -170,17 +171,28 @@ public void windowGainedFocus(WindowEvent e) {
}
@Override
- protected void onEnableWindow(boolean enable)
- {
- textArea.setEnabled(enable);
- clearButton.setEnabled(enable);
+ protected void onEnableWindow(boolean enable) {
+ // never actually disable textArea, so people can
+ // still select & copy text, even when the port
+ // is closed or disconnected
+ textArea.setEnabled(true);
+ if (enable) {
+ // setting these to null for system default
+ // gives a wrong gray background on Windows
+ // so assume black text on white background
+ textArea.setForeground(Color.BLACK);
+ textArea.setBackground(Color.WHITE);
+ } else {
+ // In theory, UIManager.getDefaults() should
+ // give us the system's colors for disabled
+ // windows. But it doesn't seem to work. :(
+ textArea.setForeground(new Color(64, 64, 64));
+ textArea.setBackground(new Color(238, 238, 238));
+ }
+ textArea.invalidate();
scrollPane.setEnabled(enable);
textField.setEnabled(enable);
sendButton.setEnabled(enable);
- autoscrollBox.setEnabled(enable);
- addTimeStampBox.setEnabled(enable);
- lineEndings.setEnabled(enable);
- serialRates.setEnabled(enable);
}
public void onSendCommand(ActionListener listener) {
diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java
index d8e9b1cac45..cdac3059f6d 100644
--- a/app/src/processing/app/Base.java
+++ b/app/src/processing/app/Base.java
@@ -141,7 +141,7 @@ static public void main(String args[]) throws Exception {
if (OSUtils.isMacOS()) {
System.setProperty("apple.laf.useScreenMenuBar",
String.valueOf(!System.getProperty("os.version").startsWith("10.13")
- || com.apple.eawt.Application.getApplication().isAboutMenuItemPresent()));
+ || isMacOsAboutMenuItemPresent()));
ThinkDifferent.init();
}
@@ -154,6 +154,11 @@ static public void main(String args[]) throws Exception {
}
}
+ @SuppressWarnings("deprecation")
+ public static boolean isMacOsAboutMenuItemPresent() {
+ return com.apple.eawt.Application.getApplication().isAboutMenuItemPresent();
+ }
+
static public void initLogger() {
Handler consoleHandler = new ConsoleLogger();
consoleHandler.setLevel(Level.ALL);
@@ -207,9 +212,6 @@ public Base(String[] args) throws Exception {
BaseNoGui.getPlatform().init();
BaseNoGui.initPortableFolder();
- // This configure the logs root folder
- System.out.println("Set log4j store directory " + BaseNoGui.getSettingsFolder().getAbsolutePath());
- System.setProperty("log4j.dir", BaseNoGui.getSettingsFolder().getAbsolutePath());
// Look for a possible "--preferences-file" parameter and load preferences
BaseNoGui.initParameters(args);
@@ -307,8 +309,7 @@ public Base(String[] args) throws Exception {
BaseNoGui.getPlatform(), gpgDetachedSignatureVerifier);
ProgressListener progressListener = new ConsoleProgressListener();
- List downloadedPackageIndexFiles = contributionInstaller.updateIndex(progressListener);
- contributionInstaller.deleteUnknownFiles(downloadedPackageIndexFiles);
+ contributionInstaller.updateIndex(progressListener);
indexer.parseIndex();
indexer.syncWithFilesystem();
@@ -618,7 +619,12 @@ private int[] retrieveSketchLocation(String index) {
.get("last.sketch" + index + ".location");
if (locationStr == null)
return defaultEditorLocation();
- return PApplet.parseInt(PApplet.split(locationStr, ','));
+
+ int location[] = PApplet.parseInt(PApplet.split(locationStr, ','));
+ if (location[0] > screen.width || location[1] > screen.height)
+ return defaultEditorLocation();
+
+ return location;
}
protected void storeRecentSketches(SketchController sketch) {
@@ -986,9 +992,9 @@ public boolean handleQuit() {
// kill uploader (if still alive)
UploaderUtils uploaderInstance = new UploaderUtils();
Uploader uploader = uploaderInstance.getUploaderByPreferences(false);
- if (uploader != null && uploader.programmerPid != null && uploader.programmerPid.isAlive()) {
+ if (uploader != null && Uploader.programmerPid != null && Uploader.programmerPid.isAlive()) {
// kill the stuck programmer
- uploader.programmerPid.destroyForcibly();
+ Uploader.programmerPid.destroyForcibly();
}
if (handleQuitEach()) {
@@ -1431,8 +1437,9 @@ public void actionPerformed(ActionEvent actionevent) {
String filterText = "";
String dropdownItem = "";
if (actionevent instanceof Event) {
- filterText = ((Event) actionevent).getPayload().get("filterText").toString();
- dropdownItem = ((Event) actionevent).getPayload().get("dropdownItem").toString();
+ Event e = ((Event) actionevent);
+ filterText = e.getPayload().get("filterText").toString();
+ dropdownItem = e.getPayload().get("dropdownItem").toString();
}
try {
openBoardsManager(filterText, dropdownItem);
@@ -1459,6 +1466,7 @@ public void actionPerformed(ActionEvent actionevent) {
customMenu.putClientProperty("platform", getPlatformUniqueId(targetPlatform));
customMenu.putClientProperty("removeOnWindowDeactivation", true);
boardsCustomMenus.add(customMenu);
+ MenuScroller.setScrollerFor(customMenu);
}
}
}
@@ -1468,24 +1476,25 @@ public void actionPerformed(ActionEvent actionevent) {
ButtonGroup boardsButtonGroup = new ButtonGroup();
Map buttonGroupsMap = new HashMap<>();
+ List platformMenus = new ArrayList<>();
+
// Cycle through all packages
- boolean first = true;
for (TargetPackage targetPackage : BaseNoGui.packages.values()) {
// For every package cycle through all platform
for (TargetPlatform targetPlatform : targetPackage.platforms()) {
- // Add a separator from the previous platform
- if (!first)
- boardMenu.add(new JSeparator());
- first = false;
-
// Add a title for each platform
String platformLabel = targetPlatform.getPreferences().get("name");
- if (platformLabel != null && !targetPlatform.getBoards().isEmpty()) {
- JMenuItem menuLabel = new JMenuItem(tr(platformLabel));
- menuLabel.setEnabled(false);
- boardMenu.add(menuLabel);
- }
+ if (platformLabel == null)
+ platformLabel = targetPackage.getId() + "-" + targetPlatform.getId();
+
+ // add an hint that this core lives in sketchbook
+ if (targetPlatform.isInSketchbook())
+ platformLabel += " (in sketchbook)";
+
+ JMenu platformBoardsMenu = new JMenu(platformLabel);
+ MenuScroller.setScrollerFor(platformBoardsMenu);
+ platformMenus.add(platformBoardsMenu);
// Cycle through all boards of this platform
for (TargetBoard board : targetPlatform.getBoards().values()) {
@@ -1494,14 +1503,40 @@ public void actionPerformed(ActionEvent actionevent) {
JMenuItem item = createBoardMenusAndCustomMenus(boardsCustomMenus, menuItemsToClickAfterStartup,
buttonGroupsMap,
board, targetPlatform, targetPackage);
- boardMenu.add(item);
+ platformBoardsMenu.add(item);
boardsButtonGroup.add(item);
}
}
}
+ platformMenus.sort((x,y) -> x.getText().compareToIgnoreCase(y.getText()));
+
+ JMenuItem firstBoardItem = null;
+ if (platformMenus.size() == 1) {
+ // When just one platform exists, add the board items directly,
+ // rather than using a submenu
+ for (Component boardItem : platformMenus.get(0).getMenuComponents()) {
+ boardMenu.add(boardItem);
+ if (firstBoardItem == null)
+ firstBoardItem = (JMenuItem)boardItem;
+ }
+ } else {
+ // For multiple platforms, use submenus
+ for (JMenu platformMenu : platformMenus) {
+ if (firstBoardItem == null && platformMenu.getItemCount() > 0)
+ firstBoardItem = platformMenu.getItem(0);
+ boardMenu.add(platformMenu);
+ }
+ }
+
+ if (firstBoardItem == null) {
+ throw new IllegalStateException("No available boards");
+ }
+
+ // If there is no current board yet (first startup, or selected
+ // board no longer defined), select first available board.
if (menuItemsToClickAfterStartup.isEmpty()) {
- menuItemsToClickAfterStartup.add(selectFirstEnabledMenuItem(boardMenu));
+ menuItemsToClickAfterStartup.add(firstBoardItem);
}
for (JMenuItem menuItemToClick : menuItemsToClickAfterStartup) {
@@ -1537,6 +1572,7 @@ public void actionPerformed(ActionEvent actionevent) {
onBoardOrPortChange();
rebuildImportMenu(Editor.importMenu);
rebuildExamplesMenu(Editor.examplesMenu);
+ rebuildProgrammerMenu();
}
};
action.putValue("b", board);
@@ -1565,7 +1601,7 @@ public void actionPerformed(ActionEvent e) {
};
List boards = (List) subAction.getValue("board");
if (boards == null) {
- boards = new ArrayList();
+ boards = new ArrayList<>();
}
boards.add(board);
subAction.putValue("board", boards);
@@ -1655,40 +1691,50 @@ private static JMenuItem selectVisibleSelectedOrFirstMenuItem(JMenu menu) {
throw new IllegalStateException("Menu has no enabled items");
}
- private static JMenuItem selectFirstEnabledMenuItem(JMenu menu) {
- for (int i = 1; i < menu.getItemCount(); i++) {
- JMenuItem item = menu.getItem(i);
- if (item != null && item.isEnabled()) {
- return item;
+ public void rebuildProgrammerMenu() {
+ programmerMenus = new LinkedList<>();
+ ButtonGroup group = new ButtonGroup();
+
+ TargetBoard board = BaseNoGui.getTargetBoard();
+ if (board != null) {
+ TargetPlatform boardPlatform = board.getContainerPlatform();
+ TargetPlatform corePlatform = null;
+
+ String core = board.getPreferences().get("build.core");
+ if (core != null && core.contains(":")) {
+ String[] split = core.split(":", 2);
+ corePlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
}
+
+ addProgrammersForPlatform(boardPlatform, programmerMenus, group);
+ if (corePlatform != null)
+ addProgrammersForPlatform(corePlatform, programmerMenus, group);
}
- throw new IllegalStateException("Menu has no enabled items");
- }
- public void rebuildProgrammerMenu() {
- programmerMenus = new LinkedList<>();
+ if (programmerMenus.isEmpty()) {
+ JMenuItem item = new JMenuItem(tr("No programmers available for this board"));
+ item.setEnabled(false);
+ programmerMenus.add(item);
+ }
+ }
- ButtonGroup group = new ButtonGroup();
- for (TargetPackage targetPackage : BaseNoGui.packages.values()) {
- for (TargetPlatform targetPlatform : targetPackage.platforms()) {
- for (String programmer : targetPlatform.getProgrammers().keySet()) {
- String id = targetPackage.getId() + ":" + programmer;
+ public void addProgrammersForPlatform(TargetPlatform platform, List menus, ButtonGroup group) {
+ for (String programmer : platform.getProgrammers().keySet()) {
+ String id = platform.getContainerPackage().getId() + ":" + programmer;
- @SuppressWarnings("serial")
- AbstractAction action = new AbstractAction(targetPlatform.getProgrammer(programmer).get("name")) {
- public void actionPerformed(ActionEvent actionevent) {
- PreferencesData.set("programmer", "" + getValue("id"));
- }
- };
- action.putValue("id", id);
- JMenuItem item = new JRadioButtonMenuItem(action);
- if (PreferencesData.get("programmer").equals(id)) {
- item.setSelected(true);
- }
- group.add(item);
- programmerMenus.add(item);
+ @SuppressWarnings("serial")
+ AbstractAction action = new AbstractAction(platform.getProgrammer(programmer).get("name")) {
+ public void actionPerformed(ActionEvent actionevent) {
+ PreferencesData.set("programmer", "" + getValue("id"));
}
+ };
+ action.putValue("id", id);
+ JMenuItem item = new JRadioButtonMenuItem(action);
+ if (PreferencesData.get("programmer").equals(id)) {
+ item.setSelected(true);
}
+ group.add(item);
+ menus.add(item);
}
}
@@ -1958,6 +2004,7 @@ public void keyPressed(KeyEvent e) {
Base.this.handleFontSizeChange(-1);
}
break;
+ default:
}
}
}
@@ -2116,60 +2163,6 @@ static public void registerWindowCloseKeys(JRootPane root,
// .................................................................
- static public void showReference(String filename) {
- showReference("reference/www.arduino.cc/en", filename);
- }
-
- static public void showReference(String prefix, String filename) {
- File referenceFolder = getContentFile(prefix);
- File referenceFile = new File(referenceFolder, filename);
- if (!referenceFile.exists())
- referenceFile = new File(referenceFolder, filename + ".html");
-
- if(referenceFile.exists()){
- openURL(referenceFile.getAbsolutePath());
- }else{
- showWarning(tr("Problem Opening URL"), format(tr("Could not open the URL\n{0}"), referenceFile), null);
- }
- }
-
- public static void showEdisonGettingStarted() {
- showReference("reference/Edison_help_files", "ArduinoIDE_guide_edison");
- }
-
- static public void showArduinoGettingStarted() {
- if (OSUtils.isMacOS()) {
- showReference("Guide/MacOSX");
- } else if (OSUtils.isWindows()) {
- showReference("Guide/Windows");
- } else {
- openURL("http://www.arduino.cc/playground/Learning/Linux");
- }
- }
-
- static public void showReference() {
- showReference("Reference/HomePage");
- }
-
-
- static public void showEnvironment() {
- showReference("Guide/Environment");
- }
-
-
- static public void showTroubleshooting() {
- showReference("Guide/Troubleshooting");
- }
-
-
- static public void showFAQ() {
- showReference("Main/FAQ");
- }
-
-
- // .................................................................
-
-
/**
* "No cookie for you" type messages. Nothing fatal or all that
* much of a bummer, but something to notify the user about.
diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java
index da94f9c9942..a307bde8fbb 100644
--- a/app/src/processing/app/Editor.java
+++ b/app/src/processing/app/Editor.java
@@ -46,9 +46,11 @@
import java.io.FileFilter;
import java.io.FilenameFilter;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -80,8 +82,6 @@
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
import javax.swing.text.BadLocationException;
-import javax.swing.text.Document;
-import javax.swing.text.Element;
import org.fife.ui.rsyntaxtextarea.folding.FoldManager;
@@ -97,7 +97,6 @@
import cc.arduino.view.findreplace.FindReplace;
import jssc.SerialPortException;
import processing.app.debug.RunnerException;
-import processing.app.debug.TargetBoard;
import processing.app.forms.PasswordAuthorizationDialog;
import processing.app.helpers.DocumentTextChangeListener;
import processing.app.helpers.Keys;
@@ -761,6 +760,20 @@ private JMenu buildToolsMenu() {
toolsMenu.add(item);
toolsMenu.addMenuListener(new StubMenuListener() {
+ public JMenuItem getSelectedItemRecursive(JMenu menu) {
+ int count = menu.getItemCount();
+ for (int i=0; i < count; i++) {
+ JMenuItem item = menu.getItem(i);
+
+ if ((item instanceof JMenu))
+ item = getSelectedItemRecursive((JMenu)item);
+
+ if (item != null && item.isSelected())
+ return item;
+ }
+ return null;
+ }
+
public void menuSelected(MenuEvent e) {
//System.out.println("Tools menu selected.");
populatePortMenu();
@@ -772,15 +785,9 @@ public void menuSelected(MenuEvent e) {
String basename = name;
int index = name.indexOf(':');
if (index > 0) basename = name.substring(0, index);
- String sel = null;
- int count = menu.getItemCount();
- for (int i=0; i < count; i++) {
- JMenuItem item = menu.getItem(i);
- if (item != null && item.isSelected()) {
- sel = item.getText();
- if (sel != null) break;
- }
- }
+
+ JMenuItem item = getSelectedItemRecursive(menu);
+ String sel = item != null ? item.getText() : null;
if (sel == null) {
if (!name.equals(basename)) menu.setText(basename);
} else {
@@ -1129,61 +1136,33 @@ private JMenu buildHelpMenu() {
menu.setMnemonic(KeyEvent.VK_H);
JMenuItem item = new JMenuItem(tr("Getting Started"));
- item.addActionListener(event -> Base.showArduinoGettingStarted());
+ item.addActionListener(event -> Base.openURL("https://www.arduino.cc/en/Guide"));
menu.add(item);
item = new JMenuItem(tr("Environment"));
- item.addActionListener(event -> Base.showEnvironment());
+ item.addActionListener(event -> Base.openURL("https://www.arduino.cc/en/Guide/Environment"));
menu.add(item);
item = new JMenuItem(tr("Troubleshooting"));
- item.addActionListener(event -> Base.showTroubleshooting());
+ item.addActionListener(event -> Base.openURL("https://support.arduino.cc/hc/en-us"));
menu.add(item);
item = new JMenuItem(tr("Reference"));
- item.addActionListener(event -> Base.showReference());
- menu.add(item);
-
- menu.addSeparator();
-
- item = new JMenuItem(tr("Galileo Help"));
- item.setEnabled(false);
- menu.add(item);
-
- item = new JMenuItem(tr("Getting Started"));
- item.addActionListener(event -> Base.showReference("reference/Galileo_help_files", "ArduinoIDE_guide_galileo"));
- menu.add(item);
-
- item = new JMenuItem(tr("Troubleshooting"));
- item.addActionListener(event -> Base.showReference("reference/Galileo_help_files", "Guide_Troubleshooting_Galileo"));
- menu.add(item);
-
- menu.addSeparator();
-
- item = new JMenuItem(tr("Edison Help"));
- item.setEnabled(false);
- menu.add(item);
-
- item = new JMenuItem(tr("Getting Started"));
- item.addActionListener(event -> Base.showReference("reference/Edison_help_files", "ArduinoIDE_guide_edison"));
- menu.add(item);
-
- item = new JMenuItem(tr("Troubleshooting"));
- item.addActionListener(event -> Base.showReference("reference/Edison_help_files", "Guide_Troubleshooting_Edison"));
+ item.addActionListener(event -> Base.openURL("https://www.arduino.cc/reference/en/"));
menu.add(item);
menu.addSeparator();
item = newJMenuItemShift(tr("Find in Reference"), 'F');
- item.addActionListener(event -> handleFindReference(event));
+ item.addActionListener(event -> handleFindReference(getCurrentTab().getCurrentKeyword()));
menu.add(item);
item = new JMenuItem(tr("Frequently Asked Questions"));
- item.addActionListener(event -> Base.showFAQ());
+ item.addActionListener(event -> Base.openURL("https://support.arduino.cc/hc/en-us"));
menu.add(item);
item = new JMenuItem(tr("Visit Arduino.cc"));
- item.addActionListener(event -> Base.openURL(tr("http://www.arduino.cc/")));
+ item.addActionListener(event -> Base.openURL("https://www.arduino.cc/"));
menu.add(item);
// macosx already has its own about menu
@@ -1473,8 +1452,10 @@ public void selectTab(final int index) {
// This must be run in the GUI thread
SwingUtilities.invokeLater(() -> {
codePanel.removeAll();
- codePanel.add(tabs.get(index), BorderLayout.CENTER);
- tabs.get(index).requestFocusInWindow(); // get the caret blinking
+ EditorTab selectedTab = tabs.get(index);
+ codePanel.add(selectedTab, BorderLayout.CENTER);
+ selectedTab.applyPreferences();
+ selectedTab.requestFocusInWindow(); // get the caret blinking
// For some reason, these are needed. Revalidate says it should be
// automatically called when components are added or removed, but without
// it, the component switched to is not displayed. repaint() is needed to
@@ -1576,20 +1557,25 @@ protected void removeTab(SketchFile file) throws IOException {
tabs.remove(index);
}
+
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- void handleFindReference(ActionEvent e) {
- String text = getCurrentTab().getCurrentKeyword();
+ void handleFindReference(String text) {
String referenceFile = base.getPdeKeywords().getReference(text);
+ String q;
if (referenceFile == null) {
- statusNotice(I18n.format(tr("No reference available for \"{0}\""), text));
+ q = text;
+ } else if (referenceFile.startsWith("Serial_")) {
+ q = referenceFile.substring(7);
} else {
- if (referenceFile.startsWith("Serial_")) {
- Base.showReference("Serial/" + referenceFile.substring("Serial_".length()));
- } else {
- Base.showReference("Reference/" + referenceFile);
- }
+ q = referenceFile;
+ }
+ try {
+ Base.openURL("https://www.arduino.cc/search?tab=&q="
+ + URLEncoder.encode(q, "UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
}
}
@@ -2119,6 +2105,11 @@ static public boolean isUploading() {
private void resumeOrCloseSerialMonitor() {
// Return the serial monitor window to its initial state
if (serialMonitor != null) {
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ // noop
+ }
BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port"));
long sleptFor = 0;
while (boardPort == null && sleptFor < MAX_TIME_AWAITING_FOR_RESUMING_SERIAL_MONITOR) {
@@ -2602,12 +2593,7 @@ private void statusEmpty() {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
protected void onBoardOrPortChange() {
- TargetBoard board = BaseNoGui.getTargetBoard();
- if (board != null)
- lineStatus.setBoardName(board.getName());
- else
- lineStatus.setBoardName("-");
- lineStatus.setPort(PreferencesData.get("serial.port"));
+ lineStatus.updateBoardAndPort();
lineStatus.repaint();
}
diff --git a/app/src/processing/app/EditorConsole.java b/app/src/processing/app/EditorConsole.java
index 15c78df2dda..3942908a1da 100644
--- a/app/src/processing/app/EditorConsole.java
+++ b/app/src/processing/app/EditorConsole.java
@@ -27,6 +27,8 @@
import javax.swing.text.*;
import java.awt.*;
import java.io.PrintStream;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import static processing.app.Theme.scale;
@@ -37,20 +39,21 @@ public class EditorConsole extends JScrollPane {
private static ConsoleOutputStream out;
private static ConsoleOutputStream err;
+ private int startOfLine = 0;
+ private int insertPosition = 0;
- private static synchronized void init(SimpleAttributeSet outStyle, PrintStream outStream, SimpleAttributeSet errStyle, PrintStream errStream) {
- if (out != null) {
- return;
- }
+ // Regex for linesplitting, see insertString for comments.
+ private static final Pattern newLinePattern = Pattern.compile("([^\r\n]*)([\r\n]*\n)?(\r+)?");
- out = new ConsoleOutputStream(outStyle, outStream);
- System.setOut(new PrintStream(out, true));
+ public static synchronized void setCurrentEditorConsole(EditorConsole console) {
+ if (out == null) {
+ out = new ConsoleOutputStream(console.stdOutStyle, System.out);
+ System.setOut(new PrintStream(out, true));
- err = new ConsoleOutputStream(errStyle, errStream);
- System.setErr(new PrintStream(err, true));
- }
+ err = new ConsoleOutputStream(console.stdErrStyle, System.err);
+ System.setErr(new PrintStream(err, true));
+ }
- public static void setCurrentEditorConsole(EditorConsole console) {
out.setCurrentEditorConsole(console);
err.setCurrentEditorConsole(console);
}
@@ -109,10 +112,9 @@ public EditorConsole(Base base) {
setPreferredSize(new Dimension(100, (height * lines)));
setMinimumSize(new Dimension(100, (height * lines)));
- EditorConsole.init(stdOutStyle, System.out, stdErrStyle, System.err);
-
// Add font size adjustment listeners.
- base.addEditorFontResizeListeners(consoleTextPane);
+ if (base != null)
+ base.addEditorFontResizeListeners(consoleTextPane);
}
public void applyPreferences() {
@@ -130,8 +132,10 @@ public void applyPreferences() {
// Re-insert console text with the new preferences if there were changes.
// This assumes that the document has single-child paragraphs (default).
if (!stdOutStyle.isEqual(stdOutStyleOld) || !stdErrStyle.isEqual(stdOutStyleOld)) {
- out.setAttibutes(stdOutStyle);
- err.setAttibutes(stdErrStyle);
+ if (out != null)
+ out.setAttibutes(stdOutStyle);
+ if (err != null)
+ err.setAttibutes(stdErrStyle);
int start;
for (int end = document.getLength() - 1; end >= 0; end = start - 1) {
@@ -164,6 +168,8 @@ public void applyPreferences() {
public void clear() {
try {
document.remove(0, document.getLength());
+ startOfLine = 0;
+ insertPosition = 0;
} catch (BadLocationException e) {
// ignore the error otherwise this will cause an infinite loop
// maybe not a good idea in the long run?
@@ -179,14 +185,53 @@ public boolean isEmpty() {
return document.getLength() == 0;
}
- public void insertString(String line, SimpleAttributeSet attributes) throws BadLocationException {
- line = line.replace("\r\n", "\n").replace("\r", "\n");
- int offset = document.getLength();
- document.insertString(offset, line, attributes);
+ public void insertString(String str, SimpleAttributeSet attributes) throws BadLocationException {
+ // Separate the string into content, newlines and lone carriage
+ // returns.
+ //
+ // Doing so allows lone CRs to move the insertPosition back to the
+ // start of the line to allow overwriting the most recent line (e.g.
+ // for a progress bar). Any CR or NL that are immediately followed
+ // by another NL are bunched together for efficiency, since these
+ // can just be inserted into the document directly and still be
+ // correct.
+ //
+ // The regex is written so it will necessarily match any string
+ // completely if applied repeatedly. This is important because any
+ // part not matched would be silently dropped.
+ Matcher m = newLinePattern.matcher(str);
+
+ while (m.find()) {
+ String content = m.group(1);
+ String newlines = m.group(2);
+ String crs = m.group(3);
+
+ // Replace (or append if at end of the document) the content first
+ int replaceLength = Math.min(content.length(), document.getLength() - insertPosition);
+ document.replace(insertPosition, replaceLength, content, attributes);
+ insertPosition += content.length();
+
+ // Then insert any newlines, but always at the end of the document
+ // e.g. if insertPosition is halfway a line, do not delete
+ // anything, just add the newline(s) at the end).
+ if (newlines != null) {
+ document.insertString(document.getLength(), newlines, attributes);
+ insertPosition = document.getLength();
+ startOfLine = insertPosition;
+ }
+
+ // Then, for any CRs not followed by newlines, move insertPosition
+ // to the start of the line. Note that if a newline follows before
+ // any content in the next call to insertString, it will be added
+ // at the end of the document anyway, as expected.
+ if (crs != null) {
+ insertPosition = startOfLine;
+ }
+ }
}
public String getText() {
- return consoleTextPane.getText().trim();
+ return consoleTextPane.getText();
}
}
diff --git a/app/src/processing/app/EditorHeader.java b/app/src/processing/app/EditorHeader.java
index 25c09a8dfaa..c5695cf8abd 100644
--- a/app/src/processing/app/EditorHeader.java
+++ b/app/src/processing/app/EditorHeader.java
@@ -73,6 +73,7 @@ public class EditorHeader extends JComponent {
static final int PIECE_WIDTH = scale(4);
static final int PIECE_HEIGHT = scale(33);
+ static final int TAB_HEIGHT = scale(27);
// value for the size bars, buttons, etc
// TODO: Should be a Theme value?
@@ -270,8 +271,8 @@ public void paintComponent(Graphics screen) {
int textLeft = contentLeft + (pieceWidth - textWidth) / 2;
g.setColor(textColor[state]);
- int baseline = (sizeH + fontAscent) / 2;
- //g.drawString(sketch.code[i].name, textLeft, baseline);
+ int tabMarginTop = sizeH - TAB_HEIGHT;
+ int baseline = tabMarginTop + ((TAB_HEIGHT + fontAscent) / 2) ;
g.drawString(text, textLeft, baseline);
g.drawImage(pieces[state][RIGHT], x, 0, null);
diff --git a/app/src/processing/app/EditorLineStatus.java b/app/src/processing/app/EditorLineStatus.java
index 7635437da4f..f768b597c28 100644
--- a/app/src/processing/app/EditorLineStatus.java
+++ b/app/src/processing/app/EditorLineStatus.java
@@ -92,12 +92,7 @@ public void set(int newStart, int newStop) {
public void paintComponent(Graphics graphics) {
Graphics2D g = Theme.setupGraphics2D(graphics);
if (name.isEmpty() && port.isEmpty()) {
- PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences();
- if (boardPreferences != null)
- setBoardName(boardPreferences.get("name"));
- else
- setBoardName("-");
- setPort(PreferencesData.get("serial.port"));
+ updateBoardAndPort();
}
g.setColor(background);
Dimension size = getSize();
@@ -146,4 +141,13 @@ public Dimension getMinimumSize() {
public Dimension getMaximumSize() {
return scale(new Dimension(3000, height));
}
+
+ public void updateBoardAndPort() {
+ PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences();
+ if (boardPreferences != null)
+ setBoardName(boardPreferences.get("name"));
+ else
+ setBoardName("-");
+ setPort(PreferencesData.get("serial.port"));
+ }
}
diff --git a/app/src/processing/app/EditorTab.java b/app/src/processing/app/EditorTab.java
index 416a99836a5..59bfe3c77d7 100644
--- a/app/src/processing/app/EditorTab.java
+++ b/app/src/processing/app/EditorTab.java
@@ -247,7 +247,7 @@ public void actionPerformed(ActionEvent e) {
menu.add(item);
final JMenuItem referenceItem = new JMenuItem(tr("Find in Reference"));
- referenceItem.addActionListener(editor::handleFindReference);
+ referenceItem.addActionListener(ev -> editor.handleFindReference(getCurrentKeyword()));
menu.add(referenceItem);
final JMenuItem openURLItem = new JMenuItem(tr("Open URL"));
@@ -442,6 +442,9 @@ public void setText(String what) {
} finally {
caret.setUpdatePolicy(policy);
}
+ // A trick to force textarea to recalculate the bracket matching rectangle.
+ // In the worst case scenario, this should be ineffective.
+ textarea.setLineWrap(textarea.getLineWrap());
}
/**
diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java
index d37d0cc96a7..a2a9b804e70 100644
--- a/app/src/processing/app/EditorToolbar.java
+++ b/app/src/processing/app/EditorToolbar.java
@@ -62,7 +62,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
* Titles for each button when the shift key is pressed.
*/
private static final String[] titleShift = {
- tr("Verify"), tr("Upload Using Programmer"), tr("New"), tr("Open"), tr("Save As..."), tr("Serial Monitor")
+ tr("Verify"), tr("Upload Using Programmer"), tr("New"), tr("Open"), tr("Save As..."), tr("Serial Plotter")
};
private static final int BUTTON_COUNT = title.length;
@@ -500,7 +500,11 @@ private void handleSelectionPressed(int sel, boolean isShiftDown, int x, int y)
break;
case SERIAL:
- editor.handleSerial();
+ if (isShiftDown) {
+ editor.handlePlotter();
+ } else {
+ editor.handleSerial();
+ }
break;
default:
diff --git a/app/src/processing/app/SerialMonitor.java b/app/src/processing/app/SerialMonitor.java
index 435f19956c3..b2656ca653d 100644
--- a/app/src/processing/app/SerialMonitor.java
+++ b/app/src/processing/app/SerialMonitor.java
@@ -23,7 +23,6 @@
import java.awt.Color;
import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
@@ -49,14 +48,16 @@ public SerialMonitor(BoardPort port) {
String rateString = wholeString.substring(0, wholeString.indexOf(' '));
serialRate = Integer.parseInt(rateString);
PreferencesData.set("serial.debug_rate", rateString);
- try {
- close();
- Thread.sleep(100); // Wait for serial port to properly close
- open();
- } catch (InterruptedException e) {
- // noop
- } catch (Exception e) {
- System.err.println(e);
+ if (serial != null) {
+ try {
+ close();
+ Thread.sleep(100); // Wait for serial port to properly close
+ open();
+ } catch (InterruptedException e) {
+ // noop
+ } catch (Exception e) {
+ System.err.println(e);
+ }
}
});
@@ -143,7 +144,6 @@ public void close() throws Exception {
int[] location = getPlacement();
String locationStr = PApplet.join(PApplet.str(location), ",");
PreferencesData.set("last.serial.location", locationStr);
- textArea.setText("");
serial.dispose();
serial = null;
}
diff --git a/app/src/processing/app/SerialPlotter.java b/app/src/processing/app/SerialPlotter.java
index 336cbd43e7e..81b21cd7860 100644
--- a/app/src/processing/app/SerialPlotter.java
+++ b/app/src/processing/app/SerialPlotter.java
@@ -26,8 +26,12 @@
import java.util.ArrayList;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
+import javax.swing.text.DefaultEditorKit;
import java.awt.*;
+import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
@@ -40,6 +44,11 @@ public class SerialPlotter extends AbstractMonitor {
private Serial serial;
private int serialRate, xCount;
+ private JLabel noLineEndingAlert;
+ private JTextField textField;
+ private JButton sendButton;
+ private JComboBox lineEndings;
+
private ArrayList graphs;
private final static int BUFFER_CAPACITY = 500;
@@ -233,12 +242,14 @@ public SerialPlotter(BoardPort port) {
String rateString = wholeString.substring(0, wholeString.indexOf(' '));
serialRate = Integer.parseInt(rateString);
PreferencesData.set("serial.debug_rate", rateString);
- try {
- close();
- Thread.sleep(100); // Wait for serial port to properly close
- open();
- } catch (Exception e) {
- // ignore
+ if (serial != null) {
+ try {
+ close();
+ Thread.sleep(100); // Wait for serial port to properly close
+ open();
+ } catch (Exception e) {
+ // ignore
+ }
}
});
@@ -267,10 +278,111 @@ protected void onCreateWindow(Container mainPane) {
pane.add(serialRates);
mainPane.add(pane, BorderLayout.SOUTH);
+
+ textField = new JTextField(40);
+ // textField is selected every time the window is focused
+ addWindowFocusListener(new WindowAdapter() {
+ @Override
+ public void windowGainedFocus(WindowEvent e) {
+ textField.requestFocusInWindow();
+ }
+ });
+
+ // Add cut/copy/paste contextual menu to the text input field.
+ JPopupMenu menu = new JPopupMenu();
+
+ Action cut = new DefaultEditorKit.CutAction();
+ cut.putValue(Action.NAME, tr("Cut"));
+ menu.add(cut);
+
+ Action copy = new DefaultEditorKit.CopyAction();
+ copy.putValue(Action.NAME, tr("Copy"));
+ menu.add(copy);
+
+ Action paste = new DefaultEditorKit.PasteAction();
+ paste.putValue(Action.NAME, tr("Paste"));
+ menu.add(paste);
+
+ textField.setComponentPopupMenu(menu);
+
+ sendButton = new JButton(tr("Send"));
+
+ JPanel lowerPane = new JPanel();
+ lowerPane.setLayout(new BoxLayout(lowerPane, BoxLayout.X_AXIS));
+ lowerPane.setBorder(new EmptyBorder(4, 4, 4, 4));
+
+ noLineEndingAlert = new JLabel(I18n.format(tr("You've pressed {0} but nothing was sent. Should you select a line ending?"), tr("Send")));
+ noLineEndingAlert.setToolTipText(noLineEndingAlert.getText());
+ noLineEndingAlert.setForeground(pane.getBackground());
+ Dimension minimumSize = new Dimension(noLineEndingAlert.getMinimumSize());
+ minimumSize.setSize(minimumSize.getWidth() / 3, minimumSize.getHeight());
+ noLineEndingAlert.setMinimumSize(minimumSize);
+
+
+ lineEndings = new JComboBox(new String[]{tr("No line ending"), tr("Newline"), tr("Carriage return"), tr("Both NL & CR")});
+ lineEndings.addActionListener((ActionEvent event) -> {
+ PreferencesData.setInteger("serial.line_ending", lineEndings.getSelectedIndex());
+ noLineEndingAlert.setForeground(pane.getBackground());
+ });
+ lineEndings.setMaximumSize(lineEndings.getMinimumSize());
+
+ lowerPane.add(textField);
+ lowerPane.add(Box.createRigidArea(new Dimension(4, 0)));
+ lowerPane.add(sendButton);
+
+ pane.add(lowerPane);
+ pane.add(noLineEndingAlert);
+ pane.add(Box.createRigidArea(new Dimension(8, 0)));
+ pane.add(lineEndings);
+
+ applyPreferences();
+
+ onSendCommand((ActionEvent event) -> {
+ send(textField.getText());
+ textField.setText("");
+ });
+
+ }
+
+ private void send(String string) {
+ String s = string;
+ if (serial != null) {
+ switch (lineEndings.getSelectedIndex()) {
+ case 1:
+ s += "\n";
+ break;
+ case 2:
+ s += "\r";
+ break;
+ case 3:
+ s += "\r\n";
+ break;
+ default:
+ break;
+ }
+ if ("".equals(s) && lineEndings.getSelectedIndex() == 0 && !PreferencesData.has("runtime.line.ending.alert.notified")) {
+ noLineEndingAlert.setForeground(Color.RED);
+ PreferencesData.set("runtime.line.ending.alert.notified", "true");
+ }
+ serial.write(s);
+ }
+ }
+
+ public void onSendCommand(ActionListener listener) {
+ textField.addActionListener(listener);
+ sendButton.addActionListener(listener);
+ }
+
+ public void applyPreferences() {
+ // Apply line endings.
+ if (PreferencesData.get("serial.line_ending") != null) {
+ lineEndings.setSelectedIndex(PreferencesData.getInteger("serial.line_ending"));
+ }
}
protected void onEnableWindow(boolean enable) {
- serialRates.setEnabled(enable);
+ textField.setEnabled(enable);
+ sendButton.setEnabled(enable);
}
private void onSerialRateChange(ActionListener listener) {
@@ -289,6 +401,10 @@ public void message(final String s) {
messageBuffer.delete(0, linebreak + 1);
line = line.trim();
+ if (line.length() == 0) {
+ // the line only contained trimmable characters
+ continue;
+ }
String[] parts = line.split("[, \t]+");
if(parts.length == 0) {
continue;
diff --git a/app/src/processing/app/UpdateCheck.java b/app/src/processing/app/UpdateCheck.java
index 39c555069a1..4c736e60413 100644
--- a/app/src/processing/app/UpdateCheck.java
+++ b/app/src/processing/app/UpdateCheck.java
@@ -51,7 +51,7 @@
*/
public class UpdateCheck implements Runnable {
Base base;
- String downloadURL = tr("http://www.arduino.cc/latest.txt");
+ String downloadURL = "https://www.arduino.cc/latest.txt";
static final long ONE_DAY = 24 * 60 * 60 * 1000;
@@ -66,14 +66,14 @@ public UpdateCheck(Base base) {
public void run() {
//System.out.println("checking for updates...");
- // generate a random id in case none exists yet
- Random r = new Random();
- long id = r.nextLong();
-
+ long id;
String idString = PreferencesData.get("update.id");
if (idString != null) {
id = Long.parseLong(idString);
} else {
+ // generate a random id in case none exists yet
+ Random r = new Random();
+ id = r.nextLong();
PreferencesData.set("update.id", String.valueOf(id));
}
@@ -116,7 +116,7 @@ public void run() {
options,
options[0]);
if (result == JOptionPane.YES_OPTION) {
- Base.openURL(tr("http://www.arduino.cc/en/Main/Software"));
+ Base.openURL("https://www.arduino.cc/en/software");
}
}
}
diff --git a/app/src/processing/app/syntax/SketchTextArea.java b/app/src/processing/app/syntax/SketchTextArea.java
index ce74a3f1f8f..ba10bfc7af3 100644
--- a/app/src/processing/app/syntax/SketchTextArea.java
+++ b/app/src/processing/app/syntax/SketchTextArea.java
@@ -89,14 +89,11 @@ public SketchTextArea(RSyntaxDocument document, PdeKeywords pdeKeywords) throws
public void setKeywords(PdeKeywords keywords) {
pdeKeywords = keywords;
- setLinkGenerator(new DocLinkGenerator(pdeKeywords));
}
private void installFeatures() throws IOException {
setTheme(PreferencesData.get("editor.syntax_theme", "default"));
- setLinkGenerator(new DocLinkGenerator(pdeKeywords));
-
setSyntaxEditingStyle(SYNTAX_STYLE_CPLUSPLUS);
}
@@ -175,48 +172,6 @@ public void getTextLine(int line, Segment segment) {
}
}
- private static class DocLinkGenerator implements LinkGenerator {
-
- private final PdeKeywords pdeKeywords;
-
- public DocLinkGenerator(PdeKeywords pdeKeywords) {
- this.pdeKeywords = pdeKeywords;
- }
-
- @Override
- public LinkGeneratorResult isLinkAtOffset(RSyntaxTextArea textArea, final int offs) {
- Token token = textArea.modelToToken(offs);
- if (token == null) {
- return null;
- }
-
- String reference = pdeKeywords.getReference(token.getLexeme());
-
- if (reference != null || (token.getType() == TokenTypes.DATA_TYPE || token.getType() == TokenTypes.VARIABLE || token.getType() == TokenTypes.FUNCTION)) {
-
- return new LinkGeneratorResult() {
-
- @Override
- public int getSourceOffset() {
- return offs;
- }
-
- @Override
- public HyperlinkEvent execute() {
-
- LOG.fine("Open Reference: " + reference);
-
- Base.showReference("Reference/" + reference);
-
- return null;
- }
- };
- }
-
- return null;
- }
- }
-
/**
* Handles http hyperlinks.
diff --git a/app/src/processing/app/tools/MenuScroller.java b/app/src/processing/app/tools/MenuScroller.java
index 9e9aacbcafd..d934a4583ca 100644
--- a/app/src/processing/app/tools/MenuScroller.java
+++ b/app/src/processing/app/tools/MenuScroller.java
@@ -16,6 +16,7 @@
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.event.KeyEvent;
+import java.util.Arrays;
/**
* A class that provides scrolling capabilities to a long menu dropdown or
@@ -33,6 +34,7 @@ public class MenuScroller {
private JPopupMenu menu;
private Component[] menuItems;
+ private Component[] allMenuItems;
private MenuScrollItem upItem;
private MenuScrollItem downItem;
private final MenuScrollListener menuListener = new MenuScrollListener();
@@ -539,7 +541,8 @@ public void popupMenuCanceled(PopupMenuEvent e) {
}
private void setMenuItems() {
- menuItems = menu.getComponents();
+ allMenuItems = menu.getComponents();
+ menuItems = Arrays.stream(allMenuItems).filter(x -> x.isVisible()).toArray(Component[]::new);
if (keepVisibleIndex >= topFixedCount
&& keepVisibleIndex <= menuItems.length - bottomFixedCount
&& (keepVisibleIndex > firstIndex + scrollCount
@@ -554,7 +557,7 @@ private void setMenuItems() {
private void restoreMenuItems() {
menu.removeAll();
- for (Component component : menuItems) {
+ for (Component component : allMenuItems) {
menu.add(component);
}
}
diff --git a/app/test/cc/arduino/contributions/GzippedJsonDownloaderTest.java b/app/test/cc/arduino/contributions/GzippedJsonDownloaderTest.java
index 745ccb1dd5b..0892c361516 100644
--- a/app/test/cc/arduino/contributions/GzippedJsonDownloaderTest.java
+++ b/app/test/cc/arduino/contributions/GzippedJsonDownloaderTest.java
@@ -4,10 +4,11 @@
import cc.arduino.utils.MultiStepProgress;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.module.mrbean.MrBeanModule;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+
+import processing.app.BaseNoGui;
import processing.app.helpers.FileUtils;
import java.io.File;
@@ -38,13 +39,13 @@ public void tearDown() throws Exception {
@Test
public void testJsonDownload() throws Exception {
+ BaseNoGui.initPlatform();
new GZippedJsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"),
new URL("http://downloads.arduino.cc/libraries/library_index.json.gz"))
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);
InputStream indexIn = new FileInputStream(tempFile);
ObjectMapper mapper = new ObjectMapper();
- mapper.registerModule(new MrBeanModule());
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
diff --git a/app/test/cc/arduino/contributions/JsonDownloaderTest.java b/app/test/cc/arduino/contributions/JsonDownloaderTest.java
index bdb64325f59..1315fe223a0 100644
--- a/app/test/cc/arduino/contributions/JsonDownloaderTest.java
+++ b/app/test/cc/arduino/contributions/JsonDownloaderTest.java
@@ -4,10 +4,11 @@
import cc.arduino.utils.MultiStepProgress;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.module.mrbean.MrBeanModule;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+
+import processing.app.BaseNoGui;
import processing.app.helpers.FileUtils;
import java.io.File;
@@ -38,12 +39,12 @@ public void tearDown() throws Exception {
@Test
public void testJsonDownload() throws Exception {
+ BaseNoGui.initPlatform();
new JsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"))
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);
InputStream indexIn = new FileInputStream(tempFile);
ObjectMapper mapper = new ObjectMapper();
- mapper.registerModule(new MrBeanModule());
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
diff --git a/app/test/cc/arduino/contributions/UpdatableLibraryTest.java b/app/test/cc/arduino/contributions/UpdatableLibraryTest.java
index e06c12710bf..0dab3531cd1 100644
--- a/app/test/cc/arduino/contributions/UpdatableLibraryTest.java
+++ b/app/test/cc/arduino/contributions/UpdatableLibraryTest.java
@@ -36,8 +36,7 @@ public void testUpdatableLibrary() throws Exception {
LibrariesIndexer indexer = new LibrariesIndexer(index_SD_only);
BaseNoGui.librariesIndexer = indexer;
indexer.parseIndex();
- indexer.setLibrariesFolders(folders);
- indexer.rescanLibraries();
+ indexer.setLibrariesFoldersAndRescan(folders);
ContributedLibrary sdLib = indexer.getIndex().getInstalled("SD").get();
assertTrue("SD lib is installed", sdLib.isLibraryInstalled());
@@ -46,7 +45,7 @@ public void testUpdatableLibrary() throws Exception {
assertTrue(ContributionsSelfCheck.checkForUpdatableLibraries());
folders.add(new UserLibraryFolder(SD121, Location.SKETCHBOOK));
- indexer.setLibrariesFolders(folders);
+ indexer.setLibrariesFoldersAndRescan(folders);
sdLib = indexer.getIndex().getInstalled("SD").get();
assertTrue("SD lib is installed", sdLib.isLibraryInstalled());
@@ -63,8 +62,7 @@ public void testUpdatableLibraryWithBundled() throws Exception {
LibrariesIndexer indexer = new LibrariesIndexer(index_Bridge_only);
BaseNoGui.librariesIndexer = indexer;
indexer.parseIndex();
- indexer.setLibrariesFolders(folders);
- indexer.rescanLibraries();
+ indexer.setLibrariesFoldersAndRescan(folders);
ContributedLibrary l = indexer.getIndex().getInstalled("Bridge").get();
assertTrue("Bridge lib is installed", l.isLibraryInstalled());
@@ -73,7 +71,7 @@ public void testUpdatableLibraryWithBundled() throws Exception {
assertTrue(ContributionsSelfCheck.checkForUpdatableLibraries());
folders.add(new UserLibraryFolder(Bridge170, Location.SKETCHBOOK));
- indexer.setLibrariesFolders(folders);
+ indexer.setLibrariesFoldersAndRescan(folders);
l = indexer.getIndex().getInstalled("Bridge").get();
assertTrue("Bridge lib is installed", l.isLibraryInstalled());
diff --git a/app/test/cc/arduino/net/CustomProxySelectorTest.java b/app/test/cc/arduino/net/CustomProxySelectorTest.java
index 005f5cce822..411f1aa2366 100644
--- a/app/test/cc/arduino/net/CustomProxySelectorTest.java
+++ b/app/test/cc/arduino/net/CustomProxySelectorTest.java
@@ -83,8 +83,8 @@ public void testProxyPACHTTP() throws Exception {
public void testProxyPACHTTPWithLogin() throws Exception {
preferences.put(Constants.PREF_PROXY_TYPE, Constants.PROXY_TYPE_AUTO);
preferences.put(Constants.PREF_PROXY_PAC_URL, CustomProxySelectorTest.class.getResource("proxy_http.pac").toExternalForm());
- preferences.put(Constants.PREF_PROXY_AUTO_USERNAME, "auto");
- preferences.put(Constants.PREF_PROXY_AUTO_PASSWORD, "autopassword");
+ preferences.put(Constants.PREF_PROXY_USERNAME, "auto");
+ preferences.put(Constants.PREF_PROXY_PASSWORD, "autopassword");
CustomProxySelector proxySelector = new CustomProxySelector(preferences);
Proxy proxy = proxySelector.getProxyFor(uri);
@@ -154,8 +154,8 @@ public void testManualProxyWithLogin() throws Exception {
preferences.put(Constants.PREF_PROXY_MANUAL_TYPE, Constants.PROXY_MANUAL_TYPE_HTTP);
preferences.put(Constants.PREF_PROXY_MANUAL_HOSTNAME, "localhost");
preferences.put(Constants.PREF_PROXY_MANUAL_PORT, "8080");
- preferences.put(Constants.PREF_PROXY_MANUAL_USERNAME, "username");
- preferences.put(Constants.PREF_PROXY_MANUAL_PASSWORD, "pwd");
+ preferences.put(Constants.PREF_PROXY_USERNAME, "username");
+ preferences.put(Constants.PREF_PROXY_PASSWORD, "pwd");
CustomProxySelector proxySelector = new CustomProxySelector(preferences);
Proxy proxy = proxySelector.getProxyFor(uri);
diff --git a/app/test/processing/app/AbstractGUITest.java b/app/test/processing/app/AbstractGUITest.java
index d1db60d98aa..efc68c1df84 100644
--- a/app/test/processing/app/AbstractGUITest.java
+++ b/app/test/processing/app/AbstractGUITest.java
@@ -29,42 +29,36 @@
package processing.app;
-import cc.arduino.files.DeleteFilesOnShutdown;
+import javax.swing.JPopupMenu;
+
import org.fest.swing.edt.FailOnThreadViolationRepaintManager;
import org.fest.swing.edt.GuiActionRunner;
import org.fest.swing.edt.GuiQuery;
import org.junit.After;
import org.junit.Before;
-import processing.app.helpers.ArduinoFrameFixture;
-import processing.app.helpers.FileUtils;
-import javax.swing.*;
-import java.util.Random;
+import processing.app.helpers.ArduinoFrameFixture;
-public abstract class AbstractGUITest {
+public abstract class AbstractGUITest extends AbstractWithPreferencesTest {
protected ArduinoFrameFixture window;
@Before
public void startUpTheIDE() throws Exception {
+ // This relies on AbstractWithPreferencesTest to set up the
+ // non-gui-specific stuff.
+
System.setProperty("mrj.version", "whynot"); //makes sense only on osx. See https://github.com/alexruiz/fest-swing-1.x/issues/2#issuecomment-86532042
- Runtime.getRuntime().addShutdownHook(new Thread(DeleteFilesOnShutdown.INSTANCE));
FailOnThreadViolationRepaintManager.install();
- BaseNoGui.initPlatform();
- BaseNoGui.getPlatform().init();
- PreferencesData.init(null);
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
- Theme.init();
BaseNoGui.getPlatform().setLookAndFeel();
- Base.untitledFolder = FileUtils.createTempFolder("untitled" + new Random().nextInt(Integer.MAX_VALUE), ".tmp");
- DeleteFilesOnShutdown.add(Base.untitledFolder);
window = GuiActionRunner.execute(new GuiQuery() {
@Override
protected ArduinoFrameFixture executeInEDT() throws Throwable {
- return new ArduinoFrameFixture(new Base(new String[0]).editors.get(0));
+ return new ArduinoFrameFixture(createBase().editors.get(0));
}
});
}
diff --git a/app/test/processing/app/AbstractWithPreferencesTest.java b/app/test/processing/app/AbstractWithPreferencesTest.java
index f0d2f3a2b07..1075aebda4f 100644
--- a/app/test/processing/app/AbstractWithPreferencesTest.java
+++ b/app/test/processing/app/AbstractWithPreferencesTest.java
@@ -29,26 +29,88 @@
package processing.app;
-import cc.arduino.files.DeleteFilesOnShutdown;
+import static org.junit.Assert.assertEquals;
import org.junit.Before;
+import org.junit.After;
+
import processing.app.helpers.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
import java.util.Random;
+import java.util.List;
+import java.util.LinkedList;
public abstract class AbstractWithPreferencesTest {
+ /**
+ * Files or directories that will be deleted after each test.
+ * Subclasses can add files here in @Test or @Before functions.
+ */
+ protected List deleteAfter = new LinkedList();
+ protected File preferencesFile;
@Before
public void init() throws Exception {
- Runtime.getRuntime().addShutdownHook(new Thread(DeleteFilesOnShutdown.INSTANCE));
+ File settingsDir = Files.createTempDirectory("arduino_test_settings").toFile();
+ deleteAfter.add(settingsDir);
+
+ preferencesFile = new File(settingsDir, "preferences.txt");
+ File sketchbookDir = new File(settingsDir, "sketchbook");
+ sketchbookDir.mkdir();
+
BaseNoGui.initPlatform();
BaseNoGui.getPlatform().init();
- PreferencesData.init(null);
+
+ PreferencesData.init(preferencesFile);
+ // Do not read anything from e.g. ~/.arduino15
+ PreferencesData.set("settings.path", settingsDir.toString());
+ // Do not read or write the default ~/Arduino sketchbook
+ PreferencesData.set("sketchbook.path", sketchbookDir.toString());
+ // Do not perform any update checks
+ PreferencesData.set("update.check", sketchbookDir.toString());
+ // Write the defaults, with these changes to file. This allows them
+ // to be reloaded when creating a Base instance (see getBaseArgs()
+ // below).
+ PreferencesData.save();
+
Theme.init();
BaseNoGui.initPackages();
Base.untitledFolder = FileUtils.createTempFolder("untitled" + new Random().nextInt(Integer.MAX_VALUE), ".tmp");
- DeleteFilesOnShutdown.add(Base.untitledFolder);
+ deleteAfter.add(Base.untitledFolder);
}
+ /**
+ * Returns arguments to be passed to the Base constructor or on the
+ * commandline to set up the created dummy environment.
+ */
+ protected String[] getBaseArgs() {
+ return new String[] {
+ // Preferences are loaded (using --preferences-file) before
+ // processing any other commandline options (e.g. --pref), so only
+ // use --preferences-file here. Also, this does not affect the
+ // "action" mode, for tests that require the GUI to be loaded.
+ "--preferences-file", preferencesFile.toString(),
+ };
+ }
+
+ /**
+ * Creates a new instance of Base. Always use this rather than calling
+ * it directly, to ensure the right settings are used.
+ */
+ protected Base createBase() throws Exception {
+ Base base = new Base(getBaseArgs());
+ // Doublecheck that the right preferencesFile was loaded
+ assertEquals(preferencesFile, PreferencesData.preferencesFile);
+ return base;
+ }
+
+ @After
+ public void cleanup() throws IOException {
+ for (File f : deleteAfter)
+ FileUtils.recursiveDelete(f);
+ deleteAfter = new LinkedList();
+ }
}
diff --git a/app/test/processing/app/CommandLineTest.java b/app/test/processing/app/CommandLineTest.java
index 9ac760b1fbb..92c0dfec83e 100644
--- a/app/test/processing/app/CommandLineTest.java
+++ b/app/test/processing/app/CommandLineTest.java
@@ -32,22 +32,32 @@
import static org.junit.Assert.*;
import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Arrays;
import org.apache.commons.compress.utils.IOUtils;
import org.fest.assertions.Assertions;
-import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import processing.app.helpers.OSUtils;
import processing.app.helpers.PreferencesMap;
-public class CommandLineTest {
+/**
+ * This extends AbstractWithPreferencesTest which initializes part of
+ * the internal Arduino structures. Most of that is not required, but it
+ * also conveniently sets up a settings directory and preferences file,
+ * which we can use here (through getBaseArgs()).
+ */
+public class CommandLineTest extends AbstractWithPreferencesTest {
- File buildPath;
- File arduinoPath;
+ private static File buildPath;
+ private static File arduinoPath;
- @Before
- public void findBuildPaths() throws Exception {
+ @BeforeClass
+ public static void findBuildPaths() throws Exception {
buildPath = new File(System.getProperty("user.dir"));
while (!new File(buildPath, "build").isDirectory()) {
buildPath = buildPath.getParentFile();
@@ -72,58 +82,60 @@ public void findBuildPaths() throws Exception {
System.out.println("found arduino: " + arduinoPath);
}
- @Test
- public void testCommandLineBuildWithRelativePath() throws Exception {
+ public Process runArduino(boolean output, boolean success, File wd, String[] extraArgs) throws IOException, InterruptedException {
Runtime rt = Runtime.getRuntime();
- File wd = new File(buildPath, "build/shared/examples/01.Basics/Blink/");
- Process pr = rt
- .exec(arduinoPath + " --board arduino:avr:uno --verify Blink.ino", null,
- wd);
- IOUtils.copy(pr.getInputStream(), System.out);
+
+ List args = new ArrayList();
+ args.add(arduinoPath.getAbsolutePath());
+ args.addAll(Arrays.asList(getBaseArgs()));
+ args.addAll(Arrays.asList(extraArgs));
+
+ System.out.println("Running: " + String.join(" ", args));
+
+ Process pr = rt.exec(args.toArray(new String[0]), null, wd);
+ if (output) {
+ IOUtils.copy(pr.getInputStream(), System.out);
+ IOUtils.copy(pr.getErrorStream(), System.out);
+ }
pr.waitFor();
- assertEquals(0, pr.exitValue());
+ if (success)
+ assertEquals(0, pr.exitValue());
+ return pr;
+ }
+
+ @Test
+ public void testCommandLineBuildWithRelativePath() throws Exception {
+ File wd = new File(buildPath, "app/testdata/sketches/Blink/");
+ runArduino(true, true, wd, new String[] {
+ "--board", "arduino:avr:uno",
+ "--verify", "Blink.ino",
+ });
}
@Test
public void testCommandLinePreferencesSave() throws Exception {
- Runtime rt = Runtime.getRuntime();
File prefFile = File.createTempFile("test_pref", ".txt");
prefFile.deleteOnExit();
- Process pr = rt.exec(new String[] {
- arduinoPath.getAbsolutePath(),
+ runArduino(true, true, null, new String[] {
"--save-prefs",
"--preferences-file", prefFile.getAbsolutePath(),
- "--get-pref", // avoids starting the GUI
+ "--version", // avoids starting the GUI
});
- IOUtils.copy(pr.getInputStream(), System.out);
- IOUtils.copy(pr.getErrorStream(), System.out);
- pr.waitFor();
- assertEquals(0, pr.exitValue());
- pr = rt.exec(new String[] {
- arduinoPath.getAbsolutePath(),
+ runArduino(true, true, null, new String[] {
"--pref", "test_pref=xxx",
"--preferences-file", prefFile.getAbsolutePath(),
});
- IOUtils.copy(pr.getInputStream(), System.out);
- IOUtils.copy(pr.getErrorStream(), System.out);
- pr.waitFor();
- assertEquals(0, pr.exitValue());
PreferencesMap prefs = new PreferencesMap(prefFile);
assertNull("preference should not be saved", prefs.get("test_pref"));
- pr = rt.exec(new String[] {
- arduinoPath.getAbsolutePath(),
+ runArduino(true, true, null, new String[] {
"--pref", "test_pref=xxx",
"--preferences-file", prefFile.getAbsolutePath(),
"--save-prefs",
});
- IOUtils.copy(pr.getInputStream(), System.out);
- IOUtils.copy(pr.getErrorStream(), System.out);
- pr.waitFor();
- assertEquals(0, pr.exitValue());
prefs = new PreferencesMap(prefFile);
assertEquals("preference should be saved", "xxx", prefs.get("test_pref"));
@@ -131,29 +143,20 @@ public void testCommandLinePreferencesSave() throws Exception {
@Test
public void testCommandLineVersion() throws Exception {
- Runtime rt = Runtime.getRuntime();
- Process pr = rt.exec(new String[]{
- arduinoPath.getAbsolutePath(),
+ Process pr = runArduino(false, true, null, new String[] {
"--version",
});
- pr.waitFor();
- Assertions.assertThat(pr.exitValue())
- .as("Process will finish with exit code 0 in --version")
- .isEqualTo(0);
Assertions.assertThat(new String(IOUtils.toByteArray(pr.getInputStream())))
.matches("Arduino: \\d+\\.\\d+\\.\\d+.*\r?\n");
}
@Test
public void testCommandLineMultipleAction() throws Exception {
- Runtime rt = Runtime.getRuntime();
- Process pr = rt.exec(new String[]{
- arduinoPath.getAbsolutePath(),
+ Process pr = runArduino(true, false, null, new String[] {
"--version",
"--verify",
});
- pr.waitFor();
Assertions.assertThat(pr.exitValue())
.as("Multiple Action will be rejected")
diff --git a/app/test/processing/app/DefaultTargetTest.java b/app/test/processing/app/DefaultTargetTest.java
index 37819c84cff..24767bee30d 100644
--- a/app/test/processing/app/DefaultTargetTest.java
+++ b/app/test/processing/app/DefaultTargetTest.java
@@ -57,7 +57,7 @@ public void testDefaultTarget() throws Exception {
PreferencesData.set("board", "unreal_board");
// should not raise an exception
- new Base(new String[0]);
+ createBase();
// skip test if no target platforms are available
Assume.assumeNotNull(BaseNoGui.getTargetPlatform());
diff --git a/app/test/processing/app/EditorConsoleTest.java b/app/test/processing/app/EditorConsoleTest.java
new file mode 100644
index 00000000000..308523ce6ef
--- /dev/null
+++ b/app/test/processing/app/EditorConsoleTest.java
@@ -0,0 +1,155 @@
+/*
+ * This file is part of Arduino.
+ *
+ * Copyright 2020 Arduino LLC (http://www.arduino.cc/)
+ *
+ * Arduino is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction. Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License. This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ */
+
+package processing.app;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class EditorConsoleTest extends AbstractWithPreferencesTest {
+ private EditorConsole console;
+
+ @Before
+ public void createConsole() {
+ console = new EditorConsole(null);
+ }
+
+ public String escapeString(String input) {
+ // This escapes backslashes, newlines and carriage returns, to get
+ // more readable assertion failures.
+ return input.replace("\\", "\\\\").replace("\n", "\\n").replace("\r", "\\r");
+ }
+
+ public void assertOutput(String output) {
+ assertEquals(escapeString(output), escapeString(console.getText()));
+ }
+
+ @Test
+ public void testHelloWorld() throws Exception {
+ console.insertString("Hello, world!", null);
+
+ assertOutput("Hello, world!");
+ }
+
+ @Test
+ public void testCrNlHandling() throws Exception {
+ // Do some basic tests with \r\n
+ console.insertString("abc\r\ndef", null);
+ assertOutput("abc\r\ndef");
+
+ console.insertString("xyz", null);
+ assertOutput("abc\r\ndefxyz");
+
+ console.insertString("000\r\n123", null);
+ assertOutput("abc\r\ndefxyz000\r\n123");
+
+ console.insertString("\r\n", null);
+ assertOutput("abc\r\ndefxyz000\r\n123\r\n");
+ }
+
+ @Test
+ public void testNlHandling() throws Exception {
+ // Basic tests, but with just \n
+ console.insertString("abc\ndef", null);
+ assertOutput("abc\ndef");
+
+ console.insertString("xyz", null);
+ assertOutput("abc\ndefxyz");
+
+ console.insertString("000\n123", null);
+ assertOutput("abc\ndefxyz000\n123");
+
+ console.insertString("\n", null);
+ assertOutput("abc\ndefxyz000\n123\n");
+ }
+
+ @Test
+ public void testCrHandling() throws Exception {
+ // Then test that single \r clears the current line
+ console.clear();
+ console.insertString("abc\rdef", null);
+ assertOutput("def");
+
+ // A single \r at the end is not added to the document
+ console.insertString("\r", null);
+ assertOutput("def");
+
+ // Nor are multiple \r at the end
+ console.insertString("\r\r\r", null);
+ assertOutput("def");
+
+ // But it does clear the line on the next write
+ console.insertString("123", null);
+ assertOutput("123");
+
+ // Same when combined with some data
+ console.insertString("\r456\r\r", null);
+ assertOutput("456");
+
+ console.insertString("000", null);
+ assertOutput("000");
+
+ // Then add a newline so preceding data is kept
+ console.insertString("\r\nxxx\r", null);
+ assertOutput("000\r\nxxx");
+
+ // But data after the newline is removed
+ console.insertString("yyy", null);
+ assertOutput("000\r\nyyy");
+
+ // When a \r\n is split across inserts, it becomes a lone \n
+ console.insertString("\r", null);
+ assertOutput("000\r\nyyy");
+ console.insertString("\n", null);
+ assertOutput("000\r\nyyy\n");
+ }
+
+ @Test
+ public void testCrPartialOverwrite() throws Exception {
+ console.insertString("abcdef\r", null);
+ assertOutput("abcdef");
+
+ console.insertString("123", null);
+ assertOutput("123def");
+
+ console.insertString("4", null);
+ assertOutput("1234ef");
+
+ console.insertString("\r\n56", null);
+ assertOutput("1234ef\r\n56");
+ }
+
+ @Test
+ public void testTogether() throws Exception {
+ console.insertString("abc\n123456\rdef\rx\r\nyyy\nzzz\r999", null);
+ assertOutput("abc\nxef456\r\nyyy\n999");
+ }
+}
diff --git a/app/test/processing/app/HittingEscapeOnCloseConfirmationDialogTest.java b/app/test/processing/app/HittingEscapeOnCloseConfirmationDialogTest.java
index 83897b1963c..00539b15b29 100644
--- a/app/test/processing/app/HittingEscapeOnCloseConfirmationDialogTest.java
+++ b/app/test/processing/app/HittingEscapeOnCloseConfirmationDialogTest.java
@@ -29,16 +29,18 @@
package processing.app;
+import static org.junit.Assert.assertEquals;
+import static processing.app.I18n.tr;
+
+import java.awt.event.KeyEvent;
+
import org.fest.swing.core.KeyPressInfo;
+import org.fest.swing.core.matcher.DialogMatcher;
import org.fest.swing.finder.WindowFinder;
import org.fest.swing.fixture.DialogFixture;
import org.junit.Test;
-import processing.app.helpers.SketchTextAreaFixture;
-import javax.swing.*;
-import java.awt.event.KeyEvent;
-
-import static org.junit.Assert.assertEquals;
+import processing.app.helpers.SketchTextAreaFixture;
public class HittingEscapeOnCloseConfirmationDialogTest extends AbstractGUITest {
@@ -49,7 +51,8 @@ public void shouldJustCloseTheDialog() throws Exception {
window.close();
- DialogFixture dialog = WindowFinder.findDialog(JDialog.class).using(window.robot);
+ DialogMatcher matcher = DialogMatcher.withTitle(tr("Close")).andShowing();
+ DialogFixture dialog = WindowFinder.findDialog(matcher).using(window.robot);
dialog.pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ESCAPE));
EditorConsole console = (EditorConsole) window.scrollPane("console").component();
diff --git a/arduino-core/src/cc/arduino/contributions/packages/TestPackageIndexFilenameFilter.java b/app/test/processing/app/SerialTest.java
similarity index 61%
rename from arduino-core/src/cc/arduino/contributions/packages/TestPackageIndexFilenameFilter.java
rename to app/test/processing/app/SerialTest.java
index fdcd08384bb..63280811e24 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/TestPackageIndexFilenameFilter.java
+++ b/app/test/processing/app/SerialTest.java
@@ -1,7 +1,7 @@
/*
* This file is part of Arduino.
*
- * Copyright 2015 Arduino LLC (http://www.arduino.cc/)
+ * Copyright 2020 Arduino LLC (http://www.arduino.cc/)
*
* Arduino is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,30 +27,32 @@
* the GNU General Public License.
*/
-package cc.arduino.contributions.packages;
+package processing.app;
-import java.io.File;
-import java.io.FilenameFilter;
+import static org.junit.Assert.assertEquals;
-public class TestPackageIndexFilenameFilter implements FilenameFilter {
+import org.junit.Test;
- private final FilenameFilter parent;
+public class SerialTest {
+ class NullSerial extends Serial {
+ public NullSerial() throws SerialException {
+ super("none", 0, 'n', 0, 0, false, false);
+ }
- public TestPackageIndexFilenameFilter(FilenameFilter parent) {
- this.parent = parent;
- }
+ @Override
+ protected void message(char[] chars, int length) {
+ output += new String(chars, 0, length);
+ }
- public TestPackageIndexFilenameFilter() {
- this(null);
+ String output = "";
}
- @Override
- public boolean accept(File file, String name) {
- boolean result = false;
- if (parent != null) {
- result = parent.accept(file, name);
- }
- result = result || (new File(file, name).isFile() && name.startsWith("test_package_") && name.endsWith("_index.json"));
- return result;
+ @Test
+ public void testSerialUTF8Decoder() throws Exception {
+ NullSerial s = new NullSerial();
+ // https://github.com/arduino/Arduino/issues/9808
+ String testdata = "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789°0123456789";
+ s.processSerialEvent(testdata.getBytes());
+ assertEquals(s.output, testdata);
}
}
diff --git a/app/test/processing/app/debug/TargetPlatformStub.java b/app/test/processing/app/debug/TargetPlatformStub.java
index a8048c514a4..59b655f96f5 100644
--- a/app/test/processing/app/debug/TargetPlatformStub.java
+++ b/app/test/processing/app/debug/TargetPlatformStub.java
@@ -99,4 +99,10 @@ public TargetBoard getBoard(String boardId) {
public TargetPackage getContainerPackage() {
return targetPackage;
}
+
+ @Override
+ public boolean isInSketchbook() {
+ // TODO Auto-generated method stub
+ return false;
+ }
}
diff --git a/app/testdata/libraries/Bridge_1.6.3/Bridge/examples/HttpClient/HttpClient.ino b/app/testdata/libraries/Bridge_1.6.3/Bridge/examples/HttpClient/HttpClient.ino
index 47a37c3f2eb..b0a6c21ffbe 100644
--- a/app/testdata/libraries/Bridge_1.6.3/Bridge/examples/HttpClient/HttpClient.ino
+++ b/app/testdata/libraries/Bridge_1.6.3/Bridge/examples/HttpClient/HttpClient.ino
@@ -37,7 +37,7 @@ void loop() {
HttpClient client;
// Make a HTTP request:
- client.get("http://www.arduino.cc/asciilogo.txt");
+ client.get("http://arduino.tips/asciilogo.txt");
// if there are incoming bytes available
// from the server, read them and print them:
diff --git a/build/shared/examples/01.Basics/Blink/Blink.ino b/app/testdata/sketches/Blink/Blink.ino
similarity index 100%
rename from build/shared/examples/01.Basics/Blink/Blink.ino
rename to app/testdata/sketches/Blink/Blink.ino
diff --git a/arduino-core/.classpath b/arduino-core/.classpath
index a74c83fd64f..3f0d53aaaf6 100644
--- a/arduino-core/.classpath
+++ b/arduino-core/.classpath
@@ -5,11 +5,9 @@
-
+
-
-
@@ -20,7 +18,6 @@
-
diff --git a/arduino-core/lib/jackson-module-mrbean-2.9.5.jar b/arduino-core/lib/jackson-module-mrbean-2.9.5.jar
deleted file mode 100644
index dc7f5a05721..00000000000
Binary files a/arduino-core/lib/jackson-module-mrbean-2.9.5.jar and /dev/null differ
diff --git a/arduino-core/lib/jmdns-3.5.3.jar b/arduino-core/lib/jmdns-3.5.3.jar
deleted file mode 100644
index d4d9c67f46c..00000000000
Binary files a/arduino-core/lib/jmdns-3.5.3.jar and /dev/null differ
diff --git a/arduino-core/lib/jmdns-3.5.5.jar b/arduino-core/lib/jmdns-3.5.5.jar
new file mode 100644
index 00000000000..a8b65ff2ec7
Binary files /dev/null and b/arduino-core/lib/jmdns-3.5.5.jar differ
diff --git a/arduino-core/lib/log4j-api-2.12.0.jar b/arduino-core/lib/log4j-api-2.12.0.jar
deleted file mode 100644
index 93f770d64a9..00000000000
Binary files a/arduino-core/lib/log4j-api-2.12.0.jar and /dev/null differ
diff --git a/arduino-core/lib/log4j-core-2.12.0.jar b/arduino-core/lib/log4j-core-2.12.0.jar
deleted file mode 100644
index fbab720635d..00000000000
Binary files a/arduino-core/lib/log4j-core-2.12.0.jar and /dev/null differ
diff --git a/arduino-core/src/cc/arduino/Compiler.java b/arduino-core/src/cc/arduino/Compiler.java
index d1aa1f2bdce..5ad4484d98d 100644
--- a/arduino-core/src/cc/arduino/Compiler.java
+++ b/arduino-core/src/cc/arduino/Compiler.java
@@ -101,8 +101,8 @@ public class Compiler implements MessageConsumer {
tr("Couldn't determine program size: {0}");
tr("Global variables use {0} bytes ({2}%%) of dynamic memory, leaving {3} bytes for local variables. Maximum is {1} bytes.");
tr("Global variables use {0} bytes of dynamic memory.");
- tr("Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.");
- tr("Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.");
+ tr("Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.");
+ tr("Not enough memory; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing your footprint.");
tr("Low memory available, stability problems may occur.");
tr("An error occurred while verifying the sketch");
tr("An error occurred while verifying/uploading the sketch");
@@ -134,7 +134,7 @@ enum BuilderAction {
}
}
- private static final Pattern ERROR_FORMAT = Pattern.compile("(.+\\.\\w+):(\\d+)(:\\d+)*:\\s*(fatal)?\\s*error:\\s*(.*)\\s*", Pattern.MULTILINE | Pattern.DOTALL);
+ private static final Pattern ERROR_FORMAT = Pattern.compile("(.+\\.\\w+):(\\d+)(:\\d+)*:\\s*((fatal)?\\s*error:\\s*)(.*)\\s*", Pattern.MULTILINE | Pattern.DOTALL);
private final File pathToSketch;
private final Sketch sketch;
@@ -516,16 +516,14 @@ public void message(String s) {
if (pieces != null) {
String msg = "";
- int errorIdx = pieces.length - 1;
- String error = pieces[errorIdx];
String filename = pieces[1];
int line = PApplet.parseInt(pieces[2]);
- int col;
- if (errorIdx > 3) {
+ int col = -1;
+ if (pieces[3] != null) {
col = PApplet.parseInt(pieces[3].substring(1));
- } else {
- col = -1;
}
+ String errorPrefix = pieces[4];
+ String error = pieces[6];
if (error.trim().equals("SPI.h: No such file or directory")) {
error = tr("Please import the SPI library from the Sketch > Import Library menu.");
@@ -585,11 +583,8 @@ public void message(String s) {
String fileName = ex.getCodeFile().getPrettyName();
int lineNum = ex.getCodeLine() + 1;
int colNum = ex.getCodeColumn();
- if (colNum != -1) {
- s = fileName + ":" + lineNum + ":" + colNum + ": error: " + error + msg;
- } else {
- s = fileName + ":" + lineNum + ": error: " + error + msg;
- }
+ String column = (colNum != -1) ? (":" + colNum) : "";
+ s = fileName + ":" + lineNum + column + ": " + errorPrefix + error + msg;
}
if (ex != null) {
diff --git a/arduino-core/src/cc/arduino/Constants.java b/arduino-core/src/cc/arduino/Constants.java
index 8a0b47a5bc6..20858ea99f3 100644
--- a/arduino-core/src/cc/arduino/Constants.java
+++ b/arduino-core/src/cc/arduino/Constants.java
@@ -58,10 +58,8 @@ public class Constants {
public static final String PREF_PROXY_PAC_URL = "proxy.pac.url";
public static final String PREF_PROXY_MANUAL_HOSTNAME = "proxy.manual.hostname";
public static final String PREF_PROXY_MANUAL_PORT = "proxy.manual.port";
- public static final String PREF_PROXY_MANUAL_USERNAME = "proxy.manual.username";
- public static final String PREF_PROXY_MANUAL_PASSWORD = "proxy.manual.password";
- public static final String PREF_PROXY_AUTO_USERNAME = "proxy.manual.username";
- public static final String PREF_PROXY_AUTO_PASSWORD = "proxy.manual.password";
+ public static final String PREF_PROXY_USERNAME = "proxy.manual.username";
+ public static final String PREF_PROXY_PASSWORD = "proxy.manual.password";
public static final String PACKAGE_INDEX_URL;
public static final String LIBRARY_INDEX_URL;
diff --git a/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java b/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java
index 4ddca67b3cd..620152abf83 100644
--- a/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java
+++ b/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java
@@ -34,8 +34,6 @@
import cc.arduino.utils.Progress;
import cc.arduino.utils.network.FileDownloader;
import org.apache.commons.io.FilenameUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import processing.app.BaseNoGui;
import processing.app.PreferencesData;
@@ -48,8 +46,6 @@
import static processing.app.I18n.tr;
public class DownloadableContributionsDownloader {
- private static Logger log = LogManager.getLogger(DownloadableContributionsDownloader.class);
-
private final File stagingFolder;
public DownloadableContributionsDownloader(File _stagingFolder) {
@@ -62,7 +58,12 @@ public File download(DownloadableContribution contribution, Progress progress, f
public File download(DownloadableContribution contribution, Progress progress, final String statusText, ProgressListener progressListener, boolean noResume, boolean allowCache) throws Exception {
URL url = new URL(contribution.getUrl());
- Path outputFile = Paths.get(stagingFolder.getAbsolutePath(), contribution.getArchiveFileName());
+ // Filter out paths from file name
+ String filename = new File(contribution.getArchiveFileName()).getName();
+ Path outputFile = Paths.get(stagingFolder.getAbsolutePath(), filename).normalize();
+ if (outputFile.toFile().isDirectory()) {
+ throw new Exception(format("Can't download {0}: invalid filename or exinsting directory", contribution.getArchiveFileName()));
+ }
// Ensure the existence of staging folder
Files.createDirectories(stagingFolder.toPath());
@@ -146,7 +147,6 @@ public void download(URL url, File tmpFile, Progress progress, String statusText
}
public void downloadIndexAndSignature(MultiStepProgress progress, URL packageIndexUrl, ProgressListener progressListener, SignatureVerifier signatureVerifier) throws Exception {
-
// Extract the file name from the url
final String indexFileName = FilenameUtils.getName(packageIndexUrl.getPath());
final File packageIndex = BaseNoGui.indexer.getIndexFile(indexFileName);
@@ -164,16 +164,13 @@ public void downloadIndexAndSignature(MultiStepProgress progress, URL packageInd
if (checkSignature(progress, signatureUrl, progressListener, signatureVerifier, statusText, packageIndexTemp)) {
Files.move(packageIndexTemp.toPath(), packageIndex.toPath(), StandardCopyOption.REPLACE_EXISTING);
} else {
- log.info("The cached files have been removed. {} {}", packageIndexUrl, signatureUrl);
FileDownloader.invalidateFiles(packageIndexUrl, signatureUrl);
}
} else {
// Move the package index to the destination when the signature is not necessary
Files.move(packageIndexTemp.toPath(), packageIndex.toPath(), StandardCopyOption.REPLACE_EXISTING);
- log.info("The domain is not selected to verify the signature. will be copied into this path {}, packageIndex url: {}", packageIndex, packageIndexUrl);
}
} catch (Exception e) {
- log.error("Cannot download the package index from {} the package will be discard", packageIndexUrl, e);
throw e;
} finally {
// Delete useless temp file
@@ -191,49 +188,39 @@ public boolean verifyDomain(URL url) {
if (domain.contains(url.getHost())) {
return true;
} else {
- log.info("The domain is not selected to verify the signature. domain list: {}, url: {}", domain, url);
return false;
}
}
public boolean checkSignature(MultiStepProgress progress, URL signatureUrl, ProgressListener progressListener, SignatureVerifier signatureVerifier, String statusText, File fileToVerify) throws Exception {
-
-
// Signature file name
final String signatureFileName = FilenameUtils.getName(signatureUrl.getPath());
final File packageIndexSignature = BaseNoGui.indexer.getIndexFile(signatureFileName);
final File packageIndexSignatureTemp = File.createTempFile(signatureFileName, ".tmp");
-
try {
// Download signature
download(signatureUrl, packageIndexSignatureTemp, progress, statusText, progressListener, true);
if (PreferencesData.areInsecurePackagesAllowed()) {
Files.move(packageIndexSignatureTemp.toPath(), packageIndexSignature.toPath(), StandardCopyOption.REPLACE_EXISTING);
- log.info("Allowing insecure packages because allow_insecure_packages is set to true in preferences.txt" +
- " but the signature was download");
return true;
}
// Verify the signature before move the files
final boolean signatureVerified = signatureVerifier.isSigned(fileToVerify, packageIndexSignatureTemp);
if (signatureVerified) {
- log.info("Signature verified. url={}, signature url={}, file to verify={}, signature file={}", signatureUrl, signatureUrl, fileToVerify, packageIndexSignatureTemp);
// Move if the signature is ok
Files.move(packageIndexSignatureTemp.toPath(), packageIndexSignature.toPath(), StandardCopyOption.REPLACE_EXISTING);
} else {
- log.error("{} file signature verification failed. File ignored.", signatureUrl);
System.err.println(format(tr("{0} file signature verification failed. File ignored."), signatureUrl.toString()));
}
return signatureVerified;
} catch (Exception e) {
- log.error("Cannot download the signature from {} the package will be discard", signatureUrl, e);
throw e;
} finally {
Files.deleteIfExists(packageIndexSignatureTemp.toPath());
}
-
}
}
diff --git a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java
index 692a3dfb20b..603b46909b3 100644
--- a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java
+++ b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java
@@ -35,38 +35,67 @@
import static processing.app.I18n.tr;
import java.util.Comparator;
+import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import cc.arduino.contributions.VersionHelper;
-public abstract class ContributedLibrary extends DownloadableContribution {
+public class ContributedLibrary extends DownloadableContribution {
- public abstract String getName();
+ private String url;
+ private String version;
+ private String checksum;
+ private long size;
+ private String archiveFileName;
+ private String name;
+ private String maintainer;
+ private String author;
+ private String website;
+ private String category;
+ private String licence;
+ private String paragraph;
+ private String sentence;
+ private ArrayList architectures;
+ private ArrayList types;
+ private ArrayList dependencies;
+ private ArrayList providesIncludes;
- public abstract String getMaintainer();
+ public String getUrl() { return url; }
- public abstract String getAuthor();
+ public String getVersion() { return version; }
- public abstract String getWebsite();
+ public String getChecksum() { return checksum; }
- public abstract String getCategory();
+ public long getSize() { return size; }
- public abstract void setCategory(String category);
+ public String getArchiveFileName() { return archiveFileName; }
- public abstract String getLicense();
+ public String getName() { return name; }
- public abstract String getParagraph();
+ public String getMaintainer() { return maintainer; }
- public abstract String getSentence();
+ public String getAuthor() { return author; }
- public abstract List getArchitectures();
+ public String getWebsite() { return website; }
- public abstract List getTypes();
+ public String getCategory() { return category; }
- public abstract List getDependencies();
+ public void setCategory(String category) { this.category = category; }
- public abstract List getProvidesIncludes();
+ public String getLicense() { return licence; }
+
+ public String getParagraph() { return paragraph; }
+
+ public String getSentence() { return sentence; }
+
+ public List getArchitectures() { return architectures; }
+
+ public List getTypes() { return types; }
+
+ public List getDependencies() { return dependencies; }
+
+ public List getProvidesIncludes() { return providesIncludes; }
public static final Comparator CASE_INSENSITIVE_ORDER = (o1, o2) -> o1.getName().compareToIgnoreCase(o2.getName());
diff --git a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java
index e8e500dd585..4da5ba6f75b 100644
--- a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java
+++ b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java
@@ -29,11 +29,14 @@
package cc.arduino.contributions.libraries;
-public abstract class ContributedLibraryDependency {
+public class ContributedLibraryDependency {
- public abstract String getName();
+ private String name;
+ private String version;
- public abstract String getVersion();
+ public String getName() { return name; }
+
+ public String getVersion() { return version; }
@Override
public String toString() {
diff --git a/arduino-core/src/cc/arduino/contributions/libraries/EmptyLibrariesIndex.java b/arduino-core/src/cc/arduino/contributions/libraries/EmptyLibrariesIndex.java
deleted file mode 100644
index f85ab46ef3c..00000000000
--- a/arduino-core/src/cc/arduino/contributions/libraries/EmptyLibrariesIndex.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * This file is part of Arduino.
- *
- * Copyright 2016 Arduino LLC (http://www.arduino.cc/)
- *
- * Arduino is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * As a special exception, you may use this file as part of a free software
- * library without restriction. Specifically, if other files instantiate
- * templates or use macros or inline functions from this file, or you compile
- * this file and link it with other files to produce an executable, this
- * file does not by itself cause the resulting executable to be covered by
- * the GNU General Public License. This exception does not however
- * invalidate any other reasons why the executable file might be covered by
- * the GNU General Public License.
- */
-
-package cc.arduino.contributions.libraries;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class EmptyLibrariesIndex extends LibrariesIndex {
-
- private List list = new ArrayList<>();
-
- @Override
- public List getLibraries() {
- return list;
- }
-
-}
diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java
index d66a31fd3ce..02ff0475cfa 100644
--- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java
+++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java
@@ -40,9 +40,13 @@
import cc.arduino.contributions.VersionComparator;
-public abstract class LibrariesIndex {
+public class LibrariesIndex {
- public abstract List getLibraries();
+ private ArrayList list = new ArrayList<>();
+
+ public List getLibraries() {
+ return list;
+ }
public List find(final String name) {
return getLibraries().stream() //
diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java
index c43a4a09423..57460fc19e1 100644
--- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java
+++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java
@@ -36,7 +36,6 @@
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.module.mrbean.MrBeanModule;
import org.apache.commons.compress.utils.IOUtils;
import processing.app.BaseNoGui;
import processing.app.I18n;
@@ -76,7 +75,7 @@ public LibrariesIndexer(File preferencesFolder) {
}
public void parseIndex() throws IOException {
- index = new EmptyLibrariesIndex(); // Fallback
+ index = new LibrariesIndex(); // Fallback
if (!indexFile.exists()) {
return;
@@ -92,7 +91,6 @@ private void parseIndex(File file) throws IOException {
try {
indexIn = new FileInputStream(file);
ObjectMapper mapper = new ObjectMapper();
- mapper.registerModule(new MrBeanModule());
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
@@ -116,7 +114,11 @@ private void parseIndex(File file) throws IOException {
}
public void setLibrariesFolders(List folders) {
- librariesFolders = folders;
+ this.librariesFolders = folders;
+ }
+
+ public void setLibrariesFoldersAndRescan(List folders) {
+ setLibrariesFolders(folders);
rescanLibraries();
}
diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java b/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java
index 3f00f909b0d..64a15e7b2b3 100644
--- a/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java
+++ b/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java
@@ -38,8 +38,6 @@
import cc.arduino.utils.MultiStepProgress;
import cc.arduino.utils.network.FileDownloader;
import org.apache.commons.io.FilenameUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import processing.app.BaseNoGui;
import processing.app.I18n;
import processing.app.Platform;
@@ -57,8 +55,6 @@
import static processing.app.I18n.tr;
public class LibraryInstaller {
- private static Logger log = LogManager.getLogger(LibraryInstaller.class);
-
private final Platform platform;
private final GPGDetachedSignatureVerifier signatureVerifier;
@@ -97,10 +93,7 @@ public synchronized void updateIndex(ProgressListener progressListener) throws E
}
} else {
FileDownloader.invalidateFiles(libraryGzURL, libraryURL, signatureUrl);
- log.error("Fail to verify the signature of {} the cached files have been removed", libraryURL);
}
- } else {
- log.info("The domain is not selected to verify the signature. library index: {}", signatureUrl);
}
// Step 2: Parse index
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributedBoard.java b/arduino-core/src/cc/arduino/contributions/packages/ContributedBoard.java
index 7017ced5d10..c29110376bc 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributedBoard.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributedBoard.java
@@ -29,8 +29,9 @@
package cc.arduino.contributions.packages;
-public interface ContributedBoard {
+public class ContributedBoard {
- String getName();
+ private String name;
+ public String getName() { return name; }
}
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributedHelp.java b/arduino-core/src/cc/arduino/contributions/packages/ContributedHelp.java
index a8f998f668b..2156f5c48c9 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributedHelp.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributedHelp.java
@@ -29,8 +29,9 @@
package cc.arduino.contributions.packages;
-public abstract class ContributedHelp {
+public class ContributedHelp {
- public abstract String getOnline();
+ private String online;
+ public String getOnline() { return online; }
}
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributedPackage.java b/arduino-core/src/cc/arduino/contributions/packages/ContributedPackage.java
index 507a63be11d..8b260527ae5 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributedPackage.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributedPackage.java
@@ -29,25 +29,33 @@
package cc.arduino.contributions.packages;
+import java.util.ArrayList;
import java.util.List;
-public abstract class ContributedPackage {
+public class ContributedPackage {
- public abstract String getName();
+ private String name;
+ private String maintainer;
+ private String websiteURL;
+ private String email;
+ private ArrayList platforms = new ArrayList();
+ private ArrayList tools = new ArrayList();
+ private ContributedHelp help;
+ private boolean trusted;
- public abstract String getMaintainer();
+ public String getName() { return name; }
- public abstract String getWebsiteURL();
+ public String getMaintainer() { return maintainer; }
- public abstract String getEmail();
+ public String getWebsiteURL() { return websiteURL; }
- public abstract List getPlatforms();
+ public String getEmail() { return email; }
- public abstract List getTools();
+ public List getPlatforms() { return platforms; }
- public abstract ContributedHelp getHelp();
+ public List getTools() { return tools; }
- private boolean trusted;
+ public ContributedHelp getHelp() { return help; }
public ContributedPlatform findPlatform(String architecture, String version) {
if (architecture == null || version == null) {
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributedPlatform.java b/arduino-core/src/cc/arduino/contributions/packages/ContributedPlatform.java
index 3149aea1e2f..6c11a4cc26b 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributedPlatform.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributedPlatform.java
@@ -29,32 +29,67 @@
package cc.arduino.contributions.packages;
-import cc.arduino.contributions.DownloadableContribution;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
-public abstract class ContributedPlatform extends DownloadableContribution {
+import cc.arduino.contributions.DownloadableContribution;
- public abstract String getName();
+public class ContributedPlatform extends DownloadableContribution {
+
+ private String url;
+ private String version;
+ private long size;
+ private String archiveFileName;
+ private String name;
+ private String category;
+ private String architecture;
+ private String checksum;
+ private ArrayList toolsDependencies = new ArrayList<>();
+ private ArrayList boards = new ArrayList<>();
+ private ContributedHelp help;
+ private boolean installed;
+ private File installedFolder;
+ private boolean builtIn;
+ private Map resolvedToolReferences;
+ private ContributedPackage parentPackage;
+ private boolean deprecated;
- public abstract String getCategory();
+ @Override
+ public String getUrl() { return url; }
- public abstract void setCategory(String category);
+ @Override
+ public String getVersion() { return version; }
- public abstract String getArchitecture();
+ @Override
+ public long getSize() { return size; }
@Override
- public abstract String getChecksum();
+ public String getArchiveFileName() { return archiveFileName; }
- public abstract List getToolsDependencies();
+ public String getName() { return name; }
- public abstract List getBoards();
+ public String getCategory() { return category; }
- public abstract ContributedHelp getHelp();
+ public void setCategory(String category) { this.category = category; }
- private boolean installed;
+ public String getArchitecture() { return architecture; }
+
+ @Override
+ public String getChecksum() { return checksum; }
+
+ public List getToolsDependencies() { return toolsDependencies; }
+
+ public List getBoards() { return boards; }
+
+ public ContributedHelp getHelp() { return help; }
public boolean isInstalled() {
return installed;
@@ -64,8 +99,6 @@ public void setInstalled(boolean installed) {
this.installed = installed;
}
- private File installedFolder;
-
public File getInstalledFolder() {
return installedFolder;
}
@@ -74,8 +107,6 @@ public void setInstalledFolder(File installedFolder) {
this.installedFolder = installedFolder;
}
- private boolean builtIn;
-
public boolean isBuiltIn() {
return builtIn;
}
@@ -90,10 +121,6 @@ public void setBuiltIn(boolean builtIn) {
return px - py;
};
- private Map resolvedToolReferences;
-
- private ContributedPackage parentPackage;
-
public List getResolvedTools() {
return new LinkedList<>(resolvedToolReferences.values());
}
@@ -131,6 +158,14 @@ public void setParentPackage(ContributedPackage parentPackage) {
this.parentPackage = parentPackage;
}
+ public boolean isDeprecated() {
+ return deprecated;
+ }
+
+ public void setDeprecated(boolean deprecated) {
+ this.deprecated = deprecated;
+ }
+
@Override
public String toString() {
return getParsedVersion();
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributedTool.java b/arduino-core/src/cc/arduino/contributions/packages/ContributedTool.java
index cafeb9aef84..915dc28489b 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributedTool.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributedTool.java
@@ -33,17 +33,24 @@
import processing.app.Platform;
import java.io.File;
+import java.util.ArrayList;
import java.util.List;
-public abstract class ContributedTool {
+public class ContributedTool {
- public abstract String getName();
+ private String name;
+ private String version;
+ private ArrayList systems = new ArrayList();
+ private boolean installed;
+ private File installedFolder;
+ private boolean builtIn;
+ private ContributedPackage contributedPackage;
- public abstract String getVersion();
+ public String getName() { return name; }
- public abstract List getSystems();
+ public String getVersion() { return version; }
- private boolean installed;
+ public List getSystems() { return systems; }
public boolean isInstalled() {
return installed;
@@ -53,8 +60,6 @@ public void setInstalled(boolean installed) {
this.installed = installed;
}
- private File installedFolder;
-
public File getInstalledFolder() {
return installedFolder;
}
@@ -63,8 +68,6 @@ public void setInstalledFolder(File installedFolder) {
this.installedFolder = installedFolder;
}
- private boolean builtIn;
-
public boolean isBuiltIn() {
return builtIn;
}
@@ -73,8 +76,6 @@ public void setBuiltIn(boolean builtIn) {
this.builtIn = builtIn;
}
- private ContributedPackage contributedPackage;
-
public ContributedPackage getPackage() {
return contributedPackage;
}
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributedToolReference.java b/arduino-core/src/cc/arduino/contributions/packages/ContributedToolReference.java
index 7d86f234f23..3faf0cbbd31 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributedToolReference.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributedToolReference.java
@@ -31,13 +31,17 @@
import java.util.Collection;
-public abstract class ContributedToolReference {
+public class ContributedToolReference {
- public abstract String getName();
+ private String name;
+ private String version;
+ private String packager;
- public abstract String getVersion();
+ public String getName() { return name; }
- public abstract String getPackager();
+ public String getVersion() { return version; }
+
+ public String getPackager() { return packager; }
public ContributedTool resolve(Collection packages) {
for (ContributedPackage pack : packages) {
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java b/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java
index 2b6ff4cdea8..1540ce54c40 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java
@@ -41,9 +41,6 @@
import org.apache.commons.exec.DefaultExecutor;
import org.apache.commons.exec.Executor;
import org.apache.commons.exec.PumpStreamHandler;
-import org.apache.commons.io.FilenameUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import processing.app.BaseNoGui;
import processing.app.I18n;
import processing.app.Platform;
@@ -65,8 +62,6 @@
import static processing.app.I18n.tr;
public class ContributionInstaller {
- private static Logger log = LogManager.getLogger(ContributionInstaller.class);
-
private final Platform platform;
private final SignatureVerifier signatureVerifier;
@@ -272,8 +267,6 @@ public synchronized List remove(ContributedPlatform contributedPlatform)
Files.delete(destFolder.getParentFile().toPath());
} catch (Exception e) {
// ignore
- log.info("The directory is not empty there is another version installed. directory {}",
- destFolder.getParentFile().toPath(), e);
}
}
@@ -284,7 +277,7 @@ public synchronized List remove(ContributedPlatform contributedPlatform)
return errors;
}
- public synchronized List updateIndex(ProgressListener progressListener) {
+ public synchronized void updateIndex(ProgressListener progressListener) {
MultiStepProgress progress = new MultiStepProgress(1);
final DownloadableContributionsDownloader downloader = new DownloadableContributionsDownloader(BaseNoGui.indexer.getStagingFolder());
@@ -293,41 +286,18 @@ public synchronized List updateIndex(ProgressListener progressListener)
PreferencesData.getCollection(Constants.PREF_BOARDS_MANAGER_ADDITIONAL_URLS)
);
packageIndexURLs.add(Constants.PACKAGE_INDEX_URL);
- List downloadedPackageIndexFilesAccumulator = new LinkedList<>();
for (String packageIndexURLString : packageIndexURLs) {
try {
// Extract the file name from the URL
final URL packageIndexURL = new URL(packageIndexURLString);
- String indexFileName = FilenameUtils.getName(packageIndexURL.getPath());
- downloadedPackageIndexFilesAccumulator.add(BaseNoGui.indexer.getIndexFile(indexFileName).getName());
- log.info("Start download and signature check of={}", packageIndexURLs);
downloader.downloadIndexAndSignature(progress, packageIndexURL, progressListener, signatureVerifier);
} catch (Exception e) {
- log.error(e.getMessage(), e);
System.err.println(e.getMessage());
}
}
progress.stepDone();
- log.info("Downloaded package index URL={}", packageIndexURLs);
- return downloadedPackageIndexFilesAccumulator;
- }
-
- public synchronized void deleteUnknownFiles(List downloadedPackageIndexFiles) throws IOException {
- File preferencesFolder = BaseNoGui.indexer.getIndexFile(".").getParentFile();
- File[] additionalPackageIndexFiles = preferencesFolder.listFiles(new PackageIndexFilenameFilter(Constants.DEFAULT_INDEX_FILE_NAME));
- if (additionalPackageIndexFiles == null) {
- return;
- }
- log.info("Check unknown files. Additional package index folder files={}, Additional package index url downloaded={}", downloadedPackageIndexFiles, additionalPackageIndexFiles);
-
- for (File additionalPackageIndexFile : additionalPackageIndexFiles) {
- if (!downloadedPackageIndexFiles.contains(additionalPackageIndexFile.getName())) {
- log.info("Delete this unknown file={} because not included in this list={}", additionalPackageIndexFile, additionalPackageIndexFiles);
- Files.delete(additionalPackageIndexFile.toPath());
- }
- }
}
}
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndex.java b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndex.java
index 4ca65863939..6b86b0fb234 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndex.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndex.java
@@ -38,9 +38,10 @@
import java.util.List;
import java.util.stream.Collectors;
-public abstract class ContributionsIndex {
+public class ContributionsIndex {
- public abstract List getPackages();
+ private ArrayList packages = new ArrayList<>();
+ public List getPackages() { return packages; }
public ContributedPackage findPackage(String packageName) {
for (ContributedPackage pack : getPackages()) {
diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java
index 2a97e0e7d0e..b0db6ca1981 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java
@@ -35,8 +35,8 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.module.mrbean.MrBeanModule;
import org.apache.commons.compress.utils.IOUtils;
+import org.apache.commons.io.FilenameUtils;
import processing.app.BaseNoGui;
import processing.app.Platform;
@@ -51,6 +51,8 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.*;
import java.util.stream.Collectors;
@@ -73,7 +75,7 @@ public ContributionsIndexer(File preferencesFolder, File builtInHardwareFolder,
this.builtInHardwareFolder = builtInHardwareFolder;
this.platform = platform;
this.signatureVerifier = signatureVerifier;
- index = new EmptyContributionIndex();
+ index = new ContributionsIndex();
packagesFolder = new File(preferencesFolder, "packages");
stagingFolder = new File(preferencesFolder, "staging" + File.separator + "packages");
}
@@ -108,19 +110,14 @@ public void parseIndex() throws Exception {
index.getPackages().forEach(pack -> pack.setTrusted(true));
// Overlay 3rd party indexes
- File[] indexFiles = preferencesFolder.listFiles(new TestPackageIndexFilenameFilter(new PackageIndexFilenameFilter(Constants.DEFAULT_INDEX_FILE_NAME)));
-
- if (indexFiles != null) {
- for (File indexFile : indexFiles) {
- try {
- mergeContributions(indexFile);
- } catch (JsonProcessingException e) {
- System.err.println(format(tr("Skipping contributed index file {0}, parsing error occured:"), indexFile));
- System.err.println(e);
- }
+ List indexFiles = get3rdPartyIndexFiles();
+ for (File indexFile : indexFiles) {
+ try {
+ mergeContributions(indexFile);
+ } catch (JsonProcessingException e) {
+ System.err.println(format(tr("Skipping contributed index file {0}, parsing error occured:"), indexFile));
+ System.err.println(e);
}
- } else {
- System.err.println(format(tr("Error reading package indexes folder: {0}\n(maybe a permission problem?)"), preferencesFolder));
}
// Fill tools and toolsDependency cross references
@@ -147,6 +144,34 @@ public void parseIndex() throws Exception {
index.fillCategories();
}
+ private List get3rdPartyIndexFiles() {
+ List indexFiles = new ArrayList<>();
+ for (String urlString : PreferencesData.getCollection(Constants.PREF_BOARDS_MANAGER_ADDITIONAL_URLS)) {
+ URL url;
+ try {
+ url = new URL(urlString);
+ String filename = FilenameUtils.getName(url.getPath());
+ indexFiles.add(getIndexFile(filename));
+ } catch (MalformedURLException e) {
+ System.err.println(format(tr("Malformed Additional Board Manager URL '{0}': {1}"), urlString, e.getMessage()));
+ }
+ }
+
+ File[] testIndexFiles = preferencesFolder.listFiles((dir, name) -> {
+ if (!new File(dir, name).isFile())
+ return false;
+ if (!name.startsWith("test_package_") || !name.endsWith("_index.json"))
+ return false;
+ return true;
+ });
+ if (testIndexFiles == null) {
+ System.err.println(
+ format(tr("Error reading package indexes folder: {0}\n(maybe a permission problem?)"), preferencesFolder));
+ }
+ indexFiles.addAll(Arrays.asList(testIndexFiles));
+ return indexFiles;
+ }
+
private void mergeContributions(File indexFile) throws IOException {
if (!indexFile.exists())
return;
@@ -208,7 +233,6 @@ private ContributionsIndex parseIndex(File indexFile) throws IOException {
try {
inputStream = new FileInputStream(indexFile);
ObjectMapper mapper = new ObjectMapper();
- mapper.registerModule(new MrBeanModule());
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
diff --git a/arduino-core/src/cc/arduino/contributions/packages/EmptyContributionIndex.java b/arduino-core/src/cc/arduino/contributions/packages/EmptyContributionIndex.java
deleted file mode 100644
index 200dce3c2fe..00000000000
--- a/arduino-core/src/cc/arduino/contributions/packages/EmptyContributionIndex.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * This file is part of Arduino.
- *
- * Copyright 2014 Arduino LLC (http://www.arduino.cc/)
- *
- * Arduino is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * As a special exception, you may use this file as part of a free software
- * library without restriction. Specifically, if other files instantiate
- * templates or use macros or inline functions from this file, or you compile
- * this file and link it with other files to produce an executable, this
- * file does not by itself cause the resulting executable to be covered by
- * the GNU General Public License. This exception does not however
- * invalidate any other reasons why the executable file might be covered by
- * the GNU General Public License.
- */
-
-package cc.arduino.contributions.packages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-class EmptyContributionIndex extends ContributionsIndex {
- List packs = new ArrayList<>();
-
- @Override
- public List getPackages() {
- return packs;
- }
-}
\ No newline at end of file
diff --git a/arduino-core/src/cc/arduino/contributions/packages/HostDependentDownloadableContribution.java b/arduino-core/src/cc/arduino/contributions/packages/HostDependentDownloadableContribution.java
index cb7137d8638..2b692a54fb8 100644
--- a/arduino-core/src/cc/arduino/contributions/packages/HostDependentDownloadableContribution.java
+++ b/arduino-core/src/cc/arduino/contributions/packages/HostDependentDownloadableContribution.java
@@ -32,9 +32,26 @@
import cc.arduino.contributions.DownloadableContribution;
import processing.app.Platform;
-public abstract class HostDependentDownloadableContribution extends DownloadableContribution {
+public class HostDependentDownloadableContribution extends DownloadableContribution {
- public abstract String getHost();
+ private String url;
+ private String version;
+ private String checksum;
+ private long size;
+ private String archiveFileName;
+ private String host;
+
+ public String getUrl() { return url; }
+
+ public String getVersion() { return version; }
+
+ public String getChecksum() { return checksum; }
+
+ public long getSize() { return size; }
+
+ public String getArchiveFileName() { return archiveFileName; }
+
+ public String getHost() { return host; }
@Override
public String toString() {
diff --git a/arduino-core/src/cc/arduino/contributions/packages/PackageIndexFilenameFilter.java b/arduino-core/src/cc/arduino/contributions/packages/PackageIndexFilenameFilter.java
deleted file mode 100644
index bfc016750a5..00000000000
--- a/arduino-core/src/cc/arduino/contributions/packages/PackageIndexFilenameFilter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This file is part of Arduino.
- *
- * Copyright 2015 Arduino LLC (http://www.arduino.cc/)
- *
- * Arduino is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * As a special exception, you may use this file as part of a free software
- * library without restriction. Specifically, if other files instantiate
- * templates or use macros or inline functions from this file, or you compile
- * this file and link it with other files to produce an executable, this
- * file does not by itself cause the resulting executable to be covered by
- * the GNU General Public License. This exception does not however
- * invalidate any other reasons why the executable file might be covered by
- * the GNU General Public License.
- */
-
-package cc.arduino.contributions.packages;
-
-import java.io.File;
-import java.io.FilenameFilter;
-
-public class PackageIndexFilenameFilter implements FilenameFilter {
-
- private final String defaultPackageIndexFileName;
-
- public PackageIndexFilenameFilter(String defaultPackageIndexFileName) {
- this.defaultPackageIndexFileName = defaultPackageIndexFileName;
- }
-
- @Override
- public boolean accept(File file, String name) {
- return new File(file, name).isFile() && !defaultPackageIndexFileName.equals(name) && name.startsWith("package_") && name.endsWith("_index.json");
- }
-}
diff --git a/arduino-core/src/cc/arduino/net/CustomProxySelector.java b/arduino-core/src/cc/arduino/net/CustomProxySelector.java
index 6bb29879e10..32a0894e89e 100644
--- a/arduino-core/src/cc/arduino/net/CustomProxySelector.java
+++ b/arduino-core/src/cc/arduino/net/CustomProxySelector.java
@@ -75,7 +75,7 @@ public Proxy getProxyFor(URI uri) throws IOException, ScriptException, NoSuchMet
}
private Proxy pacProxy(String pac, URI uri) throws IOException, ScriptException, NoSuchMethodException {
- setAuthenticator(preferences.get(Constants.PREF_PROXY_AUTO_USERNAME), preferences.get(Constants.PREF_PROXY_AUTO_PASSWORD));
+ setAuthenticator(preferences.get(Constants.PREF_PROXY_USERNAME), preferences.get(Constants.PREF_PROXY_PASSWORD));
URLConnection urlConnection = new URL(pac).openConnection();
urlConnection.connect();
@@ -141,7 +141,7 @@ private URL toUrl(URI uri) {
}
private Proxy manualProxy() {
- setAuthenticator(preferences.get(Constants.PREF_PROXY_MANUAL_USERNAME), preferences.get(Constants.PREF_PROXY_MANUAL_PASSWORD));
+ setAuthenticator(preferences.get(Constants.PREF_PROXY_USERNAME), preferences.get(Constants.PREF_PROXY_PASSWORD));
Proxy.Type type = Proxy.Type.valueOf(preferences.get(Constants.PREF_PROXY_MANUAL_TYPE));
return new Proxy(type, new InetSocketAddress(preferences.get(Constants.PREF_PROXY_MANUAL_HOSTNAME), Integer.valueOf(preferences.get(Constants.PREF_PROXY_MANUAL_PORT))));
}
diff --git a/arduino-core/src/cc/arduino/packages/BoardPort.java b/arduino-core/src/cc/arduino/packages/BoardPort.java
index 2052339f192..397c0818a49 100644
--- a/arduino-core/src/cc/arduino/packages/BoardPort.java
+++ b/arduino-core/src/cc/arduino/packages/BoardPort.java
@@ -122,6 +122,10 @@ public String toString() {
return this.address;
}
+ public String toCompleteString() {
+ return this.address + "_" + this.getPrefs().get("vid") + "_" + this.getPrefs().get("pid");
+ }
+
// Search for the board which matches identificationPrefs.
// If found, boardName is set to the name from boards.txt
// and the board is returned. If not found, null is returned.
diff --git a/arduino-core/src/cc/arduino/packages/DiscoveryManager.java b/arduino-core/src/cc/arduino/packages/DiscoveryManager.java
index 30f2f1d1dfc..21876ffc47e 100644
--- a/arduino-core/src/cc/arduino/packages/DiscoveryManager.java
+++ b/arduino-core/src/cc/arduino/packages/DiscoveryManager.java
@@ -35,6 +35,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.io.File;
import cc.arduino.packages.discoverers.PluggableDiscovery;
import cc.arduino.packages.discoverers.serial.SerialDiscovery;
@@ -65,6 +66,10 @@ public DiscoveryManager(Map packages) {
for (TargetPlatform platform: targetPackage.getPlatforms().values()) {
//System.out.println("installed: "+platform);
PreferencesMap prefs = platform.getPreferences().subTree("discovery");
+ PreferencesMap pathPrefs = new PreferencesMap();
+ File platformFolder = platform.getFolder();
+ pathPrefs.put("runtime.platform.path", platformFolder.getAbsolutePath());
+ pathPrefs.put("runtime.hardware.path", platformFolder.getParentFile().getAbsolutePath());
for (String discoveryName : prefs.firstLevelMap().keySet()) {
PreferencesMap discoveryPrefs = prefs.subTree(discoveryName);
@@ -76,9 +81,11 @@ public DiscoveryManager(Map packages) {
try {
if (PreferencesData.getBoolean("discovery.debug")) {
System.out.println("found discovery: " + discoveryName + " -> " + pattern);
+ System.out.println("with pathnames -> " + pathPrefs);
System.out.println("with preferencess -> " + discoveryPrefs);
}
pattern = StringReplacer.replaceFromMapping(pattern, PreferencesData.getMap());
+ pattern = StringReplacer.replaceFromMapping(pattern, pathPrefs);
String[] cmd = StringReplacer.formatAndSplit(pattern, discoveryPrefs);
discoverers.add(new PluggableDiscovery(discoveryName, cmd));
} catch (Exception e) {
diff --git a/arduino-core/src/cc/arduino/packages/Uploader.java b/arduino-core/src/cc/arduino/packages/Uploader.java
index 55ddd46e95a..0847027e2ac 100644
--- a/arduino-core/src/cc/arduino/packages/Uploader.java
+++ b/arduino-core/src/cc/arduino/packages/Uploader.java
@@ -176,7 +176,7 @@ public void message(String s) {
return;
}
if (StringUtils.containsAny(s, AVRDUDE_PROBLEMS)) {
- error = tr("Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.");
+ error = tr("Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.");
return;
}
if (s.contains("Expected signature")) {
diff --git a/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialDiscovery.java b/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialDiscovery.java
index 7ce44f56b5d..fc86c950ecd 100644
--- a/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialDiscovery.java
+++ b/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialDiscovery.java
@@ -46,7 +46,6 @@ public class SerialDiscovery implements Discovery, Runnable {
private final List oldPorts = new ArrayList<>();
public boolean uploadInProgress = false;
public boolean pausePolling = false;
- private BoardPort oldUploadBoardPort = null;
private final BoardCloudResolver boardCloudResolver = new BoardCloudResolver();
@@ -56,7 +55,7 @@ public List listDiscoveredBoards() {
}
@Override
- public List listDiscoveredBoards(boolean complete) {
+ public synchronized List listDiscoveredBoards(boolean complete) {
if (complete) {
return new ArrayList<>(serialBoardPorts);
}
@@ -69,7 +68,7 @@ public List listDiscoveredBoards(boolean complete) {
return onlineBoardPorts;
}
- public void setSerialBoardPorts(List newSerialBoardPorts) {
+ public synchronized void setSerialBoardPorts(List newSerialBoardPorts) {
serialBoardPorts.clear();
serialBoardPorts.addAll(newSerialBoardPorts);
}
@@ -116,36 +115,36 @@ public synchronized void forceRefresh() {
return;
}
- // if (updating) {}
- // a port will disappear, another will appear
- // use this information to "merge" the boards
- // updating must be signaled by SerialUpload class
-
oldPorts.clear();
oldPorts.addAll(ports);
+ // set unreachable ports offline
for (BoardPort board : boardPorts) {
- if (ports.contains(board.toString())) {
- if (board.isOnline()) {
- ports.remove(ports.indexOf(board.toString()));
- }
- } else {
- if (uploadInProgress && board.isOnline()) {
- oldUploadBoardPort = board;
- }
+ if (!ports.contains(board.toCompleteString())) {
board.setOnlineStatus(false);
}
}
+ // add information for newly added ports
for (String newPort : ports) {
- String[] parts = newPort.split("_");
+ // if port has been already discovered bring it back online
+ BoardPort oldBoardPort = boardPorts.stream() //
+ .filter(bp -> bp.toCompleteString().equalsIgnoreCase(newPort)) //
+ .findAny().orElse(null);
+ if (oldBoardPort != null) {
+ oldBoardPort.setOnlineStatus(true);
+ continue;
+ }
+
+ // Otherwise build a BoardPort object out of it and add it to
+ // to the known boardPorts
+ String[] parts = newPort.split("_");
if (parts.length < 3) {
// something went horribly wrong
continue;
}
-
if (parts.length > 3) {
// port name with _ in it (like CP2102 on OSX)
for (int i = 1; i < (parts.length-2); i++) {
@@ -157,59 +156,36 @@ public synchronized void forceRefresh() {
String port = parts[0];
- Map boardData = platform.resolveDeviceByVendorIdProductId(port, BaseNoGui.packages);
-
- BoardPort boardPort = null;
- int i = 0;
- // create new board or update existing
- for (BoardPort board : boardPorts) {
- if (board.toString().equals(newPort)) {
- boardPort = boardPorts.get(i);
- break;
- }
- i++;
- }
- if (boardPort == null) {
- boardPort = new BoardPort();
- boardPorts.add(boardPort);
- }
+ BoardPort boardPort = new BoardPort();
+ boardPorts.add(boardPort);
boardPort.setAddress(port);
boardPort.setProtocol("serial");
boardPort.setOnlineStatus(true);
+ boardPort.setLabel(port);
- String label = port;
-
+ Map boardData = platform.resolveDeviceByVendorIdProductId(port, BaseNoGui.packages);
if (boardData != null) {
boardPort.getPrefs().put("vid", boardData.get("vid").toString());
boardPort.getPrefs().put("pid", boardData.get("pid").toString());
String iserial = boardData.get("iserial").toString();
- if (iserial.length() >= 10) {
- boardPort.getPrefs().put("iserial", iserial);
- }
- if (uploadInProgress && oldUploadBoardPort!=null) {
- oldUploadBoardPort.getPrefs().put("iserial", iserial);
- }
+ boardPort.getPrefs().put("iserial", iserial);
TargetBoard board = (TargetBoard) boardData.get("board");
if (board != null) {
String boardName = board.getName();
boardPort.setBoardName(boardName);
}
+ } else if (!parts[1].equals("0000")) {
+ boardPort.getPrefs().put("vid", parts[1]);
+ boardPort.getPrefs().put("pid", parts[2]);
+ // ask Cloud API to match the board with known VID/PID pair
+ boardCloudResolver.getBoardBy(parts[1], parts[2]);
} else {
- if (!parts[1].equals("0000")) {
- boardPort.getPrefs().put("vid", parts[1]);
- boardPort.getPrefs().put("pid", parts[2]);
- // ask Cloud API to match the board with known VID/PID pair
- boardCloudResolver.getBoardBy(parts[1], parts[2]);
- } else {
- boardPort.getPrefs().put("vid", "0000");
- boardPort.getPrefs().put("pid", "0000");
- boardPort.getPrefs().put("iserial", "");
- }
+ boardPort.getPrefs().put("vid", "0000");
+ boardPort.getPrefs().put("pid", "0000");
+ boardPort.getPrefs().put("iserial", "");
}
-
- boardPort.setLabel(label);
}
setSerialBoardPorts(boardPorts);
}
diff --git a/arduino-core/src/cc/arduino/utils/network/FileDownloader.java b/arduino-core/src/cc/arduino/utils/network/FileDownloader.java
index b69a1fa1bc5..78c2cced8fa 100644
--- a/arduino-core/src/cc/arduino/utils/network/FileDownloader.java
+++ b/arduino-core/src/cc/arduino/utils/network/FileDownloader.java
@@ -30,8 +30,6 @@
package cc.arduino.utils.network;
import org.apache.commons.compress.utils.IOUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import processing.app.helpers.FileUtils;
import javax.script.ScriptException;
@@ -50,8 +48,6 @@
import java.util.Optional;
public class FileDownloader extends Observable {
- private static Logger log = LogManager.getLogger(FileDownloader.class);
-
public enum Status {
CONNECTING, //
CONNECTION_TIMEOUT_ERROR, //
@@ -146,17 +142,16 @@ public static void invalidateFiles(URL... filesUrl) {
try {
FileDownloaderCache.getFileCached(url).ifPresent(fileCached -> {
try {
- log.info("Invalidate this file {} that comes from {}", fileCached.getLocalPath(), fileCached.getRemoteURL());
fileCached.invalidateCache();
} catch (Exception e) {
- log.warn("Fail to invalidate cache", e);
+ System.err.println("Error invalidating cached file " + fileCached.getLocalPath() + " that comes from "
+ + fileCached.getRemoteURL() + ": " + e.getMessage());
}
});
} catch (URISyntaxException | NoSuchMethodException | ScriptException | IOException e) {
- log.warn("Fail to get the file cached during the file invalidation", e);
+ System.err.println("Fail to get the file cached during the file invalidation" + e.getMessage());
}
});
-
}
private void downloadFile(boolean noResume) throws InterruptedException {
@@ -171,7 +166,6 @@ private void downloadFile(boolean noResume) throws InterruptedException {
final Optional fileFromCache = getFileCached(fileCached);
if (fileCached.isNotChange() && fileFromCache.isPresent()) {
// Copy the cached file in the destination file
- log.info("The file will be taken from the cache {}", fileFromCache);
FileUtils.copyFile(fileFromCache.get(), outputFile);
} else {
openConnectionAndFillTheFile(noResume);
@@ -191,34 +185,23 @@ private void downloadFile(boolean noResume) throws InterruptedException {
} catch (SocketTimeoutException e) {
setStatus(Status.CONNECTION_TIMEOUT_ERROR);
setError(e);
- log.error("The request went in socket timeout", e);
} catch (Exception e) {
setStatus(Status.ERROR);
setError(e);
- log.error("The request stop", e);
}
}
private Optional getFileCached(FileDownloaderCache.FileCached fileCached) {
-
try {
- final Optional fileFromCache =
- fileCached.getFileFromCache();
+ final Optional fileFromCache = fileCached.getFileFromCache();
if (fileFromCache.isPresent()) {
- log.info("No need to download using cached file: {}", fileCached);
return fileFromCache;
- } else {
- log.info(
- "The file in the cache is not in the path or the md5 validation failed: path={}, file exist={}, md5 validation={}",
- fileCached.getLocalPath(), fileCached.exists(), fileCached.md5Check());
}
} catch (Exception e) {
- log.warn(
- "Cannot get the file from the cache, will be downloaded a new one ", e);
+ // Cannot get the file from the cache, download a new one
}
- log.info("The file is change {}", fileCached);
return Optional.empty();
}
diff --git a/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java b/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java
index 766e70859e1..a529a241d0f 100644
--- a/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java
+++ b/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java
@@ -38,8 +38,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import processing.app.BaseNoGui;
import processing.app.PreferencesData;
import processing.app.helpers.FileUtils;
@@ -64,8 +62,6 @@
public class FileDownloaderCache {
private final static String CACHE_ENABLE_PREFERENCE_KEY = "cache.enable";
- private final static Logger log = LogManager
- .getLogger(FileDownloaderCache.class);
private final static Map cachedFiles = Collections
.synchronizedMap(new HashMap<>());
private final static String cacheFolder;
@@ -73,9 +69,6 @@ public class FileDownloaderCache {
static {
enableCache = Boolean.valueOf(PreferencesData.get(CACHE_ENABLE_PREFERENCE_KEY, "true"));
- if (!enableCache) {
- log.info("The cache is disable cache.enable=false");
- }
PreferencesData.set(CACHE_ENABLE_PREFERENCE_KEY, Boolean.toString(enableCache));
final File settingsFolder;
@@ -86,10 +79,8 @@ public class FileDownloaderCache {
} else {
enableCache = false;
cacheFolder = null;
- log.error("The cache will disable because the setting folder is null, cannot generate the cache path");
}
final Path pathCacheInfo = getCachedInfoPath();
- log.info("Cache folder {}", cacheFolder);
try {
if (Files.exists(pathCacheInfo)) {
ObjectMapper mapper = new ObjectMapper();
@@ -109,31 +100,26 @@ public class FileDownloaderCache {
.collect(Collectors.toMap(FileCached::getRemoteURL, Function.identity()))
)
);
- log.info("Number of file already in the cache {}", cachedFiles.size());
}
} catch (Exception e) {
- log.error("Cannot initialized the cache", e);
+ System.err.println("Cannot initialized the cache: " + e.getMessage());
}
}
public static Optional getFileCached(final URL remoteURL)
- throws URISyntaxException, NoSuchMethodException, ScriptException,
- IOException {
+ throws URISyntaxException, NoSuchMethodException, ScriptException, IOException {
return getFileCached(remoteURL, true);
}
public static Optional getFileCached(final URL remoteURL, boolean enableCache)
- throws URISyntaxException, NoSuchMethodException, ScriptException,
- IOException {
+ throws URISyntaxException, NoSuchMethodException, ScriptException, IOException {
// Return always and empty file if the cache is not enable
if (!(enableCache && FileDownloaderCache.enableCache)) {
- log.info("The cache is not enable.");
return Optional.empty();
}
final String[] splitPath = remoteURL.getPath().split("/");
if (splitPath.length == 0) {
- log.warn("The remote path as no file name {}", remoteURL);
return Optional.empty();
}
// Create the path where the cached file should exist
@@ -146,19 +132,14 @@ public static Optional getFileCached(final URL remoteURL, boolean en
.orElseGet(() -> new FileCached(remoteURL.toString(), cacheFilePath.toString()));
// If the file is change of the cache is disable run the HEAD request to check if the file is changed
- log.info("Get file cached is expire {}, exist {}, info {} ", fileCached.isExpire(), fileCached.exists(), fileCached);
if (fileCached.isExpire() || !fileCached.exists()) {
// Update remote etag and cache control header
final Optional fileCachedInfoUpdated =
FileDownloaderCache.updateCacheInfo(remoteURL, (remoteETagClean, cacheControl) -> {
// Check cache control data
if (cacheControl.isNoCache() || cacheControl.isMustRevalidate() || cacheControl.isNoStore()) {
- log.warn("The file {} must not be cache due to cache control header {}",
- remoteURL, cacheControl);
return Optional.empty();
}
- log.info("Update cached info of {}, createdAt {}, previous eTag {}, last eTag {}, cache control header {} ",
- remoteURL, fileCached.createdAt, fileCached.eTag, remoteETagClean, cacheControl);
final FileCached fileCachedUpdateETag = new FileCached(
remoteURL.toString(),
cacheFilePath.toString(),
@@ -180,20 +161,18 @@ private static Optional updateCacheInfo(URL remoteURL, BiFunction {
+ final HttpURLConnection headRequest = new HttpConnectionManager(remoteURL).makeConnection((connection) -> {
try {
connection.setRequestMethod("HEAD");
} catch (ProtocolException e) {
- log.error("Invalid protocol", e);
+ System.err.println(e.getMessage());
}
});
final int responseCode = headRequest.getResponseCode();
headRequest.disconnect();
// Something bad is happening return a conservative true to try to download the file
if (responseCode < 200 || responseCode >= 300) {
- log.warn("The head request return a bad response code " + responseCode);
- // if something bad happend
+ // if something bad happened
return Optional.empty();
}
// Get all the useful headers
@@ -204,7 +183,7 @@ private static Optional updateCacheInfo(URL remoteURL, BiFunction beforeConnection) throws IOException, URISyntaxException, ScriptException, NoSuchMethodException {
if (movedTimes > maxRedirectNumber) {
- log.warn("Too many redirect " + requestURL);
throw new IOException("Too many redirect " + requestURL);
}
- Proxy proxy = new CustomProxySelector(PreferencesData.getMap())
- .getProxyFor(requestURL.toURI());
- log.debug("Using proxy {}", proxy);
+ Proxy proxy = new CustomProxySelector(PreferencesData.getMap()).getProxyFor(requestURL.toURI());
+
+ final String requestId = UUID.randomUUID().toString().toUpperCase().replace("-", "").substring(0, 16);
+ HttpURLConnection connection = (HttpURLConnection) requestURL.openConnection(proxy);
+
+ // see https://github.com/arduino/Arduino/issues/10264
+ // Workaround for https://bugs.openjdk.java.net/browse/JDK-8163921
+ connection.setRequestProperty("Accept", "*/*");
- final String requestId = UUID.randomUUID().toString()
- .toUpperCase().replace("-", "").substring(0, 16);
- HttpURLConnection connection = (HttpURLConnection) requestURL
- .openConnection(proxy);
connection.setRequestProperty("User-agent", userAgent);
connection.setRequestProperty("X-Request-ID", requestId);
if (id != null) {
@@ -145,19 +135,11 @@ private HttpURLConnection makeConnection(URL requestURL, int movedTimes,
beforeConnection.accept(connection);
// Connect
- log.info("Connect to {}, method={}, request id={}", requestURL, connection.getRequestMethod(), requestId);
-
connection.connect();
int resp = connection.getResponseCode();
- log.info("Request complete URL=\"{}\", method={}, response code={}, request id={}, headers={}",
- requestURL, connection.getRequestMethod(), resp, requestId, StringUtils.join(connection.getHeaderFields()));
-
- if (resp == HttpURLConnection.HTTP_MOVED_PERM
- || resp == HttpURLConnection.HTTP_MOVED_TEMP) {
+ if (resp == HttpURLConnection.HTTP_MOVED_PERM || resp == HttpURLConnection.HTTP_MOVED_TEMP) {
URL newUrl = new URL(connection.getHeaderField("Location"));
- log.info("The response code was a 301,302 so try again with the new URL " + newUrl);
-
return this.makeConnection(newUrl, movedTimes + 1, beforeConnection);
}
diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java
index 0d921f6ccc6..ea51e376e73 100644
--- a/arduino-core/src/processing/app/BaseNoGui.java
+++ b/arduino-core/src/processing/app/BaseNoGui.java
@@ -41,9 +41,9 @@
public class BaseNoGui {
/** Version string to be used for build */
- public static final int REVISION = 10810;
+ public static final int REVISION = 10820;
/** Extended version string displayed on GUI */
- public static final String VERSION_NAME = "1.8.10";
+ public static final String VERSION_NAME = "1.8.20";
public static final String VERSION_NAME_LONG;
// Current directory to use for relative paths specified on the
@@ -509,7 +509,7 @@ static public void initPackages() throws Exception {
}
}
- static protected void initPlatform() {
+ static public void initPlatform() {
try {
Class> platformClass = Class.forName("processing.app.Platform");
if (OSUtils.isMacOS()) {
diff --git a/arduino-core/src/processing/app/I18n.java b/arduino-core/src/processing/app/I18n.java
index 0ab961aa9ed..1f1a9f93703 100644
--- a/arduino-core/src/processing/app/I18n.java
+++ b/arduino-core/src/processing/app/I18n.java
@@ -106,10 +106,6 @@ public static String format(String fmt, Object... args) {
* This method is an hack to extract words with gettext tool.
*/
protected static void unusedStrings() {
- // These phrases are defined in the "platform.txt".
- tr("Arduino AVR Boards");
- tr("Arduino ARM (32-bits) Boards");
-
// This word is defined in the "boards.txt".
tr("Processor");
}
diff --git a/arduino-core/src/processing/app/Platform.java b/arduino-core/src/processing/app/Platform.java
index 2c02c37ed2b..c76148df18f 100644
--- a/arduino-core/src/processing/app/Platform.java
+++ b/arduino-core/src/processing/app/Platform.java
@@ -52,7 +52,6 @@
* know if name is proper Java package syntax.)
*/
public class Platform {
- // DO NOT USE log4j here otherwise the root path of the logs will no be initialize correctly
/**
* Set the default L & F. While I enjoy the bounty of the sixteen possible
* exception types that this UIManager method might throw, I feel that in
@@ -202,8 +201,9 @@ public synchronized Map resolveDeviceByVendorIdProductId(String
}
Map boardData = new HashMap<>();
boardData.put("board", board);
- boardData.put("vid", vids.get(i));
- boardData.put("pid", pids.get(i));
+ // remove 0x from VID / PID to keep them as reported by liblistserial
+ boardData.put("vid", vids.get(i).replaceAll("0x", ""));
+ boardData.put("pid", pids.get(i).replaceAll("0x", ""));
String extrafields = vid_pid_iSerial.substring(vidPid.length() + 1);
String[] parts = extrafields.split("_");
boardData.put("iserial", parts[0]);
diff --git a/arduino-core/src/processing/app/PreferencesData.java b/arduino-core/src/processing/app/PreferencesData.java
index 01f4568ad5b..11a250d689c 100644
--- a/arduino-core/src/processing/app/PreferencesData.java
+++ b/arduino-core/src/processing/app/PreferencesData.java
@@ -50,6 +50,9 @@ static public void init(File file) throws Exception {
//ignore
}
+ // Start with a clean slate
+ prefs = new PreferencesMap();
+
// start by loading the defaults, in case something
// important was deleted from the user prefs
try {
diff --git a/arduino-core/src/processing/app/Serial.java b/arduino-core/src/processing/app/Serial.java
index 484ac11909b..edc5e8f0c0f 100644
--- a/arduino-core/src/processing/app/Serial.java
+++ b/arduino-core/src/processing/app/Serial.java
@@ -116,7 +116,7 @@ public static boolean touchForCDCReset(String iname) throws SerialException {
}
}
- private Serial(String iname, int irate, char iparity, int idatabits, float istopbits, boolean setRTS, boolean setDTR) throws SerialException {
+ protected Serial(String iname, int irate, char iparity, int idatabits, float istopbits, boolean setRTS, boolean setDTR) throws SerialException {
//if (port != null) port.close();
//this.parent = parent;
//parent.attach(this);
@@ -131,6 +131,11 @@ private Serial(String iname, int irate, char iparity, int idatabits, float istop
if (istopbits == 1.5f) stopbits = SerialPort.STOPBITS_1_5;
if (istopbits == 2) stopbits = SerialPort.STOPBITS_2;
+ // This is required for unit-testing
+ if (iname.equals("none")) {
+ return;
+ }
+
try {
port = new SerialPort(iname);
port.openPort();
@@ -175,31 +180,54 @@ public synchronized void serialEvent(SerialPortEvent serialEvent) {
if (serialEvent.isRXCHAR()) {
try {
byte[] buf = port.readBytes(serialEvent.getEventValue());
- int next = 0;
- while(next < buf.length) {
- while(next < buf.length && outToMessage.hasRemaining()) {
- int spaceInIn = inFromSerial.remaining();
- int copyNow = buf.length - next < spaceInIn ? buf.length - next : spaceInIn;
- inFromSerial.put(buf, next, copyNow);
- next += copyNow;
- inFromSerial.flip();
- bytesToStrings.decode(inFromSerial, outToMessage, false);
- inFromSerial.compact();
- }
- outToMessage.flip();
- if(outToMessage.hasRemaining()) {
- char[] chars = new char[outToMessage.remaining()];
- outToMessage.get(chars);
- message(chars, chars.length);
- }
- outToMessage.clear();
- }
+ processSerialEvent(buf);
} catch (SerialPortException e) {
errorMessage("serialEvent", e);
}
}
}
+ public void processSerialEvent(byte[] buf) {
+ int next = 0;
+ // This uses a CharsetDecoder to convert from bytes to UTF-8 in
+ // a streaming fashion (i.e. where characters might be split
+ // over multiple reads). This needs the data to be in a
+ // ByteBuffer (inFromSerial, which we also use to store leftover
+ // incomplete characters for the nexst run) and produces a
+ // CharBuffer (outToMessage), which we then convert to char[] to
+ // pass onwards.
+ // Note that these buffers switch from input to output mode
+ // using flip/compact/clear
+ while (next < buf.length || inFromSerial.position() > 0) {
+ do {
+ // This might be 0 when all data was already read from buf
+ // (but then there will be data in inFromSerial left to
+ // decode).
+ int copyNow = Math.min(buf.length - next, inFromSerial.remaining());
+ inFromSerial.put(buf, next, copyNow);
+ next += copyNow;
+
+ inFromSerial.flip();
+ bytesToStrings.decode(inFromSerial, outToMessage, false);
+ inFromSerial.compact();
+
+ // When there are multi-byte characters, outToMessage might
+ // still have room, so add more bytes if we have any.
+ } while (next < buf.length && outToMessage.hasRemaining());
+
+ // If no output was produced, the input only contained
+ // incomplete characters, so we're done processing
+ if (outToMessage.position() == 0)
+ break;
+
+ outToMessage.flip();
+ char[] chars = new char[outToMessage.remaining()];
+ outToMessage.get(chars);
+ message(chars, chars.length);
+ outToMessage.clear();
+ }
+ }
+
/**
* This method is intented to be extended to receive messages
* coming from serial port.
diff --git a/arduino-core/src/processing/app/SerialPortList.java b/arduino-core/src/processing/app/SerialPortList.java
index 04e8c46b5ab..f231ad6fb9c 100644
--- a/arduino-core/src/processing/app/SerialPortList.java
+++ b/arduino-core/src/processing/app/SerialPortList.java
@@ -74,7 +74,7 @@ public class SerialPortList {
}
}
- //since 2.1.0 -> Fully rewrited port name comparator
+ //since 2.1.0 -> Fully rewritten port name comparator
private static final Comparator PORTNAMES_COMPARATOR = new Comparator() {
@Override
diff --git a/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java b/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java
index c00378c48b4..f3c1dd45b30 100644
--- a/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java
+++ b/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java
@@ -245,4 +245,9 @@ public String toString() {
res += " " + boardId + " = " + boards.get(boardId) + "\n";
return res + "}";
}
+
+ @Override
+ public boolean isInSketchbook() {
+ return getFolder().getAbsolutePath().startsWith(BaseNoGui.getSketchbookHardwareFolder().getAbsolutePath());
+ }
}
diff --git a/arduino-core/src/processing/app/debug/TargetPlatform.java b/arduino-core/src/processing/app/debug/TargetPlatform.java
index 4b13cf87ac7..330b260bb16 100644
--- a/arduino-core/src/processing/app/debug/TargetPlatform.java
+++ b/arduino-core/src/processing/app/debug/TargetPlatform.java
@@ -94,4 +94,10 @@ public interface TargetPlatform {
*/
public TargetPackage getContainerPackage();
+ /**
+ * Returns true if the platform is installed in a subfolder of the sketchbook
+ *
+ * @return
+ */
+ public boolean isInSketchbook();
}
diff --git a/arduino-core/src/processing/app/helpers/BoardCloudResolver.java b/arduino-core/src/processing/app/helpers/BoardCloudResolver.java
index 8fa6f96da14..f1d4894caaa 100644
--- a/arduino-core/src/processing/app/helpers/BoardCloudResolver.java
+++ b/arduino-core/src/processing/app/helpers/BoardCloudResolver.java
@@ -32,8 +32,6 @@
import cc.arduino.utils.network.HttpConnectionManager;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import processing.app.BaseNoGui;
import processing.app.I18n;
import processing.app.debug.TargetBoard;
@@ -48,7 +46,6 @@
import static processing.app.I18n.tr;
public class BoardCloudResolver {
- private static Logger log = LogManager.getLogger(BoardCloudResolver.class);
public synchronized void getBoardBy(String vid, String pid) {
// this method is less useful in Windows < WIN10 since you need drivers to be already installed
@@ -61,12 +58,10 @@ public synchronized void getBoardBy(String vid, String pid) {
.makeConnection();
int code = httpConnection.getResponseCode();
if (code == 404) {
- log.warn("Fail to get the Vid Pid information from the builder response code={}", code);
return;
}
InputStream is = httpConnection.getInputStream();
BoardCloudAPIid board = mapper.readValue(is, BoardCloudAPIid.class);
- log.info("Board info from the cloud {}", board);
// Launch a popup with a link to boardmanager#board.getName()
// replace spaces with &
String realBoardName = board.getName().replaceAll("\\(.*?\\)", "").trim();
@@ -76,8 +71,6 @@ public synchronized void getBoardBy(String vid, String pid) {
} catch (Exception e) {
// No connection no problem, fail silently
//e.printStackTrace();
- log.warn("Error during get board information by vid, pid", e);
-
}
}
diff --git a/arduino-core/src/processing/app/i18n/Resources_af.po b/arduino-core/src/processing/app/i18n/Resources_af.po
index d75223f19de..e695acda527 100644
--- a/arduino-core/src/processing/app/i18n/Resources_af.po
+++ b/arduino-core/src/processing/app/i18n/Resources_af.po
@@ -20,14 +20,15 @@
# Translators:
# Translators:
# Translators:
+# Dohan Reyneke , 2020
# Edrean Ernst , 2015
msgid ""
msgstr ""
"Project-Id-Version: Arduino IDE 1.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
-"PO-Revision-Date: 2018-11-23 15:06+0000\n"
-"Last-Translator: Cristian Maglie \n"
+"PO-Revision-Date: 2020-03-15 13:42+0000\n"
+"Last-Translator: Dohan Reyneke \n"
"Language-Team: Afrikaans (http://www.transifex.com/mbanzi/arduino-ide-15/language/af/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -37,12 +38,12 @@ msgstr ""
#: Preferences.java:358 Preferences.java:374
msgid " (requires restart of Arduino)"
-msgstr ""
+msgstr "(vereis herbegin van Arduino)"
#: ../../../processing/app/debug/Compiler.java:529
#, java-format
msgid " Not used: {0}"
-msgstr ""
+msgstr "Nie gebruik nie: {0}"
#: ../../../processing/app/debug/Compiler.java:525
#, java-format
@@ -53,12 +54,12 @@ msgstr ""
msgid ""
"'Keyboard' not found. Does your sketch include the line '#include "
"'?"
-msgstr ""
+msgstr "'Sleutelbord' nie gevind nie. Bevat u skets die lyn '#include '?"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:553
msgid ""
"'Mouse' not found. Does your sketch include the line '#include '?"
-msgstr ""
+msgstr "'Muis' nie gevind nie. Bevat u skets die lyn '#include , 2020
# Edrean Ernst , 2015
-!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2018-11-23 15\:06+0000\nLast-Translator\: Cristian Maglie \nLanguage-Team\: Afrikaans (http\://www.transifex.com/mbanzi/arduino-ide-15/language/af/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: af\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1);\n
+!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2020-03-15 13\:42+0000\nLast-Translator\: Dohan Reyneke \nLanguage-Team\: Afrikaans (http\://www.transifex.com/mbanzi/arduino-ide-15/language/af/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: af\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1);\n
#: Preferences.java:358 Preferences.java:374
-!\ \ (requires\ restart\ of\ Arduino)=
+\ \ (requires\ restart\ of\ Arduino)=(vereis herbegin van Arduino)
#: ../../../processing/app/debug/Compiler.java:529
#, java-format
-!\ Not\ used\:\ {0}=
+\ Not\ used\:\ {0}=Nie gebruik nie\: {0}
#: ../../../processing/app/debug/Compiler.java:525
#, java-format
!\ Used\:\ {0}=
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:558
-!'Keyboard'\ not\ found.\ Does\ your\ sketch\ include\ the\ line\ '\#include\ '?=
+'Keyboard'\ not\ found.\ Does\ your\ sketch\ include\ the\ line\ '\#include\ '?='Sleutelbord' nie gevind nie. Bevat u skets die lyn '\#include '?
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:553
-!'Mouse'\ not\ found.\ Does\ your\ sketch\ include\ the\ line\ '\#include\ '?=
+'Mouse'\ not\ found.\ Does\ your\ sketch\ include\ the\ line\ '\#include\ '?='Muis' nie gevind nie. Bevat u skets die lyn '\#include , 2020
# alsadi , 2012
# amas89 , 2012
# belal affouri , 2015
@@ -34,8 +35,8 @@ msgstr ""
"Project-Id-Version: Arduino IDE 1.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
-"PO-Revision-Date: 2019-04-17 08:31+0000\n"
-"Last-Translator: Mohamed Bloui \n"
+"PO-Revision-Date: 2020-04-14 15:31+0000\n"
+"Last-Translator: Ahmed Moussa \n"
"Language-Team: Arabic (http://www.transifex.com/mbanzi/arduino-ide-15/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -135,7 +136,7 @@ msgstr "عن الاردوينو"
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:41
msgid "Acoli"
-msgstr ""
+msgstr "اشولي"
#: ../../../../../app/src/processing/app/Base.java:1177
msgid "Add .ZIP Library..."
@@ -913,7 +914,7 @@ msgstr "خطأ قراءة فهرس المكتبات: {0}"
msgid ""
"Error reading package indexes folder: {0}\n"
"(maybe a permission problem?)"
-msgstr ""
+msgstr "حدث خطأ في قراءة /معالجة حزمة المجلد المدخل : {0}\n(ربما المشكلة في التصاريح المطلوبة؟)"
#: Preferences.java:277
msgid "Error reading preferences"
@@ -1289,7 +1290,7 @@ msgstr "إقتباس غير صحيح: لم يعثر على [{0}] رمز إغلا
#: ../../../../../arduino-core/src/processing/app/packages/UserLibrary.java:158
#, java-format
msgid "Invalid version '{0}' for library in: {1}"
-msgstr ""
+msgstr "الصيغة '{0}' غير صالحة , من اجل مكتبة : {1}"
#: ../../../../../app/src/processing/app/Base.java:316
#: ../../../../../app/src/processing/app/Base.java:362
@@ -1307,7 +1308,7 @@ msgstr "Japanese"
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:81
msgid "Kazakh"
-msgstr ""
+msgstr "كازاخستان"
#: Preferences.java:104
msgid "Korean"
@@ -1332,7 +1333,7 @@ msgstr "المكتبة لا تستطيع استخدام كلا المجلدين
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:88
#, java-format
msgid "Library is already installed: {0}:{1}"
-msgstr ""
+msgstr "تم تثبيت المكتبة : {0}:{1}"
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
msgid "Line number:"
@@ -1349,7 +1350,7 @@ msgstr "جاري تحميل الإعدادات..."
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:73
#, java-format
msgid "Looking for recipes like {0}*{1}"
-msgstr ""
+msgstr "جار البحث عن اجراءات مثل {0}*{1}"
#: ../../../processing/app/Sketch.java:1684
msgid "Low memory available, stability problems may occur."
@@ -1411,7 +1412,7 @@ msgstr "اسم لملف جديد:"
#: ../../../../../app//src/processing/app/Editor.java:2809
msgid "Native serial port, can't obtain info"
-msgstr ""
+msgstr "يتعذر الحصول علي معلومات , من المنفذ التسلسلي الاصلي"
#: ../../../processing/app/Preferences.java:149
msgid "Nepali"
@@ -1623,7 +1624,7 @@ msgstr "الرجاء تحديد مبرمجة من قائمة أدوات->الم
#: ../../../../../app/src/processing/app/Editor.java:2613
msgid "Plotter not available while serial monitor is open"
-msgstr ""
+msgstr "الرسم التخطيطي غير متاح مادام المراقب التسلسلي مفتوح."
#: Preferences.java:110
msgid "Polish"
@@ -1790,7 +1791,7 @@ msgstr "غير مستخدم"
#: ../../../../../app/src/processing/app/Editor.java:1973
msgid "Retry the upload with another serial port?"
-msgstr ""
+msgstr " لم يتم العثورعلي المنفذ التسلسلي، لم لا تحاول الرفع باستخدام منفذ تسلسلي آخر ؟"
#: Preferences.java:113
msgid "Romanian"
@@ -1895,18 +1896,18 @@ msgstr "مراقب المنفذ التسلسلي \"سيريال بورت\""
#: ../../../../../app/src/processing/app/Editor.java:804
msgid "Serial Plotter"
-msgstr ""
+msgstr "مخطط تسلسلي"
#: ../../../../../app/src/processing/app/Editor.java:2325
#, java-format
msgid ""
"Serial monitor is not supported on network ports such as {0} for the {1} in "
"this release"
-msgstr ""
+msgstr "جهاز العرض التسلسلي غير مدعوم على منافذ الشبكة مثل {0} لـ {1} في هذا الإصدار"
#: ../../../../../app/src/processing/app/Editor.java:2516
msgid "Serial monitor not available while plotter is open"
-msgstr ""
+msgstr "الرسم التخطيطي غير متاح مادام المراقب التسلسلي مفتوح."
#: Serial.java:194
#, java-format
@@ -1932,7 +1933,7 @@ msgstr "المنافذ التسلسلية"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:84
#, java-format
msgid "Setting build path to {0}"
-msgstr ""
+msgstr "جار الاعداد الي المسار {0}"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:450
msgid "Settings"
@@ -2076,7 +2077,7 @@ msgstr "Tamil"
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:102
msgid "Telugu"
-msgstr ""
+msgstr "لفة التيلجو"
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:100
msgid "Thai"
@@ -2127,7 +2128,7 @@ msgid ""
"The library \"{0}\" cannot be used.\n"
"Library folder names must start with a letter or number, followed by letters,\n"
"numbers, dashes, dots and underscores. Maximum length is 63 characters."
-msgstr ""
+msgstr "المكتبة \"{0}\" لا يمكن استخدامها.\nاسم المكتبة يجب يبدأ بحرف ، او رقم متبوع بأحرف\nاو ارقاما ، او علامة الشرطة - ، او الشرطه السفلية _ . يجب ألا يزيد الطول عن 63 حرفا."
#: Base.java:1054 Base.java:2674
#, java-format
@@ -2179,7 +2180,7 @@ msgid ""
"The sketch name had to be modified.\n"
"Sketch names must start with a letter or number, followed by letters,\n"
"numbers, dashes, dots and underscores. Maximum length is 63 characters."
-msgstr ""
+msgstr "لقد تم تعديل أسم الشفرة البرمجية.\nأسم الشفرة البرمجية يجب ان يبدأ بحرف او رقم متبوع بحرف.\nاو ارقاما ، او علامة الشرطة - ، او الشرطه السفلية _ . يجب ألا يزيد الطول عن 63 حرفا."
#: Base.java:259
msgid ""
@@ -2288,7 +2289,7 @@ msgstr "غير قادر على فتح مراقب المنفذ التساسلي"
#: ../../../../../app/src/processing/app/Editor.java:2709
msgid "Unable to open serial plotter"
-msgstr ""
+msgstr "غير قادر على فتح مراقب المنفذ التساسلي"
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:94
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:89
@@ -2306,7 +2307,7 @@ msgstr "تراجع"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:85
#, java-format
msgid "Unhandled type {0} in context key {1}"
-msgstr ""
+msgstr "النوع {0} غير مدعوم من خلال السياق رقم {1}"
#: ../../../../../app//src/processing/app/Editor.java:2818
msgid "Unknown board"
@@ -2509,7 +2510,7 @@ msgstr "تحذير: مساهمات غير موثوقة، جاري تجاوز ت
msgid ""
"Warning: platform.txt from core '{0}' contains deprecated {1}, automatically"
" converted to {2}. Consider upgrading this core."
-msgstr ""
+msgstr "تحذير: platform.txt من الاساس '{0}' يفتقد خاصية '{1}', استخدام قيمة افتراضية '{2}'. بأخذ بالاعتبار ترقية هذا الاساس."
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:91
msgid ""
diff --git a/arduino-core/src/processing/app/i18n/Resources_ar.properties b/arduino-core/src/processing/app/i18n/Resources_ar.properties
index e9fc5682f74..943e0929237 100644
--- a/arduino-core/src/processing/app/i18n/Resources_ar.properties
+++ b/arduino-core/src/processing/app/i18n/Resources_ar.properties
@@ -20,6 +20,7 @@
# Translators:
# Translators:
# Translators:
+# Ahmed Moussa , 2020
# alsadi , 2012
# amas89 , 2012
# belal affouri , 2015
@@ -29,7 +30,7 @@
# Khaled Saleem Baleesh , 2015-2016
# Mohamed Bloui , 2019
# Mubarak Qahtani , 2015-2016
-!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2019-04-17 08\:31+0000\nLast-Translator\: Mohamed Bloui \nLanguage-Team\: Arabic (http\://www.transifex.com/mbanzi/arduino-ide-15/language/ar/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ar\nPlural-Forms\: nplurals\=6; plural\=n\=\=0 ? 0 \: n\=\=1 ? 1 \: n\=\=2 ? 2 \: n%100>\=3 && n%100<\=10 ? 3 \: n%100>\=11 && n%100<\=99 ? 4 \: 5;\n
+!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2020-04-14 15\:31+0000\nLast-Translator\: Ahmed Moussa \nLanguage-Team\: Arabic (http\://www.transifex.com/mbanzi/arduino-ide-15/language/ar/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ar\nPlural-Forms\: nplurals\=6; plural\=n\=\=0 ? 0 \: n\=\=1 ? 1 \: n\=\=2 ? 2 \: n%100>\=3 && n%100<\=10 ? 3 \: n%100>\=11 && n%100<\=99 ? 4 \: 5;\n
#: Preferences.java:358 Preferences.java:374
\ \ (requires\ restart\ of\ Arduino)=(\u064a\u062a\u0637\u0644\u0628 \u0627\u0639\u0627\u062f\u0629 \u062a\u0634\u063a\u064a\u0644 \u0644\u0644\u0623\u0631\u062f\u0648\u064a\u0646\u0648)
@@ -91,7 +92,7 @@ A\ subfolder\ of\ your\ sketchbook\ is\ not\ a\ valid\ library=\u0627\u0644\u064
About\ Arduino=\u0639\u0646 \u0627\u0644\u0627\u0631\u062f\u0648\u064a\u0646\u0648
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:41
-!Acoli=
+Acoli=\u0627\u0634\u0648\u0644\u064a
#: ../../../../../app/src/processing/app/Base.java:1177
Add\ .ZIP\ Library...=\u0627\u0636\u0641 \u0645\u0643\u062a\u0628\u0629 .ZIP ...
@@ -657,7 +658,7 @@ Error\ reading\ libraries\ index\:\ {0}=\u062e\u0637\u0623 \u0642\u0631\u0627\u0
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
-!Error\ reading\ package\ indexes\ folder\:\ {0}\n(maybe\ a\ permission\ problem?)=
+Error\ reading\ package\ indexes\ folder\:\ {0}\n(maybe\ a\ permission\ problem?)=\u062d\u062f\u062b \u062e\u0637\u0623 \u0641\u064a \u0642\u0631\u0627\u0621\u0629 /\u0645\u0639\u0627\u0644\u062c\u0629 \u062d\u0632\u0645\u0629 \u0627\u0644\u0645\u062c\u0644\u062f \u0627\u0644\u0645\u062f\u062e\u0644 \: {0}\n(\u0631\u0628\u0645\u0627 \u0627\u0644\u0645\u0634\u0643\u0644\u0629 \u0641\u064a \u0627\u0644\u062a\u0635\u0627\u0631\u064a\u062d \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629\u061f)
#: Preferences.java:277
Error\ reading\ preferences=\u062e\u0637\u0623 \u0641\u064a \u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u062e\u0635\u0627\u0626\u0635
@@ -935,7 +936,7 @@ Invalid\ quoting\:\ no\ closing\ [{0}]\ char\ found.=\u0625\u0642\u062a\u0628\u0
#: ../../../../../arduino-core/src/processing/app/packages/UserLibrary.java:158
#, java-format
-!Invalid\ version\ '{0}'\ for\ library\ in\:\ {1}=
+Invalid\ version\ '{0}'\ for\ library\ in\:\ {1}=\u0627\u0644\u0635\u064a\u063a\u0629 '{0}' \u063a\u064a\u0631 \u0635\u0627\u0644\u062d\u0629 , \u0645\u0646 \u0627\u062c\u0644 \u0645\u0643\u062a\u0628\u0629 \: {1}
#: ../../../../../app/src/processing/app/Base.java:316
#: ../../../../../app/src/processing/app/Base.java:362
@@ -949,7 +950,7 @@ Italian=Italiano
Japanese=Japanese
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:81
-!Kazakh=
+Kazakh=\u0643\u0627\u0632\u0627\u062e\u0633\u062a\u0627\u0646
#: Preferences.java:104
Korean=Korean
@@ -968,7 +969,7 @@ Library\ can't\ use\ both\ 'src'\ and\ 'utility'\ folders.\ Double\ check\ {0}=\
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:88
#, java-format
-!Library\ is\ already\ installed\:\ {0}\:{1}=
+Library\ is\ already\ installed\:\ {0}\:{1}=\u062a\u0645 \u062a\u062b\u0628\u064a\u062a \u0627\u0644\u0645\u0643\u062a\u0628\u0629 \: {0}\:{1}
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
Line\ number\:=\u0631\u0642\u0645 \u0627\u0644\u0633\u0637\u0631\:
@@ -981,7 +982,7 @@ Loading\ configuration...=\u062c\u0627\u0631\u064a \u062a\u062d\u0645\u064a\u064
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:73
#, java-format
-!Looking\ for\ recipes\ like\ {0}*{1}=
+Looking\ for\ recipes\ like\ {0}*{1}=\u062c\u0627\u0631 \u0627\u0644\u0628\u062d\u062b \u0639\u0646 \u0627\u062c\u0631\u0627\u0621\u0627\u062a \u0645\u062b\u0644 {0}*{1}
#: ../../../processing/app/Sketch.java:1684
Low\ memory\ available,\ stability\ problems\ may\ occur.=\u0630\u0627\u0643\u0631\u0629 \u0645\u0646\u062e\u0641\u0636\u0629 \u0645\u062a\u0628\u0642\u064a\u0629\u060c \u0645\u0634\u0627\u0643\u0644 \u0639\u062f\u0645 \u0625\u0633\u062a\u0642\u0631\u0627\u0631 \u0642\u062f \u062a\u062d\u062f\u062b.
@@ -1028,7 +1029,7 @@ Must\ specify\ exactly\ one\ sketch\ file=\u064a\u062c\u0628 \u062a\u062d\u062f\
Name\ for\ new\ file\:=\u0627\u0633\u0645 \u0644\u0645\u0644\u0641 \u062c\u062f\u064a\u062f\:
#: ../../../../../app//src/processing/app/Editor.java:2809
-!Native\ serial\ port,\ can't\ obtain\ info=
+Native\ serial\ port,\ can't\ obtain\ info=\u064a\u062a\u0639\u0630\u0631 \u0627\u0644\u062d\u0635\u0648\u0644 \u0639\u0644\u064a \u0645\u0639\u0644\u0648\u0645\u0627\u062a , \u0645\u0646 \u0627\u0644\u0645\u0646\u0641\u0630 \u0627\u0644\u062a\u0633\u0644\u0633\u0644\u064a \u0627\u0644\u0627\u0635\u0644\u064a
#: ../../../processing/app/Preferences.java:149
Nepali=\u0627\u0644\u0646\u064a\u0628\u0627\u0644\u064a\u0629
@@ -1187,7 +1188,7 @@ Please\ select\ a\ port\ to\ obtain\ board\ info=\u0641\u0636\u0644\u0627\u064b\
Please\ select\ a\ programmer\ from\ Tools->Programmer\ menu=\u0627\u0644\u0631\u062c\u0627\u0621 \u062a\u062d\u062f\u064a\u062f \u0645\u0628\u0631\u0645\u062c\u0629 \u0645\u0646 \u0642\u0627\u0626\u0645\u0629 \u0623\u062f\u0648\u0627\u062a->\u0627\u0644\u0645\u0628\u0631\u0645\u062c\u0629
#: ../../../../../app/src/processing/app/Editor.java:2613
-!Plotter\ not\ available\ while\ serial\ monitor\ is\ open=
+Plotter\ not\ available\ while\ serial\ monitor\ is\ open=\u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062a\u062e\u0637\u064a\u0637\u064a \u063a\u064a\u0631 \u0645\u062a\u0627\u062d \u0645\u0627\u062f\u0627\u0645 \u0627\u0644\u0645\u0631\u0627\u0642\u0628 \u0627\u0644\u062a\u0633\u0644\u0633\u0644\u064a \u0645\u0641\u062a\u0648\u062d.
#: Preferences.java:110
Polish=Polish
@@ -1312,7 +1313,7 @@ Replace\ with\:=\u0627\u0633\u062a\u0628\u062f\u0644 \u0628\u0640\:
Retired=\u063a\u064a\u0631 \u0645\u0633\u062a\u062e\u062f\u0645
#: ../../../../../app/src/processing/app/Editor.java:1973
-!Retry\ the\ upload\ with\ another\ serial\ port?=
+Retry\ the\ upload\ with\ another\ serial\ port?=\ \u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631\u0639\u0644\u064a \u0627\u0644\u0645\u0646\u0641\u0630 \u0627\u0644\u062a\u0633\u0644\u0633\u0644\u064a\u060c \u0644\u0645 \u0644\u0627 \u062a\u062d\u0627\u0648\u0644 \u0627\u0644\u0631\u0641\u0639 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0645\u0646\u0641\u0630 \u062a\u0633\u0644\u0633\u0644\u064a \u0622\u062e\u0631 \u061f
#: Preferences.java:113
Romanian=Romanian
@@ -1392,14 +1393,14 @@ Sensors=\u062d\u0633\u0627\u0633\u0627\u062a
Serial\ Monitor=\u0645\u0631\u0627\u0642\u0628 \u0627\u0644\u0645\u0646\u0641\u0630 \u0627\u0644\u062a\u0633\u0644\u0633\u0644\u064a "\u0633\u064a\u0631\u064a\u0627\u0644 \u0628\u0648\u0631\u062a"
#: ../../../../../app/src/processing/app/Editor.java:804
-!Serial\ Plotter=
+Serial\ Plotter=\u0645\u062e\u0637\u0637 \u062a\u0633\u0644\u0633\u0644\u064a
#: ../../../../../app/src/processing/app/Editor.java:2325
#, java-format
-!Serial\ monitor\ is\ not\ supported\ on\ network\ ports\ such\ as\ {0}\ for\ the\ {1}\ in\ this\ release=
+Serial\ monitor\ is\ not\ supported\ on\ network\ ports\ such\ as\ {0}\ for\ the\ {1}\ in\ this\ release=\u062c\u0647\u0627\u0632 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u062a\u0633\u0644\u0633\u0644\u064a \u063a\u064a\u0631 \u0645\u062f\u0639\u0648\u0645 \u0639\u0644\u0649 \u0645\u0646\u0627\u0641\u0630 \u0627\u0644\u0634\u0628\u0643\u0629 \u0645\u062b\u0644 {0} \u0644\u0640 {1} \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u0625\u0635\u062f\u0627\u0631
#: ../../../../../app/src/processing/app/Editor.java:2516
-!Serial\ monitor\ not\ available\ while\ plotter\ is\ open=
+Serial\ monitor\ not\ available\ while\ plotter\ is\ open=\u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062a\u062e\u0637\u064a\u0637\u064a \u063a\u064a\u0631 \u0645\u062a\u0627\u062d \u0645\u0627\u062f\u0627\u0645 \u0627\u0644\u0645\u0631\u0627\u0642\u0628 \u0627\u0644\u062a\u0633\u0644\u0633\u0644\u064a \u0645\u0641\u062a\u0648\u062d.
#: Serial.java:194
#, java-format
@@ -1418,7 +1419,7 @@ Serial\ ports=\u0627\u0644\u0645\u0646\u0627\u0641\u0630 \u0627\u0644\u062a\u063
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:84
#, java-format
-!Setting\ build\ path\ to\ {0}=
+Setting\ build\ path\ to\ {0}=\u062c\u0627\u0631 \u0627\u0644\u0627\u0639\u062f\u0627\u062f \u0627\u0644\u064a \u0627\u0644\u0645\u0633\u0627\u0631 {0}
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:450
Settings=\u0623\u0639\u062f\u0627\u062f\u0627\u062a
@@ -1520,7 +1521,7 @@ Talossan=\u062a\u0627\u0644\u0648\u0633\u0627\u0646
Tamil=Tamil
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:102
-!Telugu=
+Telugu=\u0644\u0641\u0629 \u0627\u0644\u062a\u064a\u0644\u062c\u0648
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:100
Thai=\u0627\u0644\u062a\u0627\u064a\u0644\u0627\u0646\u062f\u064a\u0629
@@ -1553,7 +1554,7 @@ The\ file\ "{0}"\ needs\ to\ be\ inside\na\ sketch\ folder\ named\ "{1}".\nCreat
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:180
#, java-format
-!The\ library\ "{0}"\ cannot\ be\ used.\nLibrary\ folder\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=
+The\ library\ "{0}"\ cannot\ be\ used.\nLibrary\ folder\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=\u0627\u0644\u0645\u0643\u062a\u0628\u0629 "{0}" \u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627.\n\u0627\u0633\u0645 \u0627\u0644\u0645\u0643\u062a\u0628\u0629 \u064a\u062c\u0628 \u064a\u0628\u062f\u0623 \u0628\u062d\u0631\u0641 \u060c \u0627\u0648 \u0631\u0642\u0645 \u0645\u062a\u0628\u0648\u0639 \u0628\u0623\u062d\u0631\u0641\n\u0627\u0648 \u0627\u0631\u0642\u0627\u0645\u0627 \u060c \u0627\u0648 \u0639\u0644\u0627\u0645\u0629 \u0627\u0644\u0634\u0631\u0637\u0629 - \u060c \u0627\u0648 \u0627\u0644\u0634\u0631\u0637\u0647 \u0627\u0644\u0633\u0641\u0644\u064a\u0629 _ . \u064a\u062c\u0628 \u0623\u0644\u0627 \u064a\u0632\u064a\u062f \u0627\u0644\u0637\u0648\u0644 \u0639\u0646 63 \u062d\u0631\u0641\u0627.
#: Base.java:1054 Base.java:2674
#, java-format
@@ -1580,7 +1581,7 @@ The\ sketch\ already\ contains\ a\ file\ named\ "{0}"=\u0627\u0644\u0633\u0643\u
The\ sketch\ folder\ has\ disappeared.\n\ Will\ attempt\ to\ re-save\ in\ the\ same\ location,\nbut\ anything\ besides\ the\ code\ will\ be\ lost.=\u0645\u062c\u0644\u062f \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629 \u0627\u062e\u062a\u0641\u0649.\n\u062d\u0627\u0648\u0644 \u0627\u0639\u0627\u062f\u0629 \u062d\u0641\u0638\u0647 \u0641\u064a \u0646\u0641\u0633 \u0627\u0644\u0645\u0643\u0627\u0646,\n\u0648\u0644\u0643\u0646 \u0633\u064a\u062a\u0645 \u0641\u0642\u062f\u0627\u0646 \u0627\u0644\u0643\u0648\u062f.
#: ../../../../../app/src/processing/app/SketchController.java:849
-!The\ sketch\ name\ had\ to\ be\ modified.\nSketch\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=
+The\ sketch\ name\ had\ to\ be\ modified.\nSketch\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=\u0644\u0642\u062f \u062a\u0645 \u062a\u0639\u062f\u064a\u0644 \u0623\u0633\u0645 \u0627\u0644\u0634\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629.\n\u0623\u0633\u0645 \u0627\u0644\u0634\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629 \u064a\u062c\u0628 \u0627\u0646 \u064a\u0628\u062f\u0623 \u0628\u062d\u0631\u0641 \u0627\u0648 \u0631\u0642\u0645 \u0645\u062a\u0628\u0648\u0639 \u0628\u062d\u0631\u0641.\n\u0627\u0648 \u0627\u0631\u0642\u0627\u0645\u0627 \u060c \u0627\u0648 \u0639\u0644\u0627\u0645\u0629 \u0627\u0644\u0634\u0631\u0637\u0629 - \u060c \u0627\u0648 \u0627\u0644\u0634\u0631\u0637\u0647 \u0627\u0644\u0633\u0641\u0644\u064a\u0629 _ . \u064a\u062c\u0628 \u0623\u0644\u0627 \u064a\u0632\u064a\u062f \u0627\u0644\u0637\u0648\u0644 \u0639\u0646 63 \u062d\u0631\u0641\u0627.
#: Base.java:259
The\ sketchbook\ folder\ no\ longer\ exists.\nArduino\ will\ switch\ to\ the\ default\ sketchbook\nlocation,\ and\ create\ a\ new\ sketchbook\ folder\ if\nnecessary.\ Arduino\ will\ then\ stop\ talking\ about\nhimself\ in\ the\ third\ person.=\u0645\u062c\u0644\u062f \u0643\u062a\u0627\u0628 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629 "\u0627\u0644\u0633\u0643\u062a\u0634" \u0644\u0645 \u064a\u0639\u062f \u0645\u0648\u062c\u0648\u062f\u0627.\n\u0633\u064a\u0646\u062a\u0642\u0644 \u0627\u0644\u0627\u0631\u062f\u0648\u064a\u0646\u0648 \u0627\u0644\u0649 \u0645\u0643\u0627\u0646 \u0643\u062a\u0627\u0628 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629 \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a,\n\u0648\u0627\u0646\u0634\u0627\u0621 \u0645\u062c\u0644\u062f \u062c\u062f\u064a\u062f \u0627\u0630\u0627 \u0643\u0627\u0646\n\u0636\u0631\u0648\u0631\u064a\u0627\u064b. \u0627\u0644\u0627\u0631\u062f\u0648\u064a\u0646\u0648 \u0633\u064a\u0648\u0642\u0641 \u0627\u0644\u062d\u062f\u064a\u062b \n\u0639\u0646 \u0646\u0641\u0633\u0647.
@@ -1654,7 +1655,7 @@ Unable\ to\ find\ {0}\ in\ {1}=\u0644\u0645 \u064a\u0639\u062b\u0631 \u0639\u064
Unable\ to\ open\ serial\ monitor=\u063a\u064a\u0631 \u0642\u0627\u062f\u0631 \u0639\u0644\u0649 \u0641\u062a\u062d \u0645\u0631\u0627\u0642\u0628 \u0627\u0644\u0645\u0646\u0641\u0630 \u0627\u0644\u062a\u0633\u0627\u0633\u0644\u064a
#: ../../../../../app/src/processing/app/Editor.java:2709
-!Unable\ to\ open\ serial\ plotter=
+Unable\ to\ open\ serial\ plotter=\u063a\u064a\u0631 \u0642\u0627\u062f\u0631 \u0639\u0644\u0649 \u0641\u062a\u062d \u0645\u0631\u0627\u0642\u0628 \u0627\u0644\u0645\u0646\u0641\u0630 \u0627\u0644\u062a\u0633\u0627\u0633\u0644\u064a
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:94
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:89
@@ -1668,7 +1669,7 @@ Undo=\u062a\u0631\u0627\u062c\u0639
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:85
#, java-format
-!Unhandled\ type\ {0}\ in\ context\ key\ {1}=
+Unhandled\ type\ {0}\ in\ context\ key\ {1}=\u0627\u0644\u0646\u0648\u0639 {0} \u063a\u064a\u0631 \u0645\u062f\u0639\u0648\u0645 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0633\u064a\u0627\u0642 \u0631\u0642\u0645 {1}
#: ../../../../../app//src/processing/app/Editor.java:2818
Unknown\ board=\u0644\u0648\u062d\u0629 \u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629
@@ -1818,7 +1819,7 @@ Warning\:\ non\ trusted\ contribution,\ skipping\ script\ execution\ ({0})=\u062
#: ../../../processing/app/debug/LegacyTargetPlatform.java:158
#, java-format
-!Warning\:\ platform.txt\ from\ core\ '{0}'\ contains\ deprecated\ {1},\ automatically\ converted\ to\ {2}.\ Consider\ upgrading\ this\ core.=
+Warning\:\ platform.txt\ from\ core\ '{0}'\ contains\ deprecated\ {1},\ automatically\ converted\ to\ {2}.\ Consider\ upgrading\ this\ core.=\u062a\u062d\u0630\u064a\u0631\: platform.txt \u0645\u0646 \u0627\u0644\u0627\u0633\u0627\u0633 '{0}' \u064a\u0641\u062a\u0642\u062f \u062e\u0627\u0635\u064a\u0629 '{1}', \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0642\u064a\u0645\u0629 \u0627\u0641\u062a\u0631\u0627\u0636\u064a\u0629 '{2}'. \u0628\u0623\u062e\u0630 \u0628\u0627\u0644\u0627\u0639\u062a\u0628\u0627\u0631 \u062a\u0631\u0642\u064a\u0629 \u0647\u0630\u0627 \u0627\u0644\u0627\u0633\u0627\u0633.
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:91
Warning\:\ platform.txt\ from\ core\ '{0}'\ misses\ property\ '{1}',\ using\ default\ value\ '{2}'.\ Consider\ upgrading\ this\ core.=\u062a\u062d\u0630\u064a\u0631\: platform.txt \u0645\u0646 \u0627\u0644\u0627\u0633\u0627\u0633 '{0}' \u064a\u0641\u062a\u0642\u062f \u062e\u0627\u0635\u064a\u0629 '{1}', \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0642\u064a\u0645\u0629 \u0627\u0641\u062a\u0631\u0627\u0636\u064a\u0629 '{2}'. \u062e\u0630 \u0628\u0627\u0644\u0627\u0639\u062a\u0628\u0627\u0631 \u062a\u0631\u0642\u064a\u0629 \u0647\u0630\u0627 \u0627\u0644\u0627\u0633\u0627\u0633.
diff --git a/arduino-core/src/processing/app/i18n/Resources_ca.po b/arduino-core/src/processing/app/i18n/Resources_ca.po
index 696831ae39c..c0ff7801665 100644
--- a/arduino-core/src/processing/app/i18n/Resources_ca.po
+++ b/arduino-core/src/processing/app/i18n/Resources_ca.po
@@ -22,9 +22,10 @@
# Translators:
# dplanella , 2017
# Enric Verdaguer , 2016
-# Francesc Famadas , 2015
-# jmontane, 2018
-# Marc GB , 2016
+# Francesc Famadas, 2015
+# Joan Montané, 2018
+# Jofre Faraudo , 2021
+# 17275f6663c0806cb14df3aaa64f5dcc_36b1070 <63b2d9bf279ebdb5b732343823eaa154_408083>, 2016
# Marc Palacín , 2016
# Moritz Werner Casero , 2015
# Sergi Pérez Labernia , 2014
@@ -36,8 +37,8 @@ msgstr ""
"Project-Id-Version: Arduino IDE 1.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
-"PO-Revision-Date: 2018-11-23 15:06+0000\n"
-"Last-Translator: Cristian Maglie \n"
+"PO-Revision-Date: 2021-04-01 15:50+0000\n"
+"Last-Translator: Jofre Faraudo \n"
"Language-Team: Catalan (http://www.transifex.com/mbanzi/arduino-ide-15/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -450,7 +451,7 @@ msgstr "Només es pot passar un de: {0}"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:254
msgid "Can't enable external editor"
-msgstr ""
+msgstr "No s'ha pogut activar l'editor extern"
#: ../../../processing/app/BaseNoGui.java:504
#: ../../../processing/app/BaseNoGui.java:549
@@ -638,7 +639,7 @@ msgstr "No es pot substituir {0}"
#: ../../../../../arduino-core/src/processing/app/PreferencesData.java:141
#, java-format
msgid "Could not write preferences file: {0}"
-msgstr ""
+msgstr "No s'ha pogut escriure al fitxer de preferències: {0}"
#: tools/Archiver.java:74
msgid "Couldn't archive sketch"
@@ -697,7 +698,7 @@ msgstr "Predeterminat"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:870
msgid "Default theme"
-msgstr ""
+msgstr "Tema predeterminat"
#: EditorHeader.java:314 Sketch.java:591
msgid "Delete"
@@ -877,7 +878,7 @@ msgstr "Error a dins del Serial.{0}()"
#: ../../../../../app/src/processing/app/Theme.java:302
#, java-format
msgid "Error loading theme {0}: {1}"
-msgstr ""
+msgstr "S'ha produït un error en carregar el tema {0}: {1}"
#: ../../../processing/app/debug/TargetPlatform.java:95
#: ../../../processing/app/debug/TargetPlatform.java:106
@@ -908,7 +909,7 @@ msgstr ""
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:112
#, java-format
msgid "Error reading libraries index: {0}"
-msgstr ""
+msgstr "S'ha produït un error en llegir l'índex de biblioteques: {0}"
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
@@ -953,7 +954,7 @@ msgstr "Error durant l’enregistrament del bootloader: no es troba el paràmet
#: ../../../../../app/src/processing/app/Editor.java:2355
msgid "Error while burning bootloader: please select a serial port."
-msgstr ""
+msgstr "Error durant l'enregistrament del bootloader: seleccioneu un port sèrie."
#: ../../../../../app/src/processing/app/Editor.java:1940
msgid "Error while compiling: missing '{0}' configuration parameter"
@@ -1033,7 +1034,7 @@ msgstr "No s'ha pogut canviar el nom de \"{0}\" a \"{1}\""
#: ../../../../../arduino-core/src/processing/app/Sketch.java:298
msgid "Failed to rename sketch folder"
-msgstr ""
+msgstr "No s'ha pogut canviar el nom del directori del sketch"
#: Editor.java:491
msgid "File"
@@ -1196,7 +1197,7 @@ msgstr "Ignora diferències entre majúscules i minúscules"
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:184
msgid "Ignoring library with bad name"
-msgstr ""
+msgstr "S'ha ignorat la llibreria amb un nom incorrecte."
#: Base.java:1436
msgid "Ignoring sketch with bad name"
@@ -1262,7 +1263,7 @@ msgstr "S'estan instal·lant les plaques..."
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:109
#, java-format
msgid "Installing library: {0}:{1}"
-msgstr ""
+msgstr "S'està instal·lant la llibreria: {0}:{1}"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:134
#, java-format
@@ -1297,7 +1298,7 @@ msgstr ""
#: ../../../../../app/src/processing/app/Base.java:362
#, java-format
msgid "Invalid version {0}"
-msgstr ""
+msgstr "Versió invàlida {0}"
#: Preferences.java:102
msgid "Italian"
@@ -1334,7 +1335,7 @@ msgstr "La biblioteca no pot fer servir ambdós directoris 'src' i 'utility'. To
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:88
#, java-format
msgid "Library is already installed: {0}:{1}"
-msgstr ""
+msgstr "La biblioteca ja està instal·lada: {0}:{1}"
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
msgid "Line number:"
@@ -1754,7 +1755,7 @@ msgstr "Suprimeix"
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:142
#, java-format
msgid "Removing library: {0}:{1}"
-msgstr ""
+msgstr "S'està suprimint la biblioteca: {0}:{1}"
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:266
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:203
@@ -1792,7 +1793,7 @@ msgstr "Retirat"
#: ../../../../../app/src/processing/app/Editor.java:1973
msgid "Retry the upload with another serial port?"
-msgstr ""
+msgstr "Voleu tornar a intentar la pujada amb un port sèrie diferent?"
#: Preferences.java:113
msgid "Romanian"
@@ -1904,7 +1905,7 @@ msgstr "Plotter sèrie"
msgid ""
"Serial monitor is not supported on network ports such as {0} for the {1} in "
"this release"
-msgstr ""
+msgstr "El monitor sèrie no està disponible en ports de xarxa com el {0} pel {1} en aquesta versió"
#: ../../../../../app/src/processing/app/Editor.java:2516
msgid "Serial monitor not available while plotter is open"
@@ -1920,12 +1921,12 @@ msgstr "Port sèrie \"{0}\" no trobat. Ha seleccionat el port corresponent al me
#: ../../../../../app/src/processing/app/Editor.java:1969
#: ../../../../../app/src/processing/app/Editor.java:2040
msgid "Serial port not selected."
-msgstr ""
+msgstr "No hi ha cap port sèrie seleccionat."
#: ../../../../../app/src/processing/app/Editor.java:1971
#, java-format
msgid "Serial port {0} not found."
-msgstr ""
+msgstr "No s'ha trobat el port sèrie {0}."
#: ../../../../../app/src/processing/app/Editor.java:65
msgid "Serial ports"
@@ -1950,7 +1951,7 @@ msgstr "Mostra la carpeta del Sketch"
#: ../../../../../app/src/processing/app/AbstractTextMonitor.java:101
msgid "Show timestamp"
-msgstr ""
+msgstr "Mostra la marca de temps"
#: Preferences.java:387
msgid "Show verbose output during: "
@@ -2113,7 +2114,7 @@ msgstr "La classe Udp ha estat reanomenada a EthernetUdp."
#: ../../../../../arduino-core/src/processing/app/BaseNoGui.java:177
msgid "The current selected board needs the core '{0}' that is not installed."
-msgstr ""
+msgstr "La placa actual seleccionada necessita el nucli «{0}» que no està instal·lat."
#: Editor.java:2147
#, java-format
@@ -2129,7 +2130,7 @@ msgid ""
"The library \"{0}\" cannot be used.\n"
"Library folder names must start with a letter or number, followed by letters,\n"
"numbers, dashes, dots and underscores. Maximum length is 63 characters."
-msgstr ""
+msgstr "La biblioteca «{0}» no es pot usar.\nEls noms dels directoris de les biblioteques han de començar amb una lletra o nombre, seguit de lletres, nombres, guions (-), punts (.) i guions baixos (_) i no poden superar els 63 caràcters."
#: Base.java:1054 Base.java:2674
#, java-format
@@ -2167,7 +2168,7 @@ msgstr "El sketch \"{0}\" no pot ser utilitzat.\nEls noms dels sketch han de con
#: ../../../../../arduino-core/src/processing/app/Sketch.java:272
#, java-format
msgid "The sketch already contains a file named \"{0}\""
-msgstr ""
+msgstr "El sketch ja conté un fitxer anomenat «{0}»"
#: Sketch.java:1755
msgid ""
@@ -2200,7 +2201,7 @@ msgstr "La carpeta del bloc d'esbossos especificada conté la teva còpia de l'I
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:311
msgid "Theme: "
-msgstr ""
+msgstr "Tema: "
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:257
msgid ""
@@ -2563,7 +2564,7 @@ msgstr "Ha oblidat el seu sketchbook"
msgid ""
"You have unsaved changes!\n"
"You must save all your sketches to enable this option."
-msgstr ""
+msgstr "Teniu canvis sense desar!\nDeseu tots els esbossos per activar aquesta opció."
#: ../../../processing/app/AbstractMonitor.java:92
msgid ""
diff --git a/arduino-core/src/processing/app/i18n/Resources_ca.properties b/arduino-core/src/processing/app/i18n/Resources_ca.properties
index e3ed1363942..33713fe852f 100644
--- a/arduino-core/src/processing/app/i18n/Resources_ca.properties
+++ b/arduino-core/src/processing/app/i18n/Resources_ca.properties
@@ -22,16 +22,17 @@
# Translators:
# dplanella , 2017
# Enric Verdaguer , 2016
-# Francesc Famadas , 2015
-# jmontane, 2018
-# Marc GB , 2016
+# Francesc Famadas, 2015
+# Joan Montan\u00e9, 2018
+# Jofre Faraudo , 2021
+# 17275f6663c0806cb14df3aaa64f5dcc_36b1070 <63b2d9bf279ebdb5b732343823eaa154_408083>, 2016
# Marc Palac\u00edn , 2016
# Moritz Werner Casero , 2015
# Sergi P\u00e9rez Labernia , 2014
# shacawine , 2012
# Xavier Romero Aguad\u00e9 , 2016
# Xavier Romero Aguad\u00e9 , 2014
-!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2018-11-23 15\:06+0000\nLast-Translator\: Cristian Maglie \nLanguage-Team\: Catalan (http\://www.transifex.com/mbanzi/arduino-ide-15/language/ca/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ca\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1);\n
+!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2021-04-01 15\:50+0000\nLast-Translator\: Jofre Faraudo \nLanguage-Team\: Catalan (http\://www.transifex.com/mbanzi/arduino-ide-15/language/ca/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ca\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1);\n
#: Preferences.java:358 Preferences.java:374
\ \ (requires\ restart\ of\ Arduino)=(cal reiniciar l'Arduino)
@@ -319,7 +320,7 @@ Burning\ bootloader\ to\ I/O\ Board\ (this\ may\ take\ a\ minute)...=L'enregistr
Can\ only\ pass\ one\ of\:\ {0}=Nom\u00e9s es pot passar un de\: {0}
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:254
-!Can't\ enable\ external\ editor=
+Can't\ enable\ external\ editor=No s'ha pogut activar l'editor extern
#: ../../../processing/app/BaseNoGui.java:504
#: ../../../processing/app/BaseNoGui.java:549
@@ -456,7 +457,7 @@ Could\ not\ replace\ {0}=No es pot substituir {0}
#: ../../../../../arduino-core/src/processing/app/PreferencesData.java:141
#, java-format
-!Could\ not\ write\ preferences\ file\:\ {0}=
+Could\ not\ write\ preferences\ file\:\ {0}=No s'ha pogut escriure al fitxer de prefer\u00e8ncies\: {0}
#: tools/Archiver.java:74
Couldn't\ archive\ sketch=No s\u00b4ha pogut arxivar el sketch
@@ -498,7 +499,7 @@ Decrease\ Indent=Disminueix el sagnat
Default=Predeterminat
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:870
-!Default\ theme=
+Default\ theme=Tema predeterminat
#: EditorHeader.java:314 Sketch.java:591
Delete=Suprimeix
@@ -633,7 +634,7 @@ Error\ inside\ Serial.{0}()=Error a dins del Serial.{0}()
#: ../../../../../app/src/processing/app/Theme.java:302
#, java-format
-!Error\ loading\ theme\ {0}\:\ {1}=
+Error\ loading\ theme\ {0}\:\ {1}=S'ha produ\u00eft un error en carregar el tema {0}\: {1}
#: ../../../processing/app/debug/TargetPlatform.java:95
#: ../../../processing/app/debug/TargetPlatform.java:106
@@ -655,7 +656,7 @@ Error\ opening\ serial\ port\ ''{0}''.\ Try\ consulting\ the\ documentation\ at\
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:112
#, java-format
-!Error\ reading\ libraries\ index\:\ {0}=
+Error\ reading\ libraries\ index\:\ {0}=S'ha produ\u00eft un error en llegir l'\u00edndex de biblioteques\: {0}
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
@@ -687,7 +688,7 @@ Error\ while\ burning\ bootloader.=Error al carrega el bootloader.
Error\ while\ burning\ bootloader\:\ missing\ '{0}'\ configuration\ parameter=Error durant l\u2019enregistrament del bootloader\: no es troba el par\u00e0metre de configuraci\u00f3 {0}
#: ../../../../../app/src/processing/app/Editor.java:2355
-!Error\ while\ burning\ bootloader\:\ please\ select\ a\ serial\ port.=
+Error\ while\ burning\ bootloader\:\ please\ select\ a\ serial\ port.=Error durant l'enregistrament del bootloader\: seleccioneu un port s\u00e8rie.
#: ../../../../../app/src/processing/app/Editor.java:1940
Error\ while\ compiling\:\ missing\ '{0}'\ configuration\ parameter=Error durant la pujada\: no es troba el par\u00e0metre de configuraci\u00f3 {0}
@@ -749,7 +750,7 @@ Failed\ to\ open\ sketch\:\ "{0}"=No s\u00b4ha pogut obrir el sketch\: "{0}"
Failed\ to\ rename\ "{0}"\ to\ "{1}"=No s'ha pogut canviar el nom de "{0}" a "{1}"
#: ../../../../../arduino-core/src/processing/app/Sketch.java:298
-!Failed\ to\ rename\ sketch\ folder=
+Failed\ to\ rename\ sketch\ folder=No s'ha pogut canviar el nom del directori del sketch
#: Editor.java:491
File=Fitxer
@@ -868,7 +869,7 @@ INCOMPATIBLE=NO COMPATIBLE
Ignore\ Case=Ignora difer\u00e8ncies entre maj\u00fascules i min\u00fascules
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:184
-!Ignoring\ library\ with\ bad\ name=
+Ignoring\ library\ with\ bad\ name=S'ha ignorat la llibreria amb un nom incorrecte.
#: Base.java:1436
Ignoring\ sketch\ with\ bad\ name=Ignorant el sketch amb un nom incorrecte
@@ -914,7 +915,7 @@ Installing\ boards...=S'estan instal\u00b7lant les plaques...
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:109
#, java-format
-!Installing\ library\:\ {0}\:{1}=
+Installing\ library\:\ {0}\:{1}=S'est\u00e0 instal\u00b7lant la llibreria\: {0}\:{1}
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:134
#, java-format
@@ -942,7 +943,7 @@ Invalid\ quoting\:\ no\ closing\ [{0}]\ char\ found.=Cita inv\u00e0lida\: no s'h
#: ../../../../../app/src/processing/app/Base.java:316
#: ../../../../../app/src/processing/app/Base.java:362
#, java-format
-!Invalid\ version\ {0}=
+Invalid\ version\ {0}=Versi\u00f3 inv\u00e0lida {0}
#: Preferences.java:102
Italian=itali\u00e0
@@ -970,7 +971,7 @@ Library\ can't\ use\ both\ 'src'\ and\ 'utility'\ folders.\ Double\ check\ {0}=L
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:88
#, java-format
-!Library\ is\ already\ installed\:\ {0}\:{1}=
+Library\ is\ already\ installed\:\ {0}\:{1}=La biblioteca ja est\u00e0 instal\u00b7lada\: {0}\:{1}
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
Line\ number\:=N\u00famero de l\u00ednia\:
@@ -1285,7 +1286,7 @@ Remove=Suprimeix
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:142
#, java-format
-!Removing\ library\:\ {0}\:{1}=
+Removing\ library\:\ {0}\:{1}=S'est\u00e0 suprimint la biblioteca\: {0}\:{1}
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:266
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:203
@@ -1314,7 +1315,7 @@ Replace\ with\:=Substituir amb\:
Retired=Retirat
#: ../../../../../app/src/processing/app/Editor.java:1973
-!Retry\ the\ upload\ with\ another\ serial\ port?=
+Retry\ the\ upload\ with\ another\ serial\ port?=Voleu tornar a intentar la pujada amb un port s\u00e8rie diferent?
#: Preferences.java:113
Romanian=roman\u00e8s
@@ -1398,7 +1399,7 @@ Serial\ Plotter=Plotter s\u00e8rie
#: ../../../../../app/src/processing/app/Editor.java:2325
#, java-format
-!Serial\ monitor\ is\ not\ supported\ on\ network\ ports\ such\ as\ {0}\ for\ the\ {1}\ in\ this\ release=
+Serial\ monitor\ is\ not\ supported\ on\ network\ ports\ such\ as\ {0}\ for\ the\ {1}\ in\ this\ release=El monitor s\u00e8rie no est\u00e0 disponible en ports de xarxa com el {0} pel {1} en aquesta versi\u00f3
#: ../../../../../app/src/processing/app/Editor.java:2516
Serial\ monitor\ not\ available\ while\ plotter\ is\ open=El monitor s\u00e8rie no es troba disponible mentre el plotter est\u00e0 obert
@@ -1409,11 +1410,11 @@ Serial\ port\ ''{0}''\ not\ found.\ Did\ you\ select\ the\ right\ one\ from\ the
#: ../../../../../app/src/processing/app/Editor.java:1969
#: ../../../../../app/src/processing/app/Editor.java:2040
-!Serial\ port\ not\ selected.=
+Serial\ port\ not\ selected.=No hi ha cap port s\u00e8rie seleccionat.
#: ../../../../../app/src/processing/app/Editor.java:1971
#, java-format
-!Serial\ port\ {0}\ not\ found.=
+Serial\ port\ {0}\ not\ found.=No s'ha trobat el port s\u00e8rie {0}.
#: ../../../../../app/src/processing/app/Editor.java:65
Serial\ ports=Ports de s\u00e8rie
@@ -1432,7 +1433,7 @@ Settings\ issues=Errors en les prefer\u00e8ncies
Show\ Sketch\ Folder=Mostra la carpeta del Sketch
#: ../../../../../app/src/processing/app/AbstractTextMonitor.java:101
-!Show\ timestamp=
+Show\ timestamp=Mostra la marca de temps
#: Preferences.java:387
Show\ verbose\ output\ during\:\ =Mostra la sortida detallada durant\:
@@ -1547,7 +1548,7 @@ The\ Server\ class\ has\ been\ renamed\ EthernetServer.=La classe Server ha esta
The\ Udp\ class\ has\ been\ renamed\ EthernetUdp.=La classe Udp ha estat reanomenada a EthernetUdp.
#: ../../../../../arduino-core/src/processing/app/BaseNoGui.java:177
-!The\ current\ selected\ board\ needs\ the\ core\ '{0}'\ that\ is\ not\ installed.=
+The\ current\ selected\ board\ needs\ the\ core\ '{0}'\ that\ is\ not\ installed.=La placa actual seleccionada necessita el nucli \u00ab{0}\u00bb que no est\u00e0 instal\u00b7lat.
#: Editor.java:2147
#, java-format
@@ -1555,7 +1556,7 @@ The\ file\ "{0}"\ needs\ to\ be\ inside\na\ sketch\ folder\ named\ "{1}".\nCreat
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:180
#, java-format
-!The\ library\ "{0}"\ cannot\ be\ used.\nLibrary\ folder\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=
+The\ library\ "{0}"\ cannot\ be\ used.\nLibrary\ folder\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=La biblioteca \u00ab{0}\u00bb no es pot usar.\nEls noms dels directoris de les biblioteques han de comen\u00e7ar amb una lletra o nombre, seguit de lletres, nombres, guions (-), punts (.) i guions baixos (_) i no poden superar els 63 car\u00e0cters.
#: Base.java:1054 Base.java:2674
#, java-format
@@ -1576,7 +1577,7 @@ The\ sketch\ "{0}"\ cannot\ be\ used.\nSketch\ names\ must\ contain\ only\ basic
#: ../../../../../arduino-core/src/processing/app/Sketch.java:272
#, java-format
-!The\ sketch\ already\ contains\ a\ file\ named\ "{0}"=
+The\ sketch\ already\ contains\ a\ file\ named\ "{0}"=El sketch ja cont\u00e9 un fitxer anomenat \u00ab{0}\u00bb
#: Sketch.java:1755
The\ sketch\ folder\ has\ disappeared.\n\ Will\ attempt\ to\ re-save\ in\ the\ same\ location,\nbut\ anything\ besides\ the\ code\ will\ be\ lost.=La carpeta del sketch ha desaparegut.\n Es provar\u00e0 de tornar a desar en la mateixa localitzaci\u00f3,\nper\u00f2 tot excepte el codi ser\u00e0 perdut.
@@ -1591,7 +1592,7 @@ The\ sketchbook\ folder\ no\ longer\ exists.\nArduino\ will\ switch\ to\ the\ de
The\ specified\ sketchbook\ folder\ contains\ your\ copy\ of\ the\ IDE.\nPlease\ choose\ a\ different\ folder\ for\ your\ sketchbook.=La carpeta del bloc d'esbossos especificada cont\u00e9 la teva c\u00f2pia de l'IDE.\nSisplau escull una carpeta diferent per al teu bloc d'esbossos.
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:311
-!Theme\:\ =
+Theme\:\ =Tema\:
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:257
This\ library\ is\ not\ listed\ on\ Library\ Manager.\ You\ won't\ be\ able\ to\ reinstall\ it\ from\ here.\nAre\ you\ sure\ you\ want\ to\ delete\ it?=Aquesta biblioteca no est\u00e0 inclosa al Gestor de biblioteques. No podreu reinstal\u00b7lar-la des d'aqu\u00ed.\nEsteu segur de voler desinstal\u00b7lar-la?
@@ -1853,7 +1854,7 @@ You\ cannot\ save\ the\ sketch\ into\ a\ folder\ninside\ itself.\ This\ would\ g
You\ forgot\ your\ sketchbook=Ha oblidat el seu sketchbook
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:252
-!You\ have\ unsaved\ changes\!\nYou\ must\ save\ all\ your\ sketches\ to\ enable\ this\ option.=
+You\ have\ unsaved\ changes\!\nYou\ must\ save\ all\ your\ sketches\ to\ enable\ this\ option.=Teniu canvis sense desar\!\nDeseu tots els esbossos per activar aquesta opci\u00f3.
#: ../../../processing/app/AbstractMonitor.java:92
You've\ pressed\ {0}\ but\ nothing\ was\ sent.\ Should\ you\ select\ a\ line\ ending?=Ha apretat {0} pero res s'ha enviat. Vol seleccionar un f\u00ed de linia?
diff --git a/arduino-core/src/processing/app/i18n/Resources_en_GB.po b/arduino-core/src/processing/app/i18n/Resources_en_GB.po
index 063f220314f..f3e14485adf 100644
--- a/arduino-core/src/processing/app/i18n/Resources_en_GB.po
+++ b/arduino-core/src/processing/app/i18n/Resources_en_GB.po
@@ -20,7 +20,7 @@
# Translators:
# Translators:
# Translators:
-# Andi Chandler , 2013-2017
+# Andi Chandler , 2013-2017,2021
# Cristian Maglie , 2016
# dani987452 , 2017
msgid ""
@@ -28,8 +28,8 @@ msgstr ""
"Project-Id-Version: Arduino IDE 1.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
-"PO-Revision-Date: 2018-11-23 15:06+0000\n"
-"Last-Translator: Cristian Maglie \n"
+"PO-Revision-Date: 2021-04-01 22:32+0000\n"
+"Last-Translator: Andi Chandler \n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/mbanzi/arduino-ide-15/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -219,7 +219,7 @@ msgstr "Archive sketch canceled."
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:67
#, java-format
msgid "Archiving built core (caching) in: {0}"
-msgstr ""
+msgstr "Archiving built core (caching) in: {0}"
#: tools/Archiver.java:75
msgid ""
@@ -630,7 +630,7 @@ msgstr "Could not replace {0}"
#: ../../../../../arduino-core/src/processing/app/PreferencesData.java:141
#, java-format
msgid "Could not write preferences file: {0}"
-msgstr ""
+msgstr "Could not write preferences file: {0}"
#: tools/Archiver.java:74
msgid "Couldn't archive sketch"
@@ -677,7 +677,7 @@ msgstr "Data Storage"
#: ../../../../../app/src/processing/app/Editor.java:1386
msgid "Decrease Font Size"
-msgstr ""
+msgstr "Decrease Font Size"
#: Editor.java:1224 Editor.java:2765
msgid "Decrease Indent"
@@ -689,7 +689,7 @@ msgstr "Default"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:870
msgid "Default theme"
-msgstr ""
+msgstr "Default theme"
#: EditorHeader.java:314 Sketch.java:591
msgid "Delete"
@@ -869,7 +869,7 @@ msgstr "Error inside Serial.{0}()"
#: ../../../../../app/src/processing/app/Theme.java:302
#, java-format
msgid "Error loading theme {0}: {1}"
-msgstr ""
+msgstr "Error loading theme {0}: {1}"
#: ../../../processing/app/debug/TargetPlatform.java:95
#: ../../../processing/app/debug/TargetPlatform.java:106
@@ -895,19 +895,19 @@ msgstr "Error opening serial port ''{0}''. Try consulting the documentation at h
msgid ""
"Error parsing libraries index: {0}\n"
"Try to open the Library Manager to update the libraries index."
-msgstr ""
+msgstr "Error parsing libraries index: {0}\nTry to open the Library Manager to update the libraries index."
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:112
#, java-format
msgid "Error reading libraries index: {0}"
-msgstr ""
+msgstr "Error reading libraries index: {0}"
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
msgid ""
"Error reading package indexes folder: {0}\n"
"(maybe a permission problem?)"
-msgstr ""
+msgstr "Error reading package indexes folder: {0}\n(maybe a permission problem?)"
#: Preferences.java:277
msgid "Error reading preferences"
@@ -945,7 +945,7 @@ msgstr "Error while burning bootloader: missing '{0}' configuration parameter"
#: ../../../../../app/src/processing/app/Editor.java:2355
msgid "Error while burning bootloader: please select a serial port."
-msgstr ""
+msgstr "Error while burning bootloader: please select a serial port."
#: ../../../../../app/src/processing/app/Editor.java:1940
msgid "Error while compiling: missing '{0}' configuration parameter"
@@ -1188,7 +1188,7 @@ msgstr "Ignore Case"
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:184
msgid "Ignoring library with bad name"
-msgstr ""
+msgstr "Ignoring library with bad name"
#: Base.java:1436
msgid "Ignoring sketch with bad name"
@@ -1216,7 +1216,7 @@ msgstr "Incorrect IDE installation folder"
#: ../../../../../app/src/processing/app/Editor.java:1378
msgid "Increase Font Size"
-msgstr ""
+msgstr "Increase Font Size"
#: Editor.java:1216 Editor.java:2757
msgid "Increase Indent"
@@ -1254,7 +1254,7 @@ msgstr "Installing boards..."
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:109
#, java-format
msgid "Installing library: {0}:{1}"
-msgstr ""
+msgstr "Installing library: {0}:{1}"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:134
#, java-format
@@ -1283,13 +1283,13 @@ msgstr "Invalid quoting: no closing [{0}] char found."
#: ../../../../../arduino-core/src/processing/app/packages/UserLibrary.java:158
#, java-format
msgid "Invalid version '{0}' for library in: {1}"
-msgstr ""
+msgstr "Invalid version '{0}' for library in: {1}"
#: ../../../../../app/src/processing/app/Base.java:316
#: ../../../../../app/src/processing/app/Base.java:362
#, java-format
msgid "Invalid version {0}"
-msgstr ""
+msgstr "Invalid version {0}"
#: Preferences.java:102
msgid "Italian"
@@ -1326,7 +1326,7 @@ msgstr "Library can't use both 'src' and 'utility' folders. Double check {0}"
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:88
#, java-format
msgid "Library is already installed: {0}:{1}"
-msgstr ""
+msgstr "Library is already installed: {0}:{1}"
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
msgid "Line number:"
@@ -1746,7 +1746,7 @@ msgstr "Remove"
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:142
#, java-format
msgid "Removing library: {0}:{1}"
-msgstr ""
+msgstr "Removing library: {0}:{1}"
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:266
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:203
@@ -1784,7 +1784,7 @@ msgstr "Retired"
#: ../../../../../app/src/processing/app/Editor.java:1973
msgid "Retry the upload with another serial port?"
-msgstr ""
+msgstr "Retry the upload with another serial port?"
#: Preferences.java:113
msgid "Romanian"
@@ -1912,12 +1912,12 @@ msgstr "Serial port ''{0}'' not found. Did you select the right one from the Too
#: ../../../../../app/src/processing/app/Editor.java:1969
#: ../../../../../app/src/processing/app/Editor.java:2040
msgid "Serial port not selected."
-msgstr ""
+msgstr "Serial port not selected."
#: ../../../../../app/src/processing/app/Editor.java:1971
#, java-format
msgid "Serial port {0} not found."
-msgstr ""
+msgstr "Serial port {0} not found."
#: ../../../../../app/src/processing/app/Editor.java:65
msgid "Serial ports"
@@ -1942,7 +1942,7 @@ msgstr "Show Sketch Folder"
#: ../../../../../app/src/processing/app/AbstractTextMonitor.java:101
msgid "Show timestamp"
-msgstr ""
+msgstr "Show timestamp"
#: Preferences.java:387
msgid "Show verbose output during: "
@@ -2121,7 +2121,7 @@ msgid ""
"The library \"{0}\" cannot be used.\n"
"Library folder names must start with a letter or number, followed by letters,\n"
"numbers, dashes, dots and underscores. Maximum length is 63 characters."
-msgstr ""
+msgstr "The library \"{0}\" cannot be used.\nLibrary folder names must start with a letter or number, followed by letters,\nnumbers, dashes, dots and underscores. Maximum length is 63 characters."
#: Base.java:1054 Base.java:2674
#, java-format
@@ -2173,7 +2173,7 @@ msgid ""
"The sketch name had to be modified.\n"
"Sketch names must start with a letter or number, followed by letters,\n"
"numbers, dashes, dots and underscores. Maximum length is 63 characters."
-msgstr ""
+msgstr "The sketch name had to be modified.\nSketch names must start with a letter or number, followed by letters,\nnumbers, dashes, dots and underscores. Maximum length is 63 characters."
#: Base.java:259
msgid ""
@@ -2192,7 +2192,7 @@ msgstr "The specified sketchbook folder contains your copy of the IDE.\nPlease c
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:311
msgid "Theme: "
-msgstr ""
+msgstr "Theme: "
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:257
msgid ""
@@ -2690,7 +2690,7 @@ msgstr "name is null"
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:227
#, java-format
msgid "no headers files (.h) found in {0}"
-msgstr ""
+msgstr "no headers files (.h) found in {0}"
#: Editor.java:932
msgid "serialMenu is null"
@@ -2792,7 +2792,7 @@ msgstr "{0}: Invalid option, should be of the form \"name=value\""
#: ../../../../../arduino-core/src/processing/app/helpers/CommandlineParser.java:268
#, java-format
msgid "{0}: Invalid value for option \"{1}\" for board \"{2}\""
-msgstr ""
+msgstr "{0}: Invalid value for option \"{1}\" for board \"{2}\""
#: ../../../processing/app/Base.java:486
#, java-format
diff --git a/arduino-core/src/processing/app/i18n/Resources_en_GB.properties b/arduino-core/src/processing/app/i18n/Resources_en_GB.properties
index 00709457605..25338114100 100644
--- a/arduino-core/src/processing/app/i18n/Resources_en_GB.properties
+++ b/arduino-core/src/processing/app/i18n/Resources_en_GB.properties
@@ -20,10 +20,10 @@
# Translators:
# Translators:
# Translators:
-# Andi Chandler , 2013-2017
+# Andi Chandler , 2013-2017,2021
# Cristian Maglie , 2016
# dani987452 , 2017
-!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2018-11-23 15\:06+0000\nLast-Translator\: Cristian Maglie \nLanguage-Team\: English (United Kingdom) (http\://www.transifex.com/mbanzi/arduino-ide-15/language/en_GB/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: en_GB\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1);\n
+!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2021-04-01 22\:32+0000\nLast-Translator\: Andi Chandler \nLanguage-Team\: English (United Kingdom) (http\://www.transifex.com/mbanzi/arduino-ide-15/language/en_GB/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: en_GB\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1);\n
#: Preferences.java:358 Preferences.java:374
\ \ (requires\ restart\ of\ Arduino)=\ (requires restart of Arduino)
@@ -150,7 +150,7 @@ Archive\ sketch\ canceled.=Archive sketch canceled.
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:67
#, java-format
-!Archiving\ built\ core\ (caching)\ in\:\ {0}=
+Archiving\ built\ core\ (caching)\ in\:\ {0}=Archiving built core (caching) in\: {0}
#: tools/Archiver.java:75
Archiving\ the\ sketch\ has\ been\ canceled\ because\nthe\ sketch\ couldn't\ save\ properly.=Archiving the sketch has been canceled because\nthe sketch couldn't save properly.
@@ -448,7 +448,7 @@ Could\ not\ replace\ {0}=Could not replace {0}
#: ../../../../../arduino-core/src/processing/app/PreferencesData.java:141
#, java-format
-!Could\ not\ write\ preferences\ file\:\ {0}=
+Could\ not\ write\ preferences\ file\:\ {0}=Could not write preferences file\: {0}
#: tools/Archiver.java:74
Couldn't\ archive\ sketch=Couldn't archive sketch
@@ -481,7 +481,7 @@ Data\ Processing=Data Processing
Data\ Storage=Data Storage
#: ../../../../../app/src/processing/app/Editor.java:1386
-!Decrease\ Font\ Size=
+Decrease\ Font\ Size=Decrease Font Size
#: Editor.java:1224 Editor.java:2765
Decrease\ Indent=Decrease Indent
@@ -490,7 +490,7 @@ Decrease\ Indent=Decrease Indent
Default=Default
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:870
-!Default\ theme=
+Default\ theme=Default theme
#: EditorHeader.java:314 Sketch.java:591
Delete=Delete
@@ -625,7 +625,7 @@ Error\ inside\ Serial.{0}()=Error inside Serial.{0}()
#: ../../../../../app/src/processing/app/Theme.java:302
#, java-format
-!Error\ loading\ theme\ {0}\:\ {1}=
+Error\ loading\ theme\ {0}\:\ {1}=Error loading theme {0}\: {1}
#: ../../../processing/app/debug/TargetPlatform.java:95
#: ../../../processing/app/debug/TargetPlatform.java:106
@@ -643,15 +643,15 @@ Error\ opening\ serial\ port\ ''{0}''.\ Try\ consulting\ the\ documentation\ at\
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:109
#, java-format
-!Error\ parsing\ libraries\ index\:\ {0}\nTry\ to\ open\ the\ Library\ Manager\ to\ update\ the\ libraries\ index.=
+Error\ parsing\ libraries\ index\:\ {0}\nTry\ to\ open\ the\ Library\ Manager\ to\ update\ the\ libraries\ index.=Error parsing libraries index\: {0}\nTry to open the Library Manager to update the libraries index.
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:112
#, java-format
-!Error\ reading\ libraries\ index\:\ {0}=
+Error\ reading\ libraries\ index\:\ {0}=Error reading libraries index\: {0}
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
-!Error\ reading\ package\ indexes\ folder\:\ {0}\n(maybe\ a\ permission\ problem?)=
+Error\ reading\ package\ indexes\ folder\:\ {0}\n(maybe\ a\ permission\ problem?)=Error reading package indexes folder\: {0}\n(maybe a permission problem?)
#: Preferences.java:277
Error\ reading\ preferences=Error reading preferences
@@ -679,7 +679,7 @@ Error\ while\ burning\ bootloader.=Error while burning bootloader.
Error\ while\ burning\ bootloader\:\ missing\ '{0}'\ configuration\ parameter=Error while burning bootloader\: missing '{0}' configuration parameter
#: ../../../../../app/src/processing/app/Editor.java:2355
-!Error\ while\ burning\ bootloader\:\ please\ select\ a\ serial\ port.=
+Error\ while\ burning\ bootloader\:\ please\ select\ a\ serial\ port.=Error while burning bootloader\: please select a serial port.
#: ../../../../../app/src/processing/app/Editor.java:1940
Error\ while\ compiling\:\ missing\ '{0}'\ configuration\ parameter=Error while compiling\: missing '{0}' configuration parameter
@@ -860,7 +860,7 @@ INCOMPATIBLE=INCOMPATIBLE
Ignore\ Case=Ignore Case
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:184
-!Ignoring\ library\ with\ bad\ name=
+Ignoring\ library\ with\ bad\ name=Ignoring library with bad name
#: Base.java:1436
Ignoring\ sketch\ with\ bad\ name=Ignoring sketch with bad name
@@ -876,7 +876,7 @@ Include\ Library=Include Library
Incorrect\ IDE\ installation\ folder=Incorrect IDE installation folder
#: ../../../../../app/src/processing/app/Editor.java:1378
-!Increase\ Font\ Size=
+Increase\ Font\ Size=Increase Font Size
#: Editor.java:1216 Editor.java:2757
Increase\ Indent=Increase Indent
@@ -906,7 +906,7 @@ Installing\ boards...=Installing boards...
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:109
#, java-format
-!Installing\ library\:\ {0}\:{1}=
+Installing\ library\:\ {0}\:{1}=Installing library\: {0}\:{1}
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:134
#, java-format
@@ -929,12 +929,12 @@ Invalid\ quoting\:\ no\ closing\ [{0}]\ char\ found.=Invalid quoting\: no closin
#: ../../../../../arduino-core/src/processing/app/packages/UserLibrary.java:158
#, java-format
-!Invalid\ version\ '{0}'\ for\ library\ in\:\ {1}=
+Invalid\ version\ '{0}'\ for\ library\ in\:\ {1}=Invalid version '{0}' for library in\: {1}
#: ../../../../../app/src/processing/app/Base.java:316
#: ../../../../../app/src/processing/app/Base.java:362
#, java-format
-!Invalid\ version\ {0}=
+Invalid\ version\ {0}=Invalid version {0}
#: Preferences.java:102
Italian=Italian
@@ -962,7 +962,7 @@ Library\ can't\ use\ both\ 'src'\ and\ 'utility'\ folders.\ Double\ check\ {0}=L
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:88
#, java-format
-!Library\ is\ already\ installed\:\ {0}\:{1}=
+Library\ is\ already\ installed\:\ {0}\:{1}=Library is already installed\: {0}\:{1}
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
Line\ number\:=Line number\:
@@ -1277,7 +1277,7 @@ Remove=Remove
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:142
#, java-format
-!Removing\ library\:\ {0}\:{1}=
+Removing\ library\:\ {0}\:{1}=Removing library\: {0}\:{1}
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:266
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:203
@@ -1306,7 +1306,7 @@ Replace\ with\:=Replace with\:
Retired=Retired
#: ../../../../../app/src/processing/app/Editor.java:1973
-!Retry\ the\ upload\ with\ another\ serial\ port?=
+Retry\ the\ upload\ with\ another\ serial\ port?=Retry the upload with another serial port?
#: Preferences.java:113
Romanian=Romanian
@@ -1401,11 +1401,11 @@ Serial\ port\ ''{0}''\ not\ found.\ Did\ you\ select\ the\ right\ one\ from\ the
#: ../../../../../app/src/processing/app/Editor.java:1969
#: ../../../../../app/src/processing/app/Editor.java:2040
-!Serial\ port\ not\ selected.=
+Serial\ port\ not\ selected.=Serial port not selected.
#: ../../../../../app/src/processing/app/Editor.java:1971
#, java-format
-!Serial\ port\ {0}\ not\ found.=
+Serial\ port\ {0}\ not\ found.=Serial port {0} not found.
#: ../../../../../app/src/processing/app/Editor.java:65
Serial\ ports=Serial ports
@@ -1424,7 +1424,7 @@ Settings\ issues=Settings issues
Show\ Sketch\ Folder=Show Sketch Folder
#: ../../../../../app/src/processing/app/AbstractTextMonitor.java:101
-!Show\ timestamp=
+Show\ timestamp=Show timestamp
#: Preferences.java:387
Show\ verbose\ output\ during\:\ =Show verbose output during\:
@@ -1547,7 +1547,7 @@ The\ file\ "{0}"\ needs\ to\ be\ inside\na\ sketch\ folder\ named\ "{1}".\nCreat
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:180
#, java-format
-!The\ library\ "{0}"\ cannot\ be\ used.\nLibrary\ folder\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=
+The\ library\ "{0}"\ cannot\ be\ used.\nLibrary\ folder\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=The library "{0}" cannot be used.\nLibrary folder names must start with a letter or number, followed by letters,\nnumbers, dashes, dots and underscores. Maximum length is 63 characters.
#: Base.java:1054 Base.java:2674
#, java-format
@@ -1574,7 +1574,7 @@ The\ sketch\ already\ contains\ a\ file\ named\ "{0}"=The sketch already contain
The\ sketch\ folder\ has\ disappeared.\n\ Will\ attempt\ to\ re-save\ in\ the\ same\ location,\nbut\ anything\ besides\ the\ code\ will\ be\ lost.=The sketch folder has disappeared.\n Will attempt to re-save in the same location,\nbut anything besides the code will be lost.
#: ../../../../../app/src/processing/app/SketchController.java:849
-!The\ sketch\ name\ had\ to\ be\ modified.\nSketch\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=
+The\ sketch\ name\ had\ to\ be\ modified.\nSketch\ names\ must\ start\ with\ a\ letter\ or\ number,\ followed\ by\ letters,\nnumbers,\ dashes,\ dots\ and\ underscores.\ Maximum\ length\ is\ 63\ characters.=The sketch name had to be modified.\nSketch names must start with a letter or number, followed by letters,\nnumbers, dashes, dots and underscores. Maximum length is 63 characters.
#: Base.java:259
The\ sketchbook\ folder\ no\ longer\ exists.\nArduino\ will\ switch\ to\ the\ default\ sketchbook\nlocation,\ and\ create\ a\ new\ sketchbook\ folder\ if\nnecessary.\ Arduino\ will\ then\ stop\ talking\ about\nhimself\ in\ the\ third\ person.=The sketchbook folder no longer exists.\nArduino will switch to the default sketchbook\nlocation, and create a new sketchbook folder if\nnecessary. Arduino will then stop talking about\nhimself in the third person.
@@ -1583,7 +1583,7 @@ The\ sketchbook\ folder\ no\ longer\ exists.\nArduino\ will\ switch\ to\ the\ de
The\ specified\ sketchbook\ folder\ contains\ your\ copy\ of\ the\ IDE.\nPlease\ choose\ a\ different\ folder\ for\ your\ sketchbook.=The specified sketchbook folder contains your copy of the IDE.\nPlease choose a different folder for your sketchbook.
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:311
-!Theme\:\ =
+Theme\:\ =Theme\:
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:257
This\ library\ is\ not\ listed\ on\ Library\ Manager.\ You\ won't\ be\ able\ to\ reinstall\ it\ from\ here.\nAre\ you\ sure\ you\ want\ to\ delete\ it?=This library is not listed on Library Manager. You won't be able to reinstall it from here.\nAre you sure you want to delete it?
@@ -1922,7 +1922,7 @@ name\ is\ null=name is null
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:217
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:227
#, java-format
-!no\ headers\ files\ (.h)\ found\ in\ {0}=
+no\ headers\ files\ (.h)\ found\ in\ {0}=no headers files (.h) found in {0}
#: Editor.java:932
serialMenu\ is\ null=serialMenu is null
@@ -2001,7 +2001,7 @@ version\ {0}=version {0}
#: ../../../../../arduino-core/src/processing/app/helpers/CommandlineParser.java:268
#, java-format
-!{0}\:\ Invalid\ value\ for\ option\ "{1}"\ for\ board\ "{2}"=
+{0}\:\ Invalid\ value\ for\ option\ "{1}"\ for\ board\ "{2}"={0}\: Invalid value for option "{1}" for board "{2}"
#: ../../../processing/app/Base.java:486
#, java-format
diff --git a/arduino-core/src/processing/app/i18n/Resources_es.po b/arduino-core/src/processing/app/i18n/Resources_es.po
index 3352dba2431..42eb9fa5d07 100644
--- a/arduino-core/src/processing/app/i18n/Resources_es.po
+++ b/arduino-core/src/processing/app/i18n/Resources_es.po
@@ -32,7 +32,7 @@
# Jack R. , 2013
# Miguel Ángel Barrio Vázquez , 2013
# Moritz Werner Casero , 2015
-# Nestor Contreras , 2017
+# d7ce63bf85c9f8c124fab05c2821bbcf, 2017
# Pedro Luis , 2018
# Pedro Luis , 2015-2016
# Salvador Parra Camacho , 2014
diff --git a/arduino-core/src/processing/app/i18n/Resources_es.properties b/arduino-core/src/processing/app/i18n/Resources_es.properties
index e10f8f98689..1e6db436fd5 100644
--- a/arduino-core/src/processing/app/i18n/Resources_es.properties
+++ b/arduino-core/src/processing/app/i18n/Resources_es.properties
@@ -32,7 +32,7 @@
# Jack R. , 2013
# Miguel \u00c1ngel Barrio V\u00e1zquez , 2013
# Moritz Werner Casero , 2015
-# Nestor Contreras , 2017
+# d7ce63bf85c9f8c124fab05c2821bbcf, 2017
# Pedro Luis , 2018
# Pedro Luis , 2015-2016
# Salvador Parra Camacho , 2014
diff --git a/arduino-core/src/processing/app/i18n/Resources_et.po b/arduino-core/src/processing/app/i18n/Resources_et.po
index 5cfe4cd1505..49a808c636b 100644
--- a/arduino-core/src/processing/app/i18n/Resources_et.po
+++ b/arduino-core/src/processing/app/i18n/Resources_et.po
@@ -25,8 +25,8 @@
# Cristian Maglie , 2016
# Georg, 2014
# Hasso Tepper , 2016,2018-2019
-# Lauri Võsandi , 2015
-# Lauri Võsandi , 2015
+# d0fb82845e24c8a7bfd7dc19adbd26a7_a0669f4 <0e132a47bd8dd1a622a1f5718397d672_385>, 2015
+# d0fb82845e24c8a7bfd7dc19adbd26a7_a0669f4 <0e132a47bd8dd1a622a1f5718397d672_385>, 2015
# Triin Taveter , 2016
msgid ""
msgstr ""
diff --git a/arduino-core/src/processing/app/i18n/Resources_et.properties b/arduino-core/src/processing/app/i18n/Resources_et.properties
index 83155498daf..00d5796eb13 100644
--- a/arduino-core/src/processing/app/i18n/Resources_et.properties
+++ b/arduino-core/src/processing/app/i18n/Resources_et.properties
@@ -25,8 +25,8 @@
# Cristian Maglie , 2016
# Georg, 2014
# Hasso Tepper , 2016,2018-2019
-# Lauri V\u00f5sandi , 2015
-# Lauri V\u00f5sandi , 2015
+# d0fb82845e24c8a7bfd7dc19adbd26a7_a0669f4 <0e132a47bd8dd1a622a1f5718397d672_385>, 2015
+# d0fb82845e24c8a7bfd7dc19adbd26a7_a0669f4 <0e132a47bd8dd1a622a1f5718397d672_385>, 2015
# Triin Taveter , 2016
!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2019-09-04 17\:34+0000\nLast-Translator\: Hasso Tepper \nLanguage-Team\: Estonian (http\://www.transifex.com/mbanzi/arduino-ide-15/language/et/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: et\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1);\n
diff --git a/arduino-core/src/processing/app/i18n/Resources_fa.po b/arduino-core/src/processing/app/i18n/Resources_fa.po
index 12f9bca966d..863fd9cd93c 100644
--- a/arduino-core/src/processing/app/i18n/Resources_fa.po
+++ b/arduino-core/src/processing/app/i18n/Resources_fa.po
@@ -20,7 +20,9 @@
# Translators:
# Translators:
# Translators:
+# Ardeshir Hakimi, 2020
# arminjavan , 2014
+# axzw tere , 2020
# Ebrahim Byagowi , 2012
# Mohammad Hamidi , 2017
msgid ""
@@ -28,8 +30,8 @@ msgstr ""
"Project-Id-Version: Arduino IDE 1.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
-"PO-Revision-Date: 2018-11-23 15:06+0000\n"
-"Last-Translator: Cristian Maglie \n"
+"PO-Revision-Date: 2020-02-04 08:56+0000\n"
+"Last-Translator: Ardeshir Hakimi\n"
"Language-Team: Persian (http://www.transifex.com/mbanzi/arduino-ide-15/language/fa/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -70,11 +72,11 @@ msgstr "پوشه \"arch\" دیگر پشتیبانی نمی شود. برای اط
#: Preferences.java:478
msgid "(edit only when Arduino is not running)"
-msgstr "(ویرایش فقط به هنگامی که آردئینو درحال اجرا نیست)"
+msgstr "(ویرایش فقط به هنگام عدم اجرای آردوینو)"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:67
msgid "(legacy)"
-msgstr ""
+msgstr "(باقیمانده از نرمافزار قبلی)"
#: ../../../processing/app/helpers/CommandlineParser.java:149
msgid "--curdir no longer supported"
@@ -174,7 +176,7 @@ msgstr "خطایی به عنوان اصلاح کدگذاری پرونده رخ
#: ../../../cc/arduino/contributions/libraries/LibraryInstaller.java:99
msgid "An error occurred while updating libraries index!"
-msgstr ""
+msgstr "بروز مشکل در بهروز رسانی نمایهی کتابخانهها"
#: ../../../processing/app/BaseNoGui.java:528
msgid "An error occurred while uploading the sketch"
@@ -243,7 +245,7 @@ msgstr "برد آردئینو ای وی آر (avr)"
msgid ""
"Arduino can only open its own sketches\n"
"and other files ending in .ino or .pde"
-msgstr ""
+msgstr "نرمافزار آردوینو فقط میتواند اسکچهای خود و یا سایر فایلها با پسوند ino. و pde. را باز کند."
#: Base.java:1682
msgid ""
@@ -810,7 +812,7 @@ msgstr "زبان ویرایشگر:"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:322
msgid "Enable Code Folding"
-msgstr ""
+msgstr "مخفیسازی دستورها"
#: Preferences.java:92
msgid "English"
@@ -855,7 +857,7 @@ msgstr "خطای کامپایل"
#: ../../../cc/arduino/contributions/DownloadableContributionsDownloader.java:113
#, java-format
msgid "Error downloading {0}"
-msgstr ""
+msgstr "خطا در دانلودِ {0}"
#: Base.java:1674
msgid "Error getting the Arduino data folder."
@@ -900,7 +902,7 @@ msgstr ""
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:112
#, java-format
msgid "Error reading libraries index: {0}"
-msgstr ""
+msgstr "خطا در خواندن نمایه کتابخانهها: {0}"
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
@@ -962,7 +964,7 @@ msgstr ""
#: ../../../processing/app/BaseNoGui.java:528
msgid "Error while uploading"
-msgstr ""
+msgstr "خطای حین بارگذاری"
#: ../../../processing/app/Editor.java:2409
#: ../../../processing/app/Editor.java:2449
@@ -973,11 +975,11 @@ msgstr "خطا حین بارگذاری: پارامتر پیکربندی '{0}' ا
#: ../../../processing/app/BaseNoGui.java:551
#: ../../../processing/app/BaseNoGui.java:554
msgid "Error while verifying"
-msgstr ""
+msgstr "خطای حین تایید"
#: ../../../processing/app/BaseNoGui.java:521
msgid "Error while verifying/uploading"
-msgstr ""
+msgstr "خطای حین تایید/بارگذاری"
#: Preferences.java:93
msgid "Estonian"
@@ -989,7 +991,7 @@ msgstr "نمونهها"
#: ../../../../../app/src/processing/app/Base.java:1185
msgid "Examples for any board"
-msgstr ""
+msgstr "مثالهایی برای تمام بوردها"
#: ../../../../../app/src/processing/app/Base.java:1205
#: ../../../../../app/src/processing/app/Base.java:1216
@@ -1343,7 +1345,7 @@ msgstr ""
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:73
#, java-format
msgid "Looking for recipes like {0}*{1}"
-msgstr ""
+msgstr "جستجوی دستور العملهایی مانند {0}*{1}"
#: ../../../processing/app/Sketch.java:1684
msgid "Low memory available, stability problems may occur."
@@ -1522,7 +1524,7 @@ msgstr "نروژی"
msgid ""
"Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size "
"for tips on reducing your footprint."
-msgstr ""
+msgstr "حافظه، کافی نیست؛ مشاهده نکاتی درباره کاهش مصرف فضا در لینک زیر:\nhttp://www.arduino.cc/en/Guide/Troubleshooting#size"
#: Preferences.java:80 Sketch.java:585 Sketch.java:737 Sketch.java:1042
#: Editor.java:2145 Editor.java:2465
diff --git a/arduino-core/src/processing/app/i18n/Resources_fa.properties b/arduino-core/src/processing/app/i18n/Resources_fa.properties
index d0da026af80..eec39cbc9ec 100644
--- a/arduino-core/src/processing/app/i18n/Resources_fa.properties
+++ b/arduino-core/src/processing/app/i18n/Resources_fa.properties
@@ -20,10 +20,12 @@
# Translators:
# Translators:
# Translators:
+# Ardeshir Hakimi, 2020
# arminjavan , 2014
+# axzw tere , 2020
# Ebrahim Byagowi , 2012
# Mohammad Hamidi , 2017
-!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2018-11-23 15\:06+0000\nLast-Translator\: Cristian Maglie \nLanguage-Team\: Persian (http\://www.transifex.com/mbanzi/arduino-ide-15/language/fa/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fa\nPlural-Forms\: nplurals\=2; plural\=(n > 1);\n
+!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2020-02-04 08\:56+0000\nLast-Translator\: Ardeshir Hakimi\nLanguage-Team\: Persian (http\://www.transifex.com/mbanzi/arduino-ide-15/language/fa/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fa\nPlural-Forms\: nplurals\=2; plural\=(n > 1);\n
#: Preferences.java:358 Preferences.java:374
\ \ (requires\ restart\ of\ Arduino)=\ (\u0646\u06cc\u0627\u0632\u0645\u0646\u062f \u0628\u0627\u0632\u06af\u0634\u0627\u06cc\u06cc \u0645\u062c\u062f\u062f \u0646\u0645\u0648\u062f\u0646 \u0622\u0631\u062f\u0626\u06cc\u0646\u0648)
@@ -46,10 +48,10 @@
'arch'\ folder\ is\ no\ longer\ supported\!\ See\ http\://goo.gl/gfFJzU\ for\ more\ information=\u067e\u0648\u0634\u0647 "arch" \u062f\u06cc\u06af\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0646\u0645\u06cc \u0634\u0648\u062f. \u0628\u0631\u0627\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631 \u0628\u0647 \u0627\u06cc\u0646 \u0622\u062f\u0631\u0633 \u0645\u0631\u0627\u062c\u0639\u0647 \u06a9\u0646\u06cc\u062f \: http\://goo.gl/gfFJzU
#: Preferences.java:478
-(edit\ only\ when\ Arduino\ is\ not\ running)=(\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0641\u0642\u0637 \u0628\u0647 \u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u0622\u0631\u062f\u0626\u06cc\u0646\u0648 \u062f\u0631\u062d\u0627\u0644 \u0627\u062c\u0631\u0627 \u0646\u06cc\u0633\u062a)
+(edit\ only\ when\ Arduino\ is\ not\ running)=(\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0641\u0642\u0637 \u0628\u0647 \u0647\u0646\u06af\u0627\u0645 \u0639\u062f\u0645 \u0627\u062c\u0631\u0627\u06cc \u0622\u0631\u062f\u0648\u06cc\u0646\u0648)
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:67
-!(legacy)=
+(legacy)=(\u0628\u0627\u0642\u06cc\u200c\u0645\u0627\u0646\u062f\u0647 \u0627\u0632 \u0646\u0631\u0645\u200c\u0627\u0641\u0632\u0627\u0631 \u0642\u0628\u0644\u06cc)
#: ../../../processing/app/helpers/CommandlineParser.java:149
--curdir\ no\ longer\ supported=--curdir \u062f\u06cc\u06af\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0646\u0645\u06cc \u0634\u0648\u062f.
@@ -117,7 +119,7 @@ All=\u0647\u0645\u0647
An\ error\ occurred\ while\ trying\ to\ fix\ the\ file\ encoding.\nDo\ not\ attempt\ to\ save\ this\ sketch\ as\ it\ may\ overwrite\nthe\ old\ version.\ Use\ Open\ to\ re-open\ the\ sketch\ and\ try\ again.\n=\u062e\u0637\u0627\u06cc\u06cc \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0627\u0635\u0644\u0627\u062d \u06a9\u062f\u06af\u0630\u0627\u0631\u06cc \u067e\u0631\u0648\u0646\u062f\u0647 \u0631\u062e\u200c\u062f\u0627\u062f.\n\u0633\u0639\u06cc \u0646\u06a9\u0646\u06cc\u062f \u0627\u06cc\u0646 \u0637\u0631\u062d \u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0646\u0633\u062e\u0647\u0654 \u0642\u0628\u0644\u06cc \u0630\u062e\u06cc\u0631\u0647\u0654 \u06a9\u0646\u06cc\u062f.\n\u0627\u0632 \u0628\u0627\u0632\u06a9\u0631\u062f\u0646 \u0631\u0627 \u0628\u0627\u0632\u06a9\u0631\u062f\u0646 \u0645\u062c\u062f\u062f \u0637\u0631\u062d \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u062f\u0648\u0628\u0627\u0631\u0647 \u0633\u0639\u06cc \u0646\u0645\u0627\u06cc\u06cc\u062f.\n
#: ../../../cc/arduino/contributions/libraries/LibraryInstaller.java:99
-!An\ error\ occurred\ while\ updating\ libraries\ index\!=
+An\ error\ occurred\ while\ updating\ libraries\ index\!=\u0628\u0631\u0648\u0632 \u0645\u0634\u06a9\u0644 \u062f\u0631 \u0628\u0647\u200c\u0631\u0648\u0632 \u0631\u0633\u0627\u0646\u06cc \u0646\u0645\u0627\u06cc\u0647\u200c\u06cc \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647\u200c\u0647\u0627
#: ../../../processing/app/BaseNoGui.java:528
An\ error\ occurred\ while\ uploading\ the\ sketch=\u062f\u0631 \u0647\u0646\u06af\u0627\u0645 \u0622\u067e\u0644\u0648\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0637\u0627\u06cc\u06cc \u0631\u062e \u062f\u0627\u062f.
@@ -165,7 +167,7 @@ Arduino\ ARM\ (32-bits)\ Boards=\u0628\u0631\u062f \u0622\u0631\u062f\u0626\u06c
Arduino\ AVR\ Boards=\u0628\u0631\u062f \u0622\u0631\u062f\u0626\u06cc\u0646\u0648 \u0627\u06cc \u0648\u06cc \u0622\u0631 (avr)
#: Editor.java:2137
-!Arduino\ can\ only\ open\ its\ own\ sketches\nand\ other\ files\ ending\ in\ .ino\ or\ .pde=
+Arduino\ can\ only\ open\ its\ own\ sketches\nand\ other\ files\ ending\ in\ .ino\ or\ .pde=\u0646\u0631\u0645\u200c\u0627\u0641\u0632\u0627\u0631 \u0622\u0631\u062f\u0648\u06cc\u0646\u0648 \u0641\u0642\u0637 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0627\u0633\u06a9\u0686\u200c\u0647\u0627\u06cc \u062e\u0648\u062f \u0648 \u06cc\u0627 \u0633\u0627\u06cc\u0631 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627 \u0628\u0627 \u067e\u0633\u0648\u0646\u062f ino. \u0648 pde. \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u062f.
#: Base.java:1682
Arduino\ cannot\ run\ because\ it\ could\ not\ncreate\ a\ folder\ to\ store\ your\ settings.=\u0622\u0631\u062f\u0626\u06cc\u0646\u0648 \u0646\u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0627\u062c\u0631\u0627 \u0634\u0648\u062f \u0628\u0647 \u0627\u06cc\u0646 \u062f\u0644\u06cc\u0644 \u06a9\u0647 \u0646\u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f\n\u067e\u0648\u0634\u0647\u200c\u0627\u06cc \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647\u0654 \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0634\u0645\u0627 \u0628\u0633\u0627\u0632\u062f.
@@ -579,7 +581,7 @@ Editor\ font\ size\:\ =\u0627\u0646\u062f\u0627\u0632\u0647\u0654 \u0642\u0644\u
Editor\ language\:\ =\u0632\u0628\u0627\u0646 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631\:
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:322
-!Enable\ Code\ Folding=
+Enable\ Code\ Folding=\u0645\u062e\u0641\u06cc\u200c\u0633\u0627\u0632\u06cc \u062f\u0633\u062a\u0648\u0631\u0647\u0627
#: Preferences.java:92
English=\u0627\u0646\u06af\u0644\u06cc\u0633\u06cc
@@ -614,7 +616,7 @@ Error\ compiling.=\u062e\u0637\u0627\u06cc \u06a9\u0627\u0645\u067e\u0627\u06cc\
#: ../../../cc/arduino/contributions/DownloadableContributionsDownloader.java:113
#, java-format
-!Error\ downloading\ {0}=
+Error\ downloading\ {0}=\u062e\u0637\u0627 \u062f\u0631 \u062f\u0627\u0646\u0644\u0648\u062f\u0650 {0}
#: Base.java:1674
Error\ getting\ the\ Arduino\ data\ folder.=\u062e\u0637\u0627\u06cc \u06af\u0631\u0641\u062a\u0646 \u067e\u0648\u0634\u0647 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0622\u0631\u062f\u0626\u06cc\u0646\u0648
@@ -647,7 +649,7 @@ Error\ opening\ serial\ port\ ''{0}''.=\u062e\u0637\u0627 \u0628\u0647 \u0647\u0
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:112
#, java-format
-!Error\ reading\ libraries\ index\:\ {0}=
+Error\ reading\ libraries\ index\:\ {0}=\u062e\u0637\u0627 \u062f\u0631 \u062e\u0648\u0627\u0646\u062f\u0646 \u0646\u0645\u0627\u06cc\u0647\u200c \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647\u200c\u0647\u0627\: {0}
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
@@ -692,7 +694,7 @@ Error\ while\ printing.=\u062e\u0637\u0627 \u0647\u0646\u06af\u0627\u0645 \u0686
!Error\ while\ setting\ serial\ port\ parameters\:\ {0}\ {1}\ {2}\ {3}=
#: ../../../processing/app/BaseNoGui.java:528
-!Error\ while\ uploading=
+Error\ while\ uploading=\u062e\u0637\u0627\u06cc \u062d\u06cc\u0646 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc
#: ../../../processing/app/Editor.java:2409
#: ../../../processing/app/Editor.java:2449
@@ -701,10 +703,10 @@ Error\ while\ uploading\:\ missing\ '{0}'\ configuration\ parameter=\u062e\u0637
#: ../../../processing/app/BaseNoGui.java:506
#: ../../../processing/app/BaseNoGui.java:551
#: ../../../processing/app/BaseNoGui.java:554
-!Error\ while\ verifying=
+Error\ while\ verifying=\u062e\u0637\u0627\u06cc \u062d\u06cc\u0646 \u062a\u0627\u06cc\u06cc\u062f
#: ../../../processing/app/BaseNoGui.java:521
-!Error\ while\ verifying/uploading=
+Error\ while\ verifying/uploading=\u062e\u0637\u0627\u06cc \u062d\u06cc\u0646 \u062a\u0627\u06cc\u06cc\u062f/\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc
#: Preferences.java:93
Estonian=\u0627\u0633\u062a\u0648\u0646\u06cc\u0627\u06cc\u06cc
@@ -713,7 +715,7 @@ Estonian=\u0627\u0633\u062a\u0648\u0646\u06cc\u0627\u06cc\u06cc
Examples=\u0646\u0645\u0648\u0646\u0647\u200c\u0647\u0627
#: ../../../../../app/src/processing/app/Base.java:1185
-!Examples\ for\ any\ board=
+Examples\ for\ any\ board=\u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u062a\u0645\u0627\u0645 \u0628\u0648\u0631\u062f\u0647\u0627
#: ../../../../../app/src/processing/app/Base.java:1205
#: ../../../../../app/src/processing/app/Base.java:1216
@@ -975,7 +977,7 @@ Lithuaninan=\u0644\u06cc\u062a\u0648\u0627\u0646\u06cc\u0627\u06cc\u06cc
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:73
#, java-format
-!Looking\ for\ recipes\ like\ {0}*{1}=
+Looking\ for\ recipes\ like\ {0}*{1}=\u062c\u0633\u062a\u062c\u0648\u06cc \u062f\u0633\u062a\u0648\u0631 \u0627\u0644\u0639\u0645\u0644\u200c\u0647\u0627\u06cc\u06cc \u0645\u0627\u0646\u0646\u062f {0}*{1}
#: ../../../processing/app/Sketch.java:1684
!Low\ memory\ available,\ stability\ problems\ may\ occur.=
@@ -1109,7 +1111,7 @@ No\ valid\ code\ files\ found=\u067e\u0631\u0648\u0646\u062f\u0647 \u062d\u0627\
Norwegian\ Bokm\u00e5l=\u0646\u0631\u0648\u0698\u06cc
#: ../../../processing/app/Sketch.java:1656
-!Not\ enough\ memory;\ see\ http\://www.arduino.cc/en/Guide/Troubleshooting\#size\ for\ tips\ on\ reducing\ your\ footprint.=
+Not\ enough\ memory;\ see\ http\://www.arduino.cc/en/Guide/Troubleshooting\#size\ for\ tips\ on\ reducing\ your\ footprint.=\u062d\u0627\u0641\u0638\u0647\u060c \u06a9\u0627\u0641\u06cc \u0646\u06cc\u0633\u062a\u061b \u0645\u0634\u0627\u0647\u062f\u0647 \u0646\u06a9\u0627\u062a\u06cc \u062f\u0631\u0628\u0627\u0631\u0647 \u06a9\u0627\u0647\u0634 \u0645\u0635\u0631\u0641 \u0641\u0636\u0627 \u062f\u0631 \u0644\u06cc\u0646\u06a9 \u0632\u06cc\u0631\:\nhttp\://www.arduino.cc/en/Guide/Troubleshooting\#size
#: Preferences.java:80 Sketch.java:585 Sketch.java:737 Sketch.java:1042
#: Editor.java:2145 Editor.java:2465
diff --git a/arduino-core/src/processing/app/i18n/Resources_fa_IR.po b/arduino-core/src/processing/app/i18n/Resources_fa_IR.po
index 1a8f8cb310c..03b65a91fe4 100644
--- a/arduino-core/src/processing/app/i18n/Resources_fa_IR.po
+++ b/arduino-core/src/processing/app/i18n/Resources_fa_IR.po
@@ -21,14 +21,16 @@
# Translators:
# Translators:
# Ali Mirjamali , 2013
+# Hoseinali Shobeiri , 2020-2021
+# Hoseinali Shobeiri , 2020
# Seyyed Mohammad Amin Mousavi , 2017
msgid ""
msgstr ""
"Project-Id-Version: Arduino IDE 1.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
-"PO-Revision-Date: 2018-11-23 15:06+0000\n"
-"Last-Translator: Cristian Maglie \n"
+"PO-Revision-Date: 2021-10-08 15:21+0000\n"
+"Last-Translator: Hoseinali Shobeiri \n"
"Language-Team: Persian (Iran) (http://www.transifex.com/mbanzi/arduino-ide-15/language/fa_IR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -87,7 +89,7 @@ msgstr "--verbose,--verbose-upload , --verbose-build\nتنها می توانند
#: Sketch.java:746
msgid ".pde -> .ino"
-msgstr ""
+msgstr ".PDE -> .INO"
#: Editor.java:2053
msgid ""
@@ -100,27 +102,27 @@ msgstr ""
#: Editor.java:2169
#, java-format
msgid "A folder named \"{0}\" already exists. Can't open sketch."
-msgstr ""
+msgstr "یک پوشه ای به اسم \"{0}\" از قبل وجود دارد. نمیتوان طرح را باز کرد."
#: Base.java:2690
#, java-format
msgid "A library named {0} already exists"
-msgstr ""
+msgstr "یک کتابخانه ای به اسم {0} از قبل وجود دارد"
#: UpdateCheck.java:103
msgid ""
"A new version of Arduino is available,\n"
"would you like to visit the Arduino download page?"
-msgstr ""
+msgstr "یک نسخه جدید آردوینو در دسترس است. آیا مایلید از صفحه دانلود آردوینو بازدید کنید؟ "
#: ../../../../../app/src/cc/arduino/contributions/BuiltInCoreIsNewerCheck.java:96
#, java-format
msgid "A newer {0} package is available"
-msgstr ""
+msgstr "یک بسته جدیدتر {0} در دسترس است"
#: ../../../../../app/src/processing/app/Base.java:2307
msgid "A subfolder of your sketchbook is not a valid library"
-msgstr ""
+msgstr "پوشه فرعی کتاب طرح شما از یک کتابخانه معتبر نیست"
#: Editor.java:1116
msgid "About Arduino"
@@ -128,11 +130,11 @@ msgstr "در مورد آردوینو"
#: ../../../../../app/src/cc/arduino/i18n/Languages.java:41
msgid "Acoli"
-msgstr ""
+msgstr "آکولی"
#: ../../../../../app/src/processing/app/Base.java:1177
msgid "Add .ZIP Library..."
-msgstr ""
+msgstr "اضافه کردن کتابخانه ... ZIP. "
#: Editor.java:650
msgid "Add File..."
@@ -140,15 +142,15 @@ msgstr "اضافه کردن فایل..."
#: ../../../../../app/src/cc/arduino/view/preferences/AdditionalBoardsManagerURLTextArea.java:73
msgid "Additional Boards Manager URLs"
-msgstr ""
+msgstr "مدیریت آدرس های اضافی بردها"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:268
msgid "Additional Boards Manager URLs: "
-msgstr ""
+msgstr "مدیریت آدرس های اضافی بردها:"
#: ../../../../../app/src/processing/app/Preferences.java:161
msgid "Afrikaans"
-msgstr ""
+msgstr "آفریقایی"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:248
msgid "Aggressively cache compiled core"
@@ -156,13 +158,13 @@ msgstr ""
#: ../../../processing/app/Preferences.java:96
msgid "Albanian"
-msgstr ""
+msgstr "آلبانی"
#: ../../../../../app/src/cc/arduino/contributions/ui/DropdownAllItem.java:42
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/DropdownAllCoresItem.java:43
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:187
msgid "All"
-msgstr ""
+msgstr "همه"
#: tools/FixEncoding.java:77
msgid ""
@@ -173,27 +175,27 @@ msgstr ""
#: ../../../cc/arduino/contributions/libraries/LibraryInstaller.java:99
msgid "An error occurred while updating libraries index!"
-msgstr ""
+msgstr "یک خطا هنگام بروزرسانی شاخصه های کتابخانه ها رخ داد!"
#: ../../../processing/app/BaseNoGui.java:528
msgid "An error occurred while uploading the sketch"
-msgstr ""
+msgstr "یک خطا در هنگام آپلود کردن طرح رخ داد"
#: ../../../processing/app/BaseNoGui.java:506
#: ../../../processing/app/BaseNoGui.java:551
#: ../../../processing/app/BaseNoGui.java:554
msgid "An error occurred while verifying the sketch"
-msgstr ""
+msgstr "یک خطا در هنگام بازبینی کردن طرح رخ داد"
#: ../../../processing/app/BaseNoGui.java:521
msgid "An error occurred while verifying/uploading the sketch"
-msgstr ""
+msgstr "یک خطا در هنگام بازبینی/ آپلود به طرح رخ داد"
#: Base.java:228
msgid ""
"An unknown error occurred while trying to load\n"
"platform-specific code for your machine."
-msgstr ""
+msgstr "یک خطا نامشخص در هنگام بارگذاری\n کد پلتفرم-خاص برای ماشین شما رخ داد."
#: Preferences.java:85
msgid "Arabic"
@@ -205,15 +207,15 @@ msgstr ""
#: tools/Archiver.java:48
msgid "Archive Sketch"
-msgstr ""
+msgstr "آرشیو کردن طرح"
#: tools/Archiver.java:109
msgid "Archive sketch as:"
-msgstr ""
+msgstr "آرشیو کردن طرح به عنوان:"
#: tools/Archiver.java:139
msgid "Archive sketch canceled."
-msgstr ""
+msgstr "آرشیو کردن طرح لغو شد."
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:67
#, java-format
@@ -228,7 +230,7 @@ msgstr ""
#: ../../../../../arduino-core/src/processing/app/I18n.java:24
msgid "Arduino"
-msgstr ""
+msgstr "آردوینو"
#: ../../../processing/app/I18n.java:83
msgid "Arduino ARM (32-bits) Boards"
@@ -242,19 +244,19 @@ msgstr "بردهای AVR آردوینو"
msgid ""
"Arduino can only open its own sketches\n"
"and other files ending in .ino or .pde"
-msgstr ""
+msgstr "آردوئینو فقط میتواند طرح های خودش را باز کند\nو دیگر فایل ها که آخر آنها با .ino یا .pde هستند"
#: Base.java:1682
msgid ""
"Arduino cannot run because it could not\n"
"create a folder to store your settings."
-msgstr ""
+msgstr "آردوئینو نمیتواند اجرا شود زیرا نمیتوان\n یک پوشه درست کرد که تنظیمات شما ذخیره شود."
#: Base.java:1889
msgid ""
"Arduino cannot run because it could not\n"
"create a folder to store your sketchbook."
-msgstr ""
+msgstr "آردوئینو نمیتواند اجرا شود زیرا نمیتوان\nیک پوشه درست کرد که کتاب طرح شما ذخیره شود."
#: ../../../processing/app/EditorStatus.java:471
msgid "Arduino: "
@@ -267,23 +269,23 @@ msgstr "اطمینان دارید که میخواهید \"{0}\" را حذف
#: Sketch.java:587
msgid "Are you sure you want to delete this sketch?"
-msgstr ""
+msgstr "مطمئن هستید که میخواهید این طرح را حذف کنید؟ "
#: ../../../processing/app/Base.java:356
msgid "Argument required for --board"
-msgstr ""
+msgstr "استدلال نیاز است برای بورد--"
#: ../../../processing/app/Base.java:363
msgid "Argument required for --port"
-msgstr ""
+msgstr "استدلال نیاز است برای پورت--"
#: ../../../processing/app/Base.java:377
msgid "Argument required for --pref"
-msgstr ""
+msgstr "استدلال نیاز است برای pref--"
#: ../../../processing/app/Base.java:384
msgid "Argument required for --preferences-file"
-msgstr ""
+msgstr "استدلال نیاز است برای فایل-ترجیحات--"
#: ../../../processing/app/helpers/CommandlineParser.java:76
#: ../../../processing/app/helpers/CommandlineParser.java:83
@@ -297,40 +299,40 @@ msgstr "ارمنی"
#: ../../../processing/app/Preferences.java:138
msgid "Asturian"
-msgstr ""
+msgstr "استرالیایی"
#: ../../../processing/app/debug/Compiler.java:145
msgid "Authorization required"
-msgstr ""
+msgstr "مجوز لازم است"
#: tools/AutoFormat.java:91
msgid "Auto Format"
-msgstr ""
+msgstr "فرمت خودکار"
#: tools/AutoFormat.java:944
msgid "Auto Format finished."
-msgstr ""
+msgstr "فرمت خودکار به پایان رسید."
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:457
msgid "Auto-detect proxy settings"
-msgstr ""
+msgstr "تنظیمات تشخیص-خودکار پروکسی"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:264
msgid "Automatic"
-msgstr ""
+msgstr "اتوماتیک"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:474
msgid "Automatic proxy configuration URL:"
-msgstr ""
+msgstr "آدرس پیکربندی اتوماتیک پروکسی:"
#: SerialMonitor.java:110
msgid "Autoscroll"
-msgstr ""
+msgstr "حرکت خودکار"
#: Editor.java:2619
#, java-format
msgid "Bad error line: {0}"
-msgstr ""
+msgstr "خطای بد خط: {0}"
#: Editor.java:2136
msgid "Bad file selected"
@@ -338,7 +340,7 @@ msgstr "فایل اشتباه انتخاب شده"
#: ../../../processing/app/Preferences.java:149
msgid "Basque"
-msgstr ""
+msgstr "باسکایی"
#: ../../../processing/app/Preferences.java:139
msgid "Belarusian"
@@ -351,25 +353,25 @@ msgstr "بُرد"
#: ../../../../../app//src/processing/app/Editor.java:2824
msgid "Board Info"
-msgstr ""
+msgstr "اطلاعات برد"
#: ../../../../../app/src/processing/app/Editor.java:2545
#: ../../../../../app/src/processing/app/Editor.java:2641
#, java-format
msgid "Board at {0} is not available"
-msgstr ""
+msgstr "برد در {0} در دسترس نیست"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:62
#, java-format
msgid "Board {0} (platform {1}, package {2}) is unknown"
-msgstr ""
+msgstr "بورد {0} (پلتفرم {1}, بسته {2}) نامشخص است"
#: ../../../processing/app/debug/TargetBoard.java:42
#, java-format
msgid ""
"Board {0}:{1}:{2} doesn''t define a ''build.board'' preference. Auto-set to:"
" {3}"
-msgstr ""
+msgstr "بورد {0}:{1}:{2} ترجیحات یک \"ساخت.بورد\" را تعریف نمیکند. تنظیم-خودکار به: {3}"
#: ../../../processing/app/EditorStatus.java:472
msgid "Board: "
@@ -377,20 +379,20 @@ msgstr "بُرد:"
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:89
msgid "Boards Manager"
-msgstr ""
+msgstr "مدیریت بردها"
#: ../../../../../app/src/processing/app/Base.java:1320
msgid "Boards Manager..."
-msgstr ""
+msgstr "مدیریت بردها..."
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCell.java:328
msgid "Boards included in this package:"
-msgstr ""
+msgstr "بورد های شامل شده در این بسته:"
#: ../../../processing/app/debug/Compiler.java:1273
#, java-format
msgid "Bootloader file specified but missing: {0}"
-msgstr ""
+msgstr "فایل بوت لودر مسشخص شده ولی از بین رفته: {0}"
#: ../../../processing/app/Preferences.java:140
msgid "Bosnian"
@@ -402,15 +404,15 @@ msgstr "هم خط جدید و هم سر خط"
#: Preferences.java:81
msgid "Browse"
-msgstr ""
+msgstr "مرورکردن"
#: ../../../processing/app/Sketch.java:1530
msgid "Build options changed, rebuilding all"
-msgstr ""
+msgstr "گزینه های ساخت تغییر کرد, بازسازی همه"
#: ../../../../../app/src/processing/app/Base.java:1210
msgid "Built-in Examples"
-msgstr ""
+msgstr "مثال های داخلی"
#: ../../../processing/app/Preferences.java:80
msgid "Bulgarian"
@@ -418,7 +420,7 @@ msgstr "بلغاری"
#: ../../../processing/app/Preferences.java:141
msgid "Burmese (Myanmar)"
-msgstr ""
+msgstr "برمه ای (میانمار)"
#: Editor.java:708
msgid "Burn Bootloader"
@@ -426,27 +428,27 @@ msgstr "Bootloader را ذخیره کن"
#: Editor.java:2504
msgid "Burning bootloader to I/O Board (this may take a minute)..."
-msgstr ""
+msgstr "درحال سوزاندن بوت لودر به برد I/O (ممکن است تا یک دقیقه طول بکشد)..."
#: ../../../../../arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java:91
msgid ""
"CRC doesn't match, file is corrupted. It may be a temporary problem, please "
"retry later."
-msgstr ""
+msgstr "CRC مطابقت ندارد، فایل خراب شده است. ممکن است یک مشکل موقت باشد، لطفا بعدا تلاش کنید."
#: ../../../processing/app/Base.java:379
#, java-format
msgid "Can only pass one of: {0}"
-msgstr ""
+msgstr "فقط میتوان گذر کرد یکی از: {0}"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:254
msgid "Can't enable external editor"
-msgstr ""
+msgstr "نمیتوان ویرایشگر خارجی را فعال کرد"
#: ../../../processing/app/BaseNoGui.java:504
#: ../../../processing/app/BaseNoGui.java:549
msgid "Can't find the sketch in the specified path"
-msgstr ""
+msgstr "نمیتوان طرح را در مسیر مشخص شده پیدا کرد"
#: ../../../processing/app/Preferences.java:92
msgid "Canadian French"
@@ -455,11 +457,11 @@ msgstr "فرانسوی (کانادا)"
#: Preferences.java:79 Sketch.java:585 Sketch.java:737 Sketch.java:1042
#: Editor.java:2064 Editor.java:2145 Editor.java:2465
msgid "Cancel"
-msgstr ""
+msgstr "انصراف"
#: ../../../processing/app/Base.java:465
msgid "Cannot specify any sketch files"
-msgstr ""
+msgstr "نمیتوان هر فایل طرحی را مشخص کرد"
#: SerialMonitor.java:112
msgid "Carriage return"
@@ -471,7 +473,7 @@ msgstr "کاتالان"
#: Preferences.java:419
msgid "Check for updates on startup"
-msgstr ""
+msgstr "بررسی برای بروز رسانی ها هنگام راه اندازی"
#: ../../../processing/app/Preferences.java:142
msgid "Chinese (China)"
@@ -483,15 +485,15 @@ msgstr "چینی (تایوان)"
#: ../../../processing/app/Preferences.java:143
msgid "Chinese (Taiwan) (Big5)"
-msgstr ""
+msgstr "چینی (تایوان) (Big5)"
#: ../../../../../app/src/processing/app/AbstractTextMonitor.java:80
msgid "Clear output"
-msgstr ""
+msgstr "پاک کردن خروجی"
#: ../../../../../app/src/cc/arduino/view/preferences/AdditionalBoardsManagerURLTextArea.java:98
msgid "Click for a list of unofficial boards support URLs"
-msgstr ""
+msgstr "برای لیستی از آدرس های بردهای غیر رسمی پشتیبانی شده کلیک کنید"
#: Editor.java:521 Editor.java:2024
msgid "Close"
@@ -499,23 +501,23 @@ msgstr "بستن"
#: Editor.java:1208 Editor.java:2749
msgid "Comment/Uncomment"
-msgstr ""
+msgstr "نظر/بدون نظر"
#: ../../../../../arduino-core/src/processing/app/I18n.java:30
msgid "Communication"
-msgstr ""
+msgstr "ارتباطات"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:266
msgid "Compiler warnings: "
-msgstr ""
+msgstr "خطاهای کامپایلر:"
#: Sketch.java:1608 Editor.java:1890
msgid "Compiling sketch..."
-msgstr ""
+msgstr "درحال کامپایل کردن طرح... "
#: ../../../../../arduino-core/src/processing/app/I18n.java:27
msgid "Contributed"
-msgstr ""
+msgstr "مشارکت شد"
#: Editor.java:1157 Editor.java:2707
msgid "Copy"
@@ -531,12 +533,12 @@ msgstr "پیغامهای خطا را کپی کن"
#: Editor.java:1165 Editor.java:2715
msgid "Copy for Forum"
-msgstr ""
+msgstr "کپی برای انجمن"
#: Sketch.java:1089
#, java-format
msgid "Could not add ''{0}'' to the sketch."
-msgstr ""
+msgstr "نمیتوان \"{0}\" را به طرح اضافه کرد."
#: Editor.java:2188
msgid "Could not copy to a proper location."
@@ -549,11 +551,11 @@ msgstr ""
#: Editor.java:2179
msgid "Could not create the sketch folder."
-msgstr ""
+msgstr "نمیتوان پوشه طرح را ساخت."
#: Editor.java:2206
msgid "Could not create the sketch."
-msgstr ""
+msgstr "نمیتوان طرح را ساخت"
#: Sketch.java:617
#, java-format
@@ -568,17 +570,17 @@ msgstr "حذف فایل ''{0}'' ممکن نشد."
#: ../../../processing/app/debug/TargetPlatform.java:74
#, java-format
msgid "Could not find boards.txt in {0}. Is it pre-1.5?"
-msgstr ""
+msgstr "نمیتوان boards.txt را در {0} پیدا کرد. آیا pre-1.5 است؟"
#: ../../../cc/arduino/packages/uploaders/SerialUploader.java:282
#, java-format
msgid "Could not find tool {0}"
-msgstr ""
+msgstr "نمیتوان ابزار {0} را پیدا کرد"
#: ../../../cc/arduino/packages/uploaders/SerialUploader.java:278
#, java-format
msgid "Could not find tool {0} from package {1}"
-msgstr ""
+msgstr "نمیتوان ابزار {0} را از بسته {1} پیدا کرد"
#: Base.java:1934
#, java-format
@@ -619,25 +621,25 @@ msgstr ""
#: Base.java:2482
#, java-format
msgid "Could not remove old version of {0}"
-msgstr ""
+msgstr "نمیتوان نسخه قدیمی {0} را برداشت"
#: Base.java:2492
#, java-format
msgid "Could not replace {0}"
-msgstr ""
+msgstr "نمیتوان {0} را جابجا کرد"
#: ../../../../../arduino-core/src/processing/app/PreferencesData.java:141
#, java-format
msgid "Could not write preferences file: {0}"
-msgstr ""
+msgstr "نمیتوان فایل اولویت ها را نوشت: {0}"
#: tools/Archiver.java:74
msgid "Couldn't archive sketch"
-msgstr ""
+msgstr "نمیتوان طرح را آرشیو کرد"
#: Sketch.java:1647
msgid "Couldn't determine program size: {0}"
-msgstr ""
+msgstr "نمیتوان اندازه برنامه را تعیین کرد: {0}"
#: Sketch.java:616
msgid "Couldn't do it"
@@ -652,43 +654,43 @@ msgstr ""
#: ../../../processing/app/Preferences.java:82
msgid "Croatian"
-msgstr ""
+msgstr "کرواسی"
#: Editor.java:1149 Editor.java:2699
msgid "Cut"
-msgstr ""
+msgstr "برش"
#: ../../../../../app/src/processing/app/Preferences.java:119
msgid "Czech (Czech Republic)"
-msgstr ""
+msgstr "چک (جمهوری چک)"
#: ../../../../../app/src/processing/app/Preferences.java:120
msgid "Danish (Denmark)"
-msgstr ""
+msgstr "دانمارکی (دانمارک)"
#: ../../../../../arduino-core/src/processing/app/I18n.java:36
msgid "Data Processing"
-msgstr ""
+msgstr "درحال پردازش داده"
#: ../../../../../arduino-core/src/processing/app/I18n.java:35
msgid "Data Storage"
-msgstr ""
+msgstr "ذخیره سازی داده"
#: ../../../../../app/src/processing/app/Editor.java:1386
msgid "Decrease Font Size"
-msgstr ""
+msgstr "کاهش سایز فونت"
#: Editor.java:1224 Editor.java:2765
msgid "Decrease Indent"
-msgstr ""
+msgstr "کاهش تو رفتگی"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:185
msgid "Default"
-msgstr ""
+msgstr "پیش فرض"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:870
msgid "Default theme"
-msgstr ""
+msgstr "تم پیش فرض"
#: EditorHeader.java:314 Sketch.java:591
msgid "Delete"
@@ -696,21 +698,21 @@ msgstr "حذف"
#: ../../../../../arduino-core/src/processing/app/I18n.java:33
msgid "Device Control"
-msgstr ""
+msgstr "کنترل دستگاه"
#: debug/Uploader.java:199
msgid ""
"Device is not responding, check the right serial port is selected or RESET "
"the board right before exporting"
-msgstr ""
+msgstr "دستگاه پاسخ نمیدهد، چک کنید که پورت سریال درست است یا برد را قبل از استخراج ریست کنید"
#: tools/FixEncoding.java:57
msgid "Discard all changes and reload sketch?"
-msgstr ""
+msgstr "صرف نظر کردن همه تغییرات و بارگیری مجدد طرح؟ "
#: ../../../../../arduino-core/src/processing/app/I18n.java:29
msgid "Display"
-msgstr ""
+msgstr "نمایش"
#: ../../../processing/app/Preferences.java:438
msgid "Display line numbers"
@@ -721,7 +723,7 @@ msgstr "شماره خطوط را نشان بده"
msgid ""
"Do you want to remove {0}?\n"
"If you do so you won't be able to use {0} any more."
-msgstr ""
+msgstr "آیا میخواهید {0} را بردارید؟ اگر این کار را کنید دیگر نمیتوانید از {0} استفاده کنید. "
#: Editor.java:2064
msgid "Don't Save"
@@ -738,7 +740,7 @@ msgstr "ذخیره Bootloader انجام گردید."
#: ../../../processing/app/BaseNoGui.java:507
#: ../../../processing/app/BaseNoGui.java:552
msgid "Done compiling"
-msgstr ""
+msgstr "کامپایل انجام شد"
#: Editor.java:1911 Editor.java:1928
msgid "Done compiling."
@@ -750,7 +752,7 @@ msgstr "پایان چاپ."
#: ../../../processing/app/BaseNoGui.java:514
msgid "Done uploading"
-msgstr ""
+msgstr "آپلود انجام شد"
#: Editor.java:2395 Editor.java:2431
msgid "Done uploading."
@@ -759,7 +761,7 @@ msgstr "آپلود شد."
#: ../../../cc/arduino/contributions/DownloadableContributionsDownloader.java:105
#, java-format
msgid "Downloaded {0}kb of {1}kb."
-msgstr ""
+msgstr "دانلود شده {0} کیلوبایت از {1} کیلوبایت."
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:107
msgid "Downloading boards definitions."
@@ -767,16 +769,16 @@ msgstr ""
#: ../../../cc/arduino/contributions/libraries/LibraryInstaller.java:86
msgid "Downloading libraries index..."
-msgstr ""
+msgstr "درحال دانلود شاخصه کتابخانه ها..."
#: ../../../cc/arduino/contributions/libraries/LibraryInstaller.java:115
#, java-format
msgid "Downloading library: {0}"
-msgstr ""
+msgstr "درحال دانلود کتابخانه: {0}"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:318
msgid "Downloading platforms index..."
-msgstr ""
+msgstr "درحال دانلود شاخصه پلتفرم ها..."
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:113
#, java-format
@@ -793,7 +795,7 @@ msgstr "هلندی"
#: ../../../../../app/src/processing/app/Editor.java:1309
msgid "Edison Help"
-msgstr ""
+msgstr "راهنمای ادیسون"
#: Editor.java:1130
msgid "Edit"
@@ -809,7 +811,7 @@ msgstr "زبان ویرایشگر:"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:322
msgid "Enable Code Folding"
-msgstr ""
+msgstr "فعال کردن تا شدن کد"
#: Preferences.java:92
msgid "English"
@@ -845,7 +847,7 @@ msgstr "خطا در اضافه کردن فایل"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:272
#, java-format
msgid "Error compiling for board {0}."
-msgstr ""
+msgstr "خطا در هنگام کامپایل کردن برای برد {0}"
#: debug/Compiler.java:369
msgid "Error compiling."
@@ -854,7 +856,7 @@ msgstr "خطای کامپایل."
#: ../../../cc/arduino/contributions/DownloadableContributionsDownloader.java:113
#, java-format
msgid "Error downloading {0}"
-msgstr ""
+msgstr "خطا در دانلود {0}"
#: Base.java:1674
msgid "Error getting the Arduino data folder."
@@ -863,7 +865,7 @@ msgstr ""
#: Serial.java:593
#, java-format
msgid "Error inside Serial.{0}()"
-msgstr ""
+msgstr "خطا درون سریال.{0}()"
#: ../../../../../app/src/processing/app/Theme.java:302
#, java-format
@@ -899,7 +901,7 @@ msgstr ""
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:112
#, java-format
msgid "Error reading libraries index: {0}"
-msgstr ""
+msgstr "خطا در هنگام خواندن شاخصه های کتابخانه ها: {0}"
#: ../../../../../arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java:113
#, java-format
@@ -936,7 +938,7 @@ msgstr "خطا در دسترسی به پورت سریال ''{0}''."
#: Editor.java:2512 Editor.java:2516 Editor.java:2520
msgid "Error while burning bootloader."
-msgstr ""
+msgstr "خطا در هنگام سوزاندن بوت لودر"
#: ../../../processing/app/Editor.java:2555
msgid "Error while burning bootloader: missing '{0}' configuration parameter"
@@ -944,11 +946,11 @@ msgstr ""
#: ../../../../../app/src/processing/app/Editor.java:2355
msgid "Error while burning bootloader: please select a serial port."
-msgstr ""
+msgstr "خطا در هنگام سوزاندن بوت لودر: لطفا یک پورت سریال را انتخاب کنید."
#: ../../../../../app/src/processing/app/Editor.java:1940
msgid "Error while compiling: missing '{0}' configuration parameter"
-msgstr ""
+msgstr "خطا در هنگام کامپایل کردن: نبودن پارامتر پیکربندی '{0}'"
#: Editor.java:2567
msgid "Error while printing."
@@ -957,11 +959,11 @@ msgstr "خطا در هنگام چاپ."
#: ../../../../../arduino-core/src/processing/app/Serial.java:117
#, java-format
msgid "Error while setting serial port parameters: {0} {1} {2} {3}"
-msgstr ""
+msgstr "خطا در هنگام تنظیم کردن پارامتر های پورت سریال: {0} {1} {2} {3}"
#: ../../../processing/app/BaseNoGui.java:528
msgid "Error while uploading"
-msgstr ""
+msgstr "خطا در هنگام آپلود کردن"
#: ../../../processing/app/Editor.java:2409
#: ../../../processing/app/Editor.java:2449
@@ -972,7 +974,7 @@ msgstr ""
#: ../../../processing/app/BaseNoGui.java:551
#: ../../../processing/app/BaseNoGui.java:554
msgid "Error while verifying"
-msgstr ""
+msgstr "خطا در هنگام بازبینی کردن"
#: ../../../processing/app/BaseNoGui.java:521
msgid "Error while verifying/uploading"
@@ -988,25 +990,25 @@ msgstr "مثالها"
#: ../../../../../app/src/processing/app/Base.java:1185
msgid "Examples for any board"
-msgstr ""
+msgstr "مثال هایی برای هر برد"
#: ../../../../../app/src/processing/app/Base.java:1205
#: ../../../../../app/src/processing/app/Base.java:1216
#, java-format
msgid "Examples for {0}"
-msgstr ""
+msgstr "مثال هایی برای {0}"
#: ../../../../../app/src/processing/app/Base.java:1244
msgid "Examples from Custom Libraries"
-msgstr ""
+msgstr "مثال هایی از کتابخانه های سفارشی"
#: ../../../../../app/src/processing/app/Base.java:1329
msgid "Examples from Other Libraries"
-msgstr ""
+msgstr "مثال هایی از دیگر کتابخانه ها"
#: ../../../../../app/src/processing/app/Editor.java:753
msgid "Export canceled, changes must first be saved."
-msgstr ""
+msgstr "استخراج لغو شد، تغییرات اول باید ذخیره شود. "
#: ../../../../../app/src/processing/app/Editor.java:750
msgid "Export compiled Binary"
@@ -1015,16 +1017,16 @@ msgstr ""
#: ../../../processing/app/Base.java:416
#, java-format
msgid "Failed to open sketch: \"{0}\""
-msgstr ""
+msgstr "خطا به هنگام باز کردن طرح: \"{0}\""
#: ../../../../../arduino-core/src/processing/app/SketchFile.java:183
#, java-format
msgid "Failed to rename \"{0}\" to \"{1}\""
-msgstr ""
+msgstr "تغییر نام \"{0}\" به \"{1}\" شکست خورد"
#: ../../../../../arduino-core/src/processing/app/Sketch.java:298
msgid "Failed to rename sketch folder"
-msgstr ""
+msgstr "تغییر نام پوشه طرح شکست خورد"
#: Editor.java:491
msgid "File"
@@ -1033,7 +1035,7 @@ msgstr "فایل"
#: ../../../../../arduino-core/src/processing/app/SketchData.java:139
#, java-format
msgid "File name {0} is invalid: ignored"
-msgstr ""
+msgstr "اسم فایل {0} نامعتبر است: صرف نظر شد"
#: Preferences.java:94
msgid "Filipino"
@@ -1041,7 +1043,7 @@ msgstr "فلیپینی"
#: ../../../../../app/src/cc/arduino/contributions/ui/InstallerJDialog.java:95
msgid "Filter your search..."
-msgstr ""
+msgstr "جست و جو یتان را فیلتر کنید..."
#: FindReplace.java:124 FindReplace.java:127
msgid "Find"
@@ -1057,7 +1059,7 @@ msgstr "جستجو مورد قبلی"
#: Editor.java:1086 Editor.java:2775
msgid "Find in Reference"
-msgstr ""
+msgstr "پیدا کردن در ارجاع"
#: Editor.java:1234
msgid "Find..."
@@ -1080,7 +1082,7 @@ msgstr ""
msgid ""
"For information on installing libraries, see: "
"http://www.arduino.cc/en/Guide/Libraries\n"
-msgstr ""
+msgstr "برای اطلاعات از نصب کتابخانه ها، بازدید کنید از: http://www.arduino.cc/en/Guide/Libraries\n"
#: ../../../cc/arduino/packages/uploaders/SerialUploader.java:118
#, java-format
@@ -1105,7 +1107,7 @@ msgstr ""
#: ../../../../../app/src/processing/app/Editor.java:1288
msgid "Galileo Help"
-msgstr ""
+msgstr "راهنمای گالیلهو"
#: ../../../processing/app/Preferences.java:94
msgid "Georgian"
@@ -1117,7 +1119,7 @@ msgstr "آلمانی"
#: ../../../../../app//src/processing/app/Editor.java:817
msgid "Get Board Info"
-msgstr ""
+msgstr "گرفتن اطلاعات برد"
#: Editor.java:1054
msgid "Getting Started"
@@ -1137,11 +1139,11 @@ msgstr ""
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:66
msgid "Go to line"
-msgstr ""
+msgstr "برو به خط"
#: ../../../../../app/src/processing/app/Editor.java:1460
msgid "Go to line..."
-msgstr ""
+msgstr "برو به خط..."
#: Preferences.java:98
msgid "Greek"
@@ -1161,7 +1163,7 @@ msgstr "هندی"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:489
msgid "Host name:"
-msgstr ""
+msgstr "نام درگاه:"
#: Sketch.java:295
msgid ""
@@ -1206,20 +1208,20 @@ msgstr ""
#: ../../../../../app/src/processing/app/Editor.java:778
msgid "Include Library"
-msgstr ""
+msgstr "افزودن کتابخانه"
#: ../../../processing/app/BaseNoGui.java:768
#: ../../../processing/app/BaseNoGui.java:771
msgid "Incorrect IDE installation folder"
-msgstr ""
+msgstr "پوشه نصبی غلط IDE"
#: ../../../../../app/src/processing/app/Editor.java:1378
msgid "Increase Font Size"
-msgstr ""
+msgstr "افزایش سایز فونت"
#: Editor.java:1216 Editor.java:2757
msgid "Increase Indent"
-msgstr ""
+msgstr "افزایش تو رفتگی"
#: Preferences.java:101
msgid "Indonesian"
@@ -1227,7 +1229,7 @@ msgstr "اندونزایی"
#: ../../../../../app/src/processing/app/Base.java:295
msgid "Initializing packages..."
-msgstr ""
+msgstr "آماده سازی بسته ها..."
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCell.java:75
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCell.java:81
@@ -1236,34 +1238,34 @@ msgstr ""
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCell.java:91
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCell.java:303
msgid "Install"
-msgstr ""
+msgstr "نصب"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:170
msgid "Installation completed!"
-msgstr ""
+msgstr "نصب کامل شد!"
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/DropdownInstalledLibraryItem.java:50
msgid "Installed"
-msgstr ""
+msgstr "نصب شد"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:154
msgid "Installing boards..."
-msgstr ""
+msgstr "درحال نصب بردها..."
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java:109
#, java-format
msgid "Installing library: {0}:{1}"
-msgstr ""
+msgstr "درحال نصب کتابخانه: {0}:{1}"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:134
#, java-format
msgid "Installing tools ({0}/{1})..."
-msgstr ""
+msgstr "درحال نصب ابزار ها ({0}/{1})..."
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:239
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java:172
msgid "Installing..."
-msgstr ""
+msgstr "درحال نصب..."
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:256
msgid "Interface scale:"
@@ -1288,7 +1290,7 @@ msgstr ""
#: ../../../../../app/src/processing/app/Base.java:362
#, java-format
msgid "Invalid version {0}"
-msgstr ""
+msgstr "نسخه بی اعتبار {0}"
#: Preferences.java:102
msgid "Italian"
@@ -1346,11 +1348,11 @@ msgstr ""
#: ../../../processing/app/Sketch.java:1684
msgid "Low memory available, stability problems may occur."
-msgstr ""
+msgstr "حافظه کمی دردسترس است، ممکن است خطای پایداری پیش بیاید. "
#: ../../../../../app/src/processing/app/Base.java:1168
msgid "Manage Libraries..."
-msgstr ""
+msgstr "مدیریت کتابخانه ها... "
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:466
msgid "Manual proxy configuration"
@@ -1371,11 +1373,11 @@ msgstr ""
#: ../../../processing/app/BaseNoGui.java:455
msgid "Mode not supported"
-msgstr ""
+msgstr "حالت پشتیبانی نمیشود"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:186
msgid "More"
-msgstr ""
+msgstr "بیشتر"
#: Preferences.java:449
msgid "More preferences can be edited directly in the file"
@@ -1383,11 +1385,11 @@ msgstr ""
#: Editor.java:2156
msgid "Moving"
-msgstr ""
+msgstr "درحال حرکت کردن"
#: ../../../processing/app/BaseNoGui.java:484
msgid "Multiple files not supported"
-msgstr ""
+msgstr "فایل های چندتایی پشتیبانی نمیشود"
#: ../../../processing/app/debug/Compiler.java:520
#, java-format
@@ -1412,7 +1414,7 @@ msgstr "نپالی"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:601
msgid "Network"
-msgstr ""
+msgstr "شبکه"
#: ../../../../../app//src/processing/app/Editor.java:2804
msgid "Network port, can't obtain info"
@@ -1420,7 +1422,7 @@ msgstr ""
#: ../../../../../app/src/processing/app/Editor.java:65
msgid "Network ports"
-msgstr ""
+msgstr "پورت های شبکه"
#: ../../../cc/arduino/packages/uploaders/SSHUploader.java:51
msgid "Network upload using programmer not supported"
@@ -1432,7 +1434,7 @@ msgstr "جدید"
#: EditorHeader.java:292
msgid "New Tab"
-msgstr ""
+msgstr "تب جدید"
#: SerialMonitor.java:112
msgid "Newline"
@@ -1440,7 +1442,7 @@ msgstr "خط جدید"
#: EditorHeader.java:340
msgid "Next Tab"
-msgstr ""
+msgstr "تب بعدی"
#: Preferences.java:78 UpdateCheck.java:108
msgid "No"
@@ -1452,7 +1454,7 @@ msgstr ""
#: tools/format/src/AutoFormat.java:54 tools/AutoFormat.java:916
msgid "No changes necessary for Auto Format."
-msgstr ""
+msgstr "برای فرمت خودکار تغییری ضروری نیست. "
#: ../../../processing/app/BaseNoGui.java:665
msgid "No command line parameters found"
@@ -1472,7 +1474,7 @@ msgstr ""
#: SerialMonitor.java:112
msgid "No line ending"
-msgstr ""
+msgstr "بدون پایان خط"
#: ../../../processing/app/BaseNoGui.java:665
msgid "No parameters"
@@ -1480,7 +1482,7 @@ msgstr ""
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:453
msgid "No proxy"
-msgstr ""
+msgstr "بدون پروکسی"
#: Base.java:541
msgid "No really, time for some fresh air for you."
@@ -1494,7 +1496,7 @@ msgstr ""
#: ../../../processing/app/BaseNoGui.java:504
#: ../../../processing/app/BaseNoGui.java:549
msgid "No sketch"
-msgstr ""
+msgstr "بدون طرح"
#: ../../../processing/app/BaseNoGui.java:428
msgid "No sketchbook"
@@ -1511,7 +1513,7 @@ msgstr ""
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:184
msgid "None"
-msgstr ""
+msgstr "هیچیک"
#: ../../../processing/app/Preferences.java:108
msgid "Norwegian Bokmål"
@@ -1526,7 +1528,7 @@ msgstr ""
#: Preferences.java:80 Sketch.java:585 Sketch.java:737 Sketch.java:1042
#: Editor.java:2145 Editor.java:2465
msgid "OK"
-msgstr ""
+msgstr "تائید"
#: Sketch.java:992 Editor.java:376
msgid "One file added to the sketch."
@@ -1546,11 +1548,11 @@ msgstr ""
#: Editor.java:2688
msgid "Open URL"
-msgstr ""
+msgstr "باز کردن آدرس"
#: Base.java:636
msgid "Open an Arduino sketch..."
-msgstr ""
+msgstr "باز کردن یک طرح آردوینو... "
#: Base.java:903 Editor.java:501
msgid "Open..."
@@ -1558,7 +1560,7 @@ msgstr "باز کردن..."
#: ../../../../../arduino-core/src/processing/app/I18n.java:37
msgid "Other"
-msgstr ""
+msgstr "دیگر"
#: Editor.java:563
msgid "Page Setup"
@@ -1628,7 +1630,7 @@ msgstr "پورت"
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:491
msgid "Port number:"
-msgstr ""
+msgstr "شماره پورت:"
#: ../../../processing/app/Preferences.java:151
msgid "Portugese"
@@ -2132,11 +2134,11 @@ msgstr ""
#: ../../../../../app/src/processing/app/SketchController.java:170
msgid "The main file cannot use an extension"
-msgstr ""
+msgstr "فایل اصلی نمی تواند یک افزونه استفاده کند"
#: Sketch.java:356
msgid "The name cannot start with a period."
-msgstr ""
+msgstr "اسم نمیتواند با یک نقطه شروع شود."
#: Base.java:1412
msgid ""
@@ -2158,7 +2160,7 @@ msgstr ""
#: ../../../../../arduino-core/src/processing/app/Sketch.java:272
#, java-format
msgid "The sketch already contains a file named \"{0}\""
-msgstr ""
+msgstr "این طرح از قبل حاوی یک فایل با همین نام است \"{0}\""
#: Sketch.java:1755
msgid ""
@@ -2212,24 +2214,24 @@ msgstr ""
#: ../../../../../arduino-core/src/processing/app/I18n.java:34
msgid "Timing"
-msgstr ""
+msgstr "زمان سنجی"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:94
#, java-format
msgid "Tool {0} is not available for your operating system."
-msgstr ""
+msgstr "ابزار {0} برای سیستم عامل شما در دسترس نیست."
#: Editor.java:663
msgid "Tools"
-msgstr "ابزار"
+msgstr "ابزار ها"
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:97
msgid "Topic"
-msgstr ""
+msgstr "موضوع"
#: Editor.java:1070
msgid "Troubleshooting"
-msgstr "خطا یابی"
+msgstr "عیب یابی"
#: ../../../processing/app/Preferences.java:117
msgid "Turkish"
@@ -2238,15 +2240,15 @@ msgstr "ترکی"
#: ../../../../../app/src/cc/arduino/contributions/ui/InstallerJDialog.java:109
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java:105
msgid "Type"
-msgstr ""
+msgstr "نوع"
#: ../../../processing/app/Editor.java:2507
msgid "Type board password to access its console"
-msgstr ""
+msgstr "رمز عبور بورد را تایپ کنید تا به کنسول آن دسترسی یابید"
#: ../../../processing/app/Sketch.java:1673
msgid "Type board password to upload a new sketch"
-msgstr ""
+msgstr "رمز عبور بورد را تایپ کنید تا یک طرح جدید آپلود شود"
#: ../../../processing/app/Preferences.java:118
msgid "Ukrainian"
@@ -2255,7 +2257,7 @@ msgstr "اکراینی"
#: ../../../../../arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java:142
#, java-format
msgid "Unable to connect to {0}"
-msgstr ""
+msgstr "اتصال به {0} غیر ممکن است "
#: ../../../processing/app/Editor.java:2524
#: ../../../processing/app/NetworkMonitor.java:145
@@ -2294,7 +2296,7 @@ msgstr ""
#: Editor.java:1133 Editor.java:1355
msgid "Undo"
-msgstr ""
+msgstr "واگرد"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:85
#, java-format
@@ -2303,12 +2305,12 @@ msgstr ""
#: ../../../../../app//src/processing/app/Editor.java:2818
msgid "Unknown board"
-msgstr ""
+msgstr "بورد نامشخص"
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:86
#, java-format
msgid "Unknown sketch file extension: {0}"
-msgstr ""
+msgstr "پسوند فایل طرح ناشناخته: {0}"
#: Platform.java:168
msgid ""
@@ -2320,7 +2322,7 @@ msgstr ""
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/DropdownUpdatableLibrariesItem.java:27
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/DropdownUpdatableCoresItem.java:27
msgid "Updatable"
-msgstr ""
+msgstr "قابل به روز رسانی"
#: UpdateCheck.java:111
msgid "Update"
@@ -2333,7 +2335,7 @@ msgstr ""
#: ../../../../../app/src/cc/arduino/contributions/ContributionsSelfCheck.java:88
#, java-format
msgid "Updates available for some of your {0}boards{1}"
-msgstr ""
+msgstr "به روز رسانی ها برای برخی از {0}بوردها{1} شما موجود هستند"
#: ../../../../../app/src/cc/arduino/contributions/ContributionsSelfCheck.java:90
#, java-format
@@ -2347,7 +2349,7 @@ msgstr ""
#: ../../../cc/arduino/contributions/libraries/LibraryInstaller.java:167
msgid "Updating list of installed libraries"
-msgstr ""
+msgstr "درحال به روز رسانی کردن لیستی از کتابخانه های نصب شده"
#: EditorToolbar.java:41 Editor.java:545
msgid "Upload"
@@ -2355,11 +2357,11 @@ msgstr "آپلود"
#: EditorToolbar.java:46 Editor.java:553
msgid "Upload Using Programmer"
-msgstr ""
+msgstr "آپلود با استفاده از پروگرامر"
#: ../../../../../app//src/processing/app/Editor.java:2814
msgid "Upload any sketch to obtain it"
-msgstr ""
+msgstr "هر طرحی را آپلود کنید تا به دست آورید"
#: Editor.java:2403 Editor.java:2439
msgid "Upload canceled."
@@ -2371,7 +2373,7 @@ msgstr "آپلود کنسل شد"
#: Editor.java:2378
msgid "Uploading to I/O Board..."
-msgstr ""
+msgstr "درحال آپلود کردن به بورد I/O"
#: Sketch.java:1622
msgid "Uploading..."
@@ -2427,21 +2429,21 @@ msgstr ""
#: ../../../../../app/src/processing/app/Base.java:454
msgid "Verifying..."
-msgstr ""
+msgstr "درحال بازبینی کردن..."
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCell.java:328
#, java-format
msgid "Version {0}"
-msgstr ""
+msgstr "نسخه {0} "
#: ../../../../../app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCell.java:326
msgid "Version unknown"
-msgstr ""
+msgstr "نسخه نامشخص"
#: ../../../cc/arduino/contributions/libraries/ContributedLibrary.java:97
#, java-format
msgid "Version {0}"
-msgstr ""
+msgstr "نسخه {0}"
#: ../../../processing/app/Preferences.java:154
msgid "Vietnamese"
@@ -2470,7 +2472,7 @@ msgstr ""
#: Base.java:2128
msgid "Warning"
-msgstr "اخطار"
+msgstr "هشدار"
#: ../../../processing/app/debug/Compiler.java:1295
msgid ""
@@ -2674,12 +2676,12 @@ msgstr ""
#: UpdateCheck.java:53
msgid "http://www.arduino.cc/latest.txt"
-msgstr ""
+msgstr "http://www.arduino.cc/latest.txt"
#: Preferences.java:625
#, java-format
msgid "ignoring invalid font size {0}"
-msgstr ""
+msgstr "صرف نظر کردن اندازه متن نامعتبر {0}"
#: Editor.java:936 Editor.java:943
msgid "name is null"
@@ -2689,7 +2691,7 @@ msgstr ""
#: ../../../../../arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java:227
#, java-format
msgid "no headers files (.h) found in {0}"
-msgstr ""
+msgstr "فایل سر تیتر (h.) پیدا نشد در {0}"
#: Editor.java:932
msgid "serialMenu is null"
@@ -2704,7 +2706,7 @@ msgstr "پورت سریال {0} وجود ندارد یا این که بورد ش
#: ../../../processing/app/Base.java:389
#, java-format
msgid "unknown option: {0}"
-msgstr ""
+msgstr "گزینه نامشخص: {0}"
#: Preferences.java:391
msgid "upload"
@@ -2713,18 +2715,18 @@ msgstr "آپلود"
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCell.java:324
#, java-format
msgid "version {0}"
-msgstr ""
+msgstr "نسخه {0}"
#: ../../../../../app/src/processing/app/Editor.java:2243
#, java-format
msgid "{0} - {1} | Arduino {2}"
-msgstr ""
+msgstr "{0} - {1} | آردوئینو {2}"
#: ../../../cc/arduino/contributions/SignatureVerificationFailedException.java:39
#: ../../../cc/arduino/contributions/SignatureVerificationFailedException.java:43
#, java-format
msgid "{0} file signature verification failed"
-msgstr ""
+msgstr "{0} تائیدیه امضا فایل شکست خورد"
#: ../../../cc/arduino/contributions/packages/ContributionInstaller.java:310
#, java-format
@@ -2759,12 +2761,12 @@ msgstr ""
#: debug/Compiler.java:365
#, java-format
msgid "{0} returned {1}"
-msgstr ""
+msgstr "{0} بازگشته {1}"
#: Editor.java:2213
#, java-format
msgid "{0} | Arduino {1}"
-msgstr ""
+msgstr "{0} | آردوئینو {1}"
#: ../../../processing/app/Base.java:519
#, java-format
@@ -2781,7 +2783,7 @@ msgstr ""
#: ../../../processing/app/Base.java:507
#, java-format
msgid "{0}: Invalid option for board \"{1}\""
-msgstr ""
+msgstr "{0}: گزینه نامعتبر برای بورد \"{1}\""
#: ../../../processing/app/Base.java:502
#, java-format
@@ -2791,24 +2793,24 @@ msgstr ""
#: ../../../../../arduino-core/src/processing/app/helpers/CommandlineParser.java:268
#, java-format
msgid "{0}: Invalid value for option \"{1}\" for board \"{2}\""
-msgstr ""
+msgstr "{0}:مقدار نامعتبر برای گزینه \"{1}\" برای بورد \"{2}\""
#: ../../../processing/app/Base.java:486
#, java-format
msgid "{0}: Unknown architecture"
-msgstr ""
+msgstr "معماری نامشخص :{0}"
#: ../../../processing/app/Base.java:491
#, java-format
msgid "{0}: Unknown board"
-msgstr ""
+msgstr "بورد نامشخص :{0}"
#: ../../../processing/app/Base.java:481
#, java-format
msgid "{0}: Unknown package"
-msgstr ""
+msgstr "بسته نامشخص :{0}"
#: ../../../../../arduino-core/src/processing/app/Platform.java:223
#, java-format
msgid "{0}Install this package{1} to use your {2} board"
-msgstr ""
+msgstr "{0}این بسته را نصب کنید{1} تا از بورد {2} استفاده نمایید"
diff --git a/arduino-core/src/processing/app/i18n/Resources_fa_IR.properties b/arduino-core/src/processing/app/i18n/Resources_fa_IR.properties
index 848c6cd82c5..e642fa7bb79 100644
--- a/arduino-core/src/processing/app/i18n/Resources_fa_IR.properties
+++ b/arduino-core/src/processing/app/i18n/Resources_fa_IR.properties
@@ -21,8 +21,10 @@
# Translators:
# Translators:
# Ali Mirjamali , 2013
+# Hoseinali Shobeiri , 2020-2021
+# Hoseinali Shobeiri , 2020
# Seyyed Mohammad Amin Mousavi , 2017
-!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2018-11-23 15\:06+0000\nLast-Translator\: Cristian Maglie \nLanguage-Team\: Persian (Iran) (http\://www.transifex.com/mbanzi/arduino-ide-15/language/fa_IR/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fa_IR\nPlural-Forms\: nplurals\=2; plural\=(n > 1);\n
+!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2021-10-08 15\:21+0000\nLast-Translator\: Hoseinali Shobeiri \nLanguage-Team\: Persian (Iran) (http\://www.transifex.com/mbanzi/arduino-ide-15/language/fa_IR/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fa_IR\nPlural-Forms\: nplurals\=2; plural\=(n > 1);\n
#: Preferences.java:358 Preferences.java:374
\ \ (requires\ restart\ of\ Arduino)=(\u0622\u0631\u062f\u0648\u06cc\u0646\u0648 \u0628\u0627\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0645\u062c\u062f\u062f \u0634\u0648\u062f)
@@ -57,80 +59,80 @@
--verbose,\ --verbose-upload\ and\ --verbose-build\ can\ only\ be\ used\ together\ with\ --verify\ or\ --upload=--verbose,--verbose-upload , --verbose-build\n\u062a\u0646\u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0627 \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u0648 \u0628\u0627 \n--verify\n\u06cc\u0627 \n--upload\n\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u0646\u062f
#: Sketch.java:746
-!.pde\ ->\ .ino=
+.pde\ ->\ .ino=.PDE -> .INO
#: Editor.java:2053
!\ \ \ Do\ you\ want\ to\ save\ changes\ to\ this\ sketch