mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Added link to unofficial boards support url in secondary modal. Fixes #3327
First java 8 syntax goodness: yum!
This commit is contained in:
parent
ad8046dab5
commit
d2ac1a4e6a
@ -33,15 +33,18 @@
|
|||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="0" pref="332" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
<Component id="ok" min="-2" max="-2" attributes="0"/>
|
<Component id="ok" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="cancel" min="-2" max="-2" attributes="0"/>
|
<Component id="cancel" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
|
<Component id="jScrollPane1" alignment="0" pref="538" max="32767" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="unofficialListURLLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
@ -55,13 +58,15 @@
|
|||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane1" pref="118" max="32767" attributes="0"/>
|
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="unofficialListURLLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="cancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="ok" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="ok" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="cancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -127,5 +132,20 @@
|
|||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="unofficialListURLLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
|
<Connection code="_("Click for a list of unofficial boards support URLs")" type="code"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||||
|
<Color id="Cursore mano"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="unofficialListURLLabelMouseClicked"/>
|
||||||
|
<EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="unofficialListURLLabelMouseExited"/>
|
||||||
|
<EventHandler event="mouseEntered" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="unofficialListURLLabelMouseEntered"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -29,9 +29,7 @@
|
|||||||
|
|
||||||
package cc.arduino.view.preferences;
|
package cc.arduino.view.preferences;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.base.Predicate;
|
|
||||||
import com.google.common.collect.FluentIterable;
|
import com.google.common.collect.FluentIterable;
|
||||||
import processing.app.Base;
|
import processing.app.Base;
|
||||||
|
|
||||||
@ -53,13 +51,7 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
initComponents();
|
initComponents();
|
||||||
setLocationRelativeTo(parent);
|
setLocationRelativeTo(parent);
|
||||||
|
|
||||||
Base.registerWindowCloseKeys(getRootPane(), new ActionListener() {
|
Base.registerWindowCloseKeys(getRootPane(), this::cancelActionPerformed);
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
cancelActionPerformed(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +67,7 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
javax.swing.JButton cancel = new javax.swing.JButton();
|
javax.swing.JButton cancel = new javax.swing.JButton();
|
||||||
javax.swing.JButton ok = new javax.swing.JButton();
|
javax.swing.JButton ok = new javax.swing.JButton();
|
||||||
javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
|
javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
|
||||||
|
unofficialListURLLabel = new javax.swing.JLabel();
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
setTitle(_("Additional Boards Manager URLs"));
|
setTitle(_("Additional Boards Manager URLs"));
|
||||||
@ -102,6 +95,22 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
|
|
||||||
jLabel1.setText(_("Enter additional URLs, one for each row"));
|
jLabel1.setText(_("Enter additional URLs, one for each row"));
|
||||||
|
|
||||||
|
unofficialListURLLabel.setText(_("Click for a list of unofficial boards support URLs"));
|
||||||
|
unofficialListURLLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
|
||||||
|
unofficialListURLLabel.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||||
|
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||||
|
unofficialListURLLabelMouseClicked(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void mouseExited(java.awt.event.MouseEvent evt) {
|
||||||
|
unofficialListURLLabelMouseExited(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void mouseEntered(java.awt.event.MouseEvent evt) {
|
||||||
|
unofficialListURLLabelMouseEntered(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
@ -110,13 +119,15 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addGap(0, 332, Short.MAX_VALUE)
|
.addGap(0, 0, Short.MAX_VALUE)
|
||||||
.addComponent(ok)
|
.addComponent(ok)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(cancel))
|
.addComponent(cancel))
|
||||||
.addComponent(jScrollPane1)
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
|
.addComponent(unofficialListURLLabel))
|
||||||
.addGap(0, 0, Short.MAX_VALUE)))
|
.addGap(0, 0, Short.MAX_VALUE)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
@ -126,12 +137,14 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE)
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(unofficialListURLLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(cancel)
|
.addComponent(ok)
|
||||||
.addComponent(ok))
|
.addComponent(cancel))
|
||||||
.addContainerGap())
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
@ -147,6 +160,18 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
cancelActionPerformed(evt);
|
cancelActionPerformed(evt);
|
||||||
}//GEN-LAST:event_okActionPerformed
|
}//GEN-LAST:event_okActionPerformed
|
||||||
|
|
||||||
|
private void unofficialListURLLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_unofficialListURLLabelMouseEntered
|
||||||
|
unofficialListURLLabel.setForeground(new Color(0, 0, 140));
|
||||||
|
}//GEN-LAST:event_unofficialListURLLabelMouseEntered
|
||||||
|
|
||||||
|
private void unofficialListURLLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_unofficialListURLLabelMouseExited
|
||||||
|
unofficialListURLLabel.setForeground(new Color(76, 76, 76));
|
||||||
|
}//GEN-LAST:event_unofficialListURLLabelMouseExited
|
||||||
|
|
||||||
|
private void unofficialListURLLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_unofficialListURLLabelMouseClicked
|
||||||
|
Base.openURL("https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls");
|
||||||
|
}//GEN-LAST:event_unofficialListURLLabelMouseClicked
|
||||||
|
|
||||||
public void setText(String text) {
|
public void setText(String text) {
|
||||||
Collection<String> urls = splitAndTrim(text, ",");
|
Collection<String> urls = splitAndTrim(text, ",");
|
||||||
additionalBoardsManagerURLs.setText(Joiner.on("\n").skipNulls().join(urls));
|
additionalBoardsManagerURLs.setText(Joiner.on("\n").skipNulls().join(urls));
|
||||||
@ -154,17 +179,7 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
|
|
||||||
private Collection<String> splitAndTrim(String text, String separator) {
|
private Collection<String> splitAndTrim(String text, String separator) {
|
||||||
Collection<String> urls = Arrays.asList(text.split(separator));
|
Collection<String> urls = Arrays.asList(text.split(separator));
|
||||||
return FluentIterable.from(urls).transform(new Function<String, String>() {
|
return FluentIterable.from(urls).transform(String::trim).filter(url -> !url.isEmpty()).toList();
|
||||||
@Override
|
|
||||||
public String apply(String input) {
|
|
||||||
return input.trim();
|
|
||||||
}
|
|
||||||
}).filter(new Predicate<String>() {
|
|
||||||
@Override
|
|
||||||
public boolean apply(String input) {
|
|
||||||
return !input.isEmpty();
|
|
||||||
}
|
|
||||||
}).toList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getText() {
|
public String getText() {
|
||||||
@ -174,6 +189,7 @@ public class AdditionalBoardsManagerURLTextArea extends javax.swing.JDialog {
|
|||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private final javax.swing.JTextArea additionalBoardsManagerURLs = new javax.swing.JTextArea();
|
private final javax.swing.JTextArea additionalBoardsManagerURLs = new javax.swing.JTextArea();
|
||||||
|
private javax.swing.JLabel unofficialListURLLabel;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
public void onOk(ActionListener listener) {
|
public void onOk(ActionListener listener) {
|
||||||
|
@ -323,6 +323,9 @@
|
|||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
<Connection code="PreferencesData.getPreferencesFile().getAbsolutePath()" type="code"/>
|
<Connection code="PreferencesData.getPreferencesFile().getAbsolutePath()" type="code"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||||
|
<Color id="Cursore mano"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
<Events>
|
||||||
<EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="preferencesFileLabelMousePressed"/>
|
<EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="preferencesFileLabelMousePressed"/>
|
||||||
|
@ -29,14 +29,15 @@
|
|||||||
|
|
||||||
package cc.arduino.view.preferences;
|
package cc.arduino.view.preferences;
|
||||||
|
|
||||||
import processing.app.*;
|
import processing.app.Base;
|
||||||
|
import processing.app.BaseNoGui;
|
||||||
|
import processing.app.I18n;
|
||||||
|
import processing.app.PreferencesData;
|
||||||
import processing.app.helpers.FileUtils;
|
import processing.app.helpers.FileUtils;
|
||||||
import processing.app.legacy.PApplet;
|
import processing.app.legacy.PApplet;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
@ -188,12 +189,7 @@ public class Preferences extends javax.swing.JDialog {
|
|||||||
|
|
||||||
initComponents();
|
initComponents();
|
||||||
|
|
||||||
Base.registerWindowCloseKeys(getRootPane(), new ActionListener() {
|
Base.registerWindowCloseKeys(getRootPane(), this::cancelButtonActionPerformed);
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
cancelButtonActionPerformed(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
showPrerefencesData();
|
showPrerefencesData();
|
||||||
}
|
}
|
||||||
@ -286,6 +282,7 @@ public class Preferences extends javax.swing.JDialog {
|
|||||||
morePreferencesLabel.setText(_("More preferences can be edited directly in the file"));
|
morePreferencesLabel.setText(_("More preferences can be edited directly in the file"));
|
||||||
|
|
||||||
preferencesFileLabel.setText(PreferencesData.getPreferencesFile().getAbsolutePath());
|
preferencesFileLabel.setText(PreferencesData.getPreferencesFile().getAbsolutePath());
|
||||||
|
preferencesFileLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
|
||||||
preferencesFileLabel.addMouseListener(new java.awt.event.MouseAdapter() {
|
preferencesFileLabel.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||||
public void mousePressed(java.awt.event.MouseEvent evt) {
|
public void mousePressed(java.awt.event.MouseEvent evt) {
|
||||||
preferencesFileLabelMousePressed(evt);
|
preferencesFileLabelMousePressed(evt);
|
||||||
@ -461,12 +458,7 @@ public class Preferences extends javax.swing.JDialog {
|
|||||||
private void extendedAdditionalUrlFieldWindowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_extendedAdditionalUrlFieldWindowActionPerformed
|
private void extendedAdditionalUrlFieldWindowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_extendedAdditionalUrlFieldWindowActionPerformed
|
||||||
final AdditionalBoardsManagerURLTextArea additionalBoardsManagerURLTextArea = new AdditionalBoardsManagerURLTextArea(this);
|
final AdditionalBoardsManagerURLTextArea additionalBoardsManagerURLTextArea = new AdditionalBoardsManagerURLTextArea(this);
|
||||||
additionalBoardsManagerURLTextArea.setText(additionalBoardsManagerField.getText());
|
additionalBoardsManagerURLTextArea.setText(additionalBoardsManagerField.getText());
|
||||||
additionalBoardsManagerURLTextArea.onOk(new ActionListener() {
|
additionalBoardsManagerURLTextArea.onOk(e -> additionalBoardsManagerField.setText(additionalBoardsManagerURLTextArea.getText()));
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
additionalBoardsManagerField.setText(additionalBoardsManagerURLTextArea.getText());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
additionalBoardsManagerURLTextArea.setVisible(true);
|
additionalBoardsManagerURLTextArea.setVisible(true);
|
||||||
}//GEN-LAST:event_extendedAdditionalUrlFieldWindowActionPerformed
|
}//GEN-LAST:event_extendedAdditionalUrlFieldWindowActionPerformed
|
||||||
|
|
||||||
@ -479,7 +471,7 @@ public class Preferences extends javax.swing.JDialog {
|
|||||||
}//GEN-LAST:event_preferencesFileLabelMousePressed
|
}//GEN-LAST:event_preferencesFileLabelMousePressed
|
||||||
|
|
||||||
private void preferencesFileLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_preferencesFileLabelMouseExited
|
private void preferencesFileLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_preferencesFileLabelMouseExited
|
||||||
preferencesFileLabel.setForeground(Color.BLACK);
|
preferencesFileLabel.setForeground(new Color(76, 76, 76));
|
||||||
}//GEN-LAST:event_preferencesFileLabelMouseExited
|
}//GEN-LAST:event_preferencesFileLabelMouseExited
|
||||||
|
|
||||||
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
||||||
@ -494,9 +486,7 @@ public class Preferences extends javax.swing.JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
savePreferencesData();
|
savePreferencesData();
|
||||||
for (Editor editor : base.getEditors()) {
|
base.getEditors().forEach(processing.app.Editor::applyPreferences);
|
||||||
editor.applyPreferences();
|
|
||||||
}
|
|
||||||
cancelButtonActionPerformed(evt);
|
cancelButtonActionPerformed(evt);
|
||||||
}//GEN-LAST:event_okButtonActionPerformed
|
}//GEN-LAST:event_okButtonActionPerformed
|
||||||
|
|
||||||
@ -519,7 +509,7 @@ public class Preferences extends javax.swing.JDialog {
|
|||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
private java.util.List<String> validateData() {
|
private java.util.List<String> validateData() {
|
||||||
java.util.List<String> errors = new LinkedList<String>();
|
java.util.List<String> errors = new LinkedList<>();
|
||||||
if (FileUtils.isSubDirectory(new File(sketchbookLocationField.getText()), new File(PreferencesData.get("runtime.ide.path")))) {
|
if (FileUtils.isSubDirectory(new File(sketchbookLocationField.getText()), new File(PreferencesData.get("runtime.ide.path")))) {
|
||||||
errors.add(_("The specified sketchbook folder contains your copy of the IDE.\nPlease choose a different folder for your sketchbook."));
|
errors.add(_("The specified sketchbook folder contains your copy of the IDE.\nPlease choose a different folder for your sketchbook."));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user