Skip to content

Commit 2bc8ebf

Browse files
committed
formatting fixes
1 parent aabb0f9 commit 2bc8ebf

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

java/src/processing/mode/java/JavaEditor.java

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,36 +2029,28 @@ protected void autoSave() {
20292029
try {
20302030
if (sketch.isModified() && !sketch.isUntitled()) {
20312031
if (JavaMode.autoSavePromptEnabled) {
2032-
final JDialog autoSaveDialog = new JDialog(
2033-
base.getActiveEditor(), this.getSketch().getName(),
2034-
true);
2032+
final JDialog autoSaveDialog =
2033+
new JDialog(base.getActiveEditor(), getSketch().getName(), true);
20352034
Container container = autoSaveDialog.getContentPane();
20362035

20372036
JPanel panelMain = new JPanel();
2038-
panelMain.setBorder(BorderFactory.createEmptyBorder(4, 0,
2039-
2, 2));
2040-
panelMain.setLayout(new BoxLayout(panelMain,
2041-
BoxLayout.PAGE_AXIS));
2042-
2043-
JPanel panelLabel = new JPanel(new FlowLayout(
2044-
FlowLayout.LEFT));
2045-
JLabel label = new JLabel(
2046-
"<html><body>&nbsp;There are unsaved"
2037+
panelMain.setBorder(BorderFactory.createEmptyBorder(4, 0, 2, 2));
2038+
panelMain.setLayout(new BoxLayout(panelMain, BoxLayout.PAGE_AXIS));
2039+
2040+
JPanel panelLabel = new JPanel(new FlowLayout(FlowLayout.LEFT));
2041+
JLabel label = new JLabel("<html><body>&nbsp;There are unsaved"
20472042
+ " changes in your sketch.<br />"
20482043
+ "&nbsp;&nbsp;&nbsp; Do you want to save it before"
20492044
+ " running? </body></html>");
20502045
label.setFont(new Font(label.getFont().getName(),
20512046
Font.PLAIN, label.getFont().getSize() + 1));
20522047
panelLabel.add(label);
20532048
panelMain.add(panelLabel);
2054-
final JCheckBox dontRedisplay = new JCheckBox(
2055-
"Remember this decision");
2049+
final JCheckBox dontRedisplay = new JCheckBox("Remember this decision");
2050+
JPanel panelButtons = new JPanel(new FlowLayout(FlowLayout.CENTER, 8, 2));
20562051

2057-
JPanel panelButtons = new JPanel(new FlowLayout(
2058-
FlowLayout.CENTER, 8, 2));
20592052
JButton btnRunSave = new JButton("Save and Run");
20602053
btnRunSave.addActionListener(new ActionListener() {
2061-
20622054
@Override
20632055
public void actionPerformed(ActionEvent e) {
20642056
handleSave(true);
@@ -2071,9 +2063,9 @@ public void actionPerformed(ActionEvent e) {
20712063
}
20722064
});
20732065
panelButtons.add(btnRunSave);
2066+
20742067
JButton btnRunNoSave = new JButton("Run, Don't Save");
20752068
btnRunNoSave.addActionListener(new ActionListener() {
2076-
20772069
@Override
20782070
public void actionPerformed(ActionEvent e) {
20792071
if (dontRedisplay.isSelected()) {
@@ -2088,8 +2080,7 @@ public void actionPerformed(ActionEvent e) {
20882080
panelMain.add(panelButtons);
20892081

20902082
JPanel panelCheck = new JPanel();
2091-
panelCheck
2092-
.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
2083+
panelCheck.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
20932084
panelCheck.add(dontRedisplay);
20942085
panelMain.add(panelCheck);
20952086

@@ -2107,7 +2098,6 @@ public void actionPerformed(ActionEvent e) {
21072098
} catch (Exception e) {
21082099
statusError(e);
21092100
}
2110-
21112101
}
21122102

21132103

0 commit comments

Comments
 (0)