Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit ec619fe

Browse files
geofjamgmathbagu
authored andcommitted
Add EmptyLineSeparator checkstyle rule
1 parent d7b21e1 commit ec619fe

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

Diff for: checkstyle.xml

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
<module name="EmptyCatchBlock">
2828
<property name="exceptionVariableName" value="ignored"/>
2929
</module>
30+
<module name="EmptyLineSeparator">
31+
<property name="allowNoEmptyLineBetweenFields" value="true"/>
32+
<property name="allowMultipleEmptyLines" value="false"/>
33+
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
34+
<property name="tokens" value="IMPORT, CLASS_DEF, INTERFACE_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
35+
</module>
3036
<module name="EmptyStatement"/>
3137
<module name="EqualsHashCode"/>
3238
<module name="FinalClass"/>

Diff for: gse-app/src/main/java/com/powsybl/gse/app/ProjectPane.java

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ public static class MyTab extends Tab {
9191

9292
private final KeyCombination closeAllKeyCombination = new KeyCodeCombination(KeyCode.W, KeyCombination.CONTROL_DOWN, KeyCombination.SHIFT_DOWN);
9393

94-
9594
public MyTab(String text, ProjectFileViewer viewer) {
9695
super(text, viewer.getContent());
9796
this.viewer = viewer;

Diff for: gse-util/src/main/java/com/powsybl/gse/util/DragAndDropMove.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
import javafx.scene.control.TreeItem;
1010

1111
public class DragAndDropMove {
12+
1213
private Object source;
13-
private TreeItem sourceTreeItem;
1414

15+
private TreeItem sourceTreeItem;
1516

1617
public Object getSource() {
1718
return source;

Diff for: gse-util/src/main/java/com/powsybl/gse/util/NodeChooser.java

-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public class NodeChooser<N, F extends N, D extends N, T extends N> extends GridP
4949
private Set<String> openedProjects = new HashSet<>();
5050
private SimpleBooleanProperty deleteMenuItemDisableProperty = new SimpleBooleanProperty(false);
5151

52-
5352
public interface TreeModel<N, F, D> {
5453
Collection<N> getChildren(D folder);
5554

@@ -396,7 +395,6 @@ private void refresh(TreeItem<N> item) {
396395
}
397396
}
398397

399-
400398
private void onMouseClickedEvent(MouseEvent event) {
401399
TreeItem<N> item = tree.getSelectionModel().getSelectedItem();
402400
N node = item != null ? item.getValue() : null;

Diff for: gse-util/src/main/java/com/powsybl/gse/util/SearchBar.java

-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ public SearchBar(Searchable textArea) {
171171
setMargin(searchField, new Insets(0, 0, 0, 5));
172172
setMargin(closeButton, new Insets(0, 5, 0, 0));
173173

174-
175174
searchField.textProperty().addListener((observable, oldValue, newValue) -> {
176175
if (newValue == null || "".equals(newValue)) {
177176
matcher.reset();
@@ -193,7 +192,6 @@ public SearchBar(Searchable textArea) {
193192
}
194193
});
195194

196-
197195
matcher.nbMatchesProperty().addListener((observable, oldValue, newValue) -> {
198196
if (newValue.intValue() == 0) {
199197
textArea.deselect();

0 commit comments

Comments
 (0)