mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-31 20:52:13 +01:00
Trim trailing spaces from Editor.java
This commit is contained in:
parent
bafd66ba4f
commit
4a80f50d28
@ -158,7 +158,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
|
|
||||||
static volatile AbstractMonitor serialMonitor;
|
static volatile AbstractMonitor serialMonitor;
|
||||||
static AbstractMonitor serialPlotter;
|
static AbstractMonitor serialPlotter;
|
||||||
|
|
||||||
final EditorHeader header;
|
final EditorHeader header;
|
||||||
EditorStatus status;
|
EditorStatus status;
|
||||||
EditorConsole console;
|
EditorConsole console;
|
||||||
@ -248,7 +248,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
|
|
||||||
//PdeKeywords keywords = new PdeKeywords();
|
//PdeKeywords keywords = new PdeKeywords();
|
||||||
//sketchbook = new Sketchbook(this);
|
//sketchbook = new Sketchbook(this);
|
||||||
|
|
||||||
buildMenuBar();
|
buildMenuBar();
|
||||||
|
|
||||||
// For rev 0120, placing things inside a JPanel
|
// For rev 0120, placing things inside a JPanel
|
||||||
@ -399,8 +399,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
statusNotice(tr("One file added to the sketch."));
|
statusNotice(tr("One file added to the sketch."));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
statusNotice(
|
statusNotice(I18n.format(tr("{0} files added to the sketch."), successful));
|
||||||
I18n.format(tr("{0} files added to the sketch."), successful));
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -948,14 +947,14 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
} finally {
|
} finally {
|
||||||
if (zipFile != null) {
|
if (zipFile != null) {
|
||||||
try {
|
try {
|
||||||
zipFile.close();
|
zipFile.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// noop
|
// noop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateKeywords(PdeKeywords keywords) {
|
public void updateKeywords(PdeKeywords keywords) {
|
||||||
for (EditorTab tab : tabs)
|
for (EditorTab tab : tabs)
|
||||||
@ -2097,18 +2096,19 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
names[i] = portMenu.getItem(i).getText();
|
names[i] = portMenu.getItem(i).getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: This is horribly unreadable
|
||||||
String result = (String)
|
String result = (String)
|
||||||
JOptionPane.showInputDialog(this,
|
JOptionPane.showInputDialog(this,
|
||||||
I18n.format(
|
I18n.format(
|
||||||
tr("Serial port {0} not found.\n" +
|
tr("Serial port {0} not found.\n" +
|
||||||
"Retry the upload with another serial port?"),
|
"Retry the upload with another serial port?"),
|
||||||
PreferencesData.get("serial.port")
|
PreferencesData.get("serial.port")
|
||||||
),
|
),
|
||||||
"Serial port not found",
|
"Serial port not found",
|
||||||
JOptionPane.PLAIN_MESSAGE,
|
JOptionPane.PLAIN_MESSAGE,
|
||||||
null,
|
null,
|
||||||
names,
|
names,
|
||||||
0);
|
0);
|
||||||
if (result == null) return false;
|
if (result == null) return false;
|
||||||
selectSerialPort(result);
|
selectSerialPort(result);
|
||||||
base.onBoardOrPortChange();
|
base.onBoardOrPortChange();
|
||||||
@ -2322,7 +2322,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serialMonitor != null) {
|
if (serialMonitor != null) {
|
||||||
// The serial monitor already exists
|
// The serial monitor already exists
|
||||||
|
|
||||||
@ -2352,14 +2352,14 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
serialMonitor = new MonitorFactory().newMonitor(port);
|
serialMonitor = new MonitorFactory().newMonitor(port);
|
||||||
|
|
||||||
if (serialMonitor == null) {
|
if (serialMonitor == null) {
|
||||||
String board = port.getPrefs().get("board");
|
String board = port.getPrefs().get("board");
|
||||||
String boardName = BaseNoGui.getPlatform().resolveDeviceByBoardID(BaseNoGui.packages, board);
|
String boardName = BaseNoGui.getPlatform().resolveDeviceByBoardID(BaseNoGui.packages, board);
|
||||||
statusError(I18n.format(tr("Serial monitor is not supported on network ports such as {0} for the {1} in this release"), PreferencesData.get("serial.port"), boardName));
|
statusError(I18n.format(tr("Serial monitor is not supported on network ports such as {0} for the {1} in this release"), PreferencesData.get("serial.port"), boardName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Base.setIcon(serialMonitor);
|
Base.setIcon(serialMonitor);
|
||||||
|
|
||||||
// If currently uploading, disable the monitor (it will be later
|
// If currently uploading, disable the monitor (it will be later
|
||||||
@ -2419,7 +2419,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
} while (serialMonitor.requiresAuthorization() && !success);
|
} while (serialMonitor.requiresAuthorization() && !success);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handlePlotter() {
|
public void handlePlotter() {
|
||||||
if(serialMonitor != null) {
|
if(serialMonitor != null) {
|
||||||
if(serialMonitor.isClosed()) {
|
if(serialMonitor.isClosed()) {
|
||||||
@ -2429,7 +2429,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serialPlotter != null) {
|
if (serialPlotter != null) {
|
||||||
// The serial plotter already exists
|
// The serial plotter already exists
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user