Skip to content

Commit d246ca0

Browse files
committed
Added test for "Decrease Indent with 1 char on the last line"
See #1271
1 parent 5e17ae8 commit d246ca0

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

app/src/processing/app/Editor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,7 @@ public void actionPerformed(ActionEvent e) {
12341234
menu.add(item);
12351235

12361236
item = newJMenuItem(_("Decrease Indent"), '[');
1237+
item.setName("menuDecreaseIndent");
12371238
item.addActionListener(new ActionListener() {
12381239
public void actionPerformed(ActionEvent e) {
12391240
handleIndentOutdent(false);

app/test/processing/app/helpers/JEditTextAreaComponentDriver.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,15 @@ protected String executeInEDT() {
4040

4141
});
4242
}
43+
44+
public JEditTextArea selectAll(final JEditTextArea target) {
45+
return GuiActionRunner.execute(new GuiQuery<JEditTextArea>() {
46+
47+
protected JEditTextArea executeInEDT() {
48+
target.selectAll();
49+
return target;
50+
}
51+
52+
});
53+
}
4354
}

app/test/processing/app/helpers/JEditTextAreaFixture.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
import org.fest.swing.core.Robot;
44
import org.fest.swing.fixture.ComponentFixture;
5-
import processing.app.syntax.JEditTextArea;
65

7-
import java.awt.*;
6+
import processing.app.syntax.JEditTextArea;
87

98
public class JEditTextAreaFixture extends ComponentFixture {
109

@@ -38,4 +37,9 @@ public JEditTextAreaFixture setText(String text) {
3837
public String getText() {
3938
return driver.getText((JEditTextArea) target);
4039
}
40+
41+
public JEditTextAreaFixture selectAll() {
42+
driver.selectAll((JEditTextArea) target);
43+
return this;
44+
}
4145
}

build/shared/revisions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ARDUINO 1.5.3 BETA
33

44
[ide]
55
* Removed useless baud rates from serial monitor
6+
* Fixed some minor IDE UI bugs (Shigeru Kanemoto)
67

78
[arduino core]
89
* sam: Fixed delayMicrosecond() when interrupts are disabled

0 commit comments

Comments
 (0)