refactor: fix several issues reported by sonar

This commit is contained in:
Skylot
2020-01-15 18:26:17 +03:00
parent 1047e751e6
commit 5e7388f686
5 changed files with 12 additions and 21 deletions
@@ -40,7 +40,6 @@ class SearchBar extends JToolBar {
private final JCheckBox wholeWordCB;
private final JCheckBox matchCaseCB;
private ActionListener forwardListener = e -> search(0);
public SearchBar(RSyntaxTextArea textArea) {
rTextArea = textArea;
@@ -81,6 +80,8 @@ class SearchBar extends JToolBar {
nextButton.setBorderPainted(false);
add(nextButton);
ActionListener forwardListener = e -> search(0);
markAllCB = new JCheckBox(NLS.str("search.mark_all"));
markAllCB.addActionListener(forwardListener);
add(markAllCB);
@@ -17,4 +17,7 @@ public class SystemInfo {
public static final boolean IS_WINDOWS = LOWER_OS_NAME.startsWith("windows");
public static final boolean IS_MAC = LOWER_OS_NAME.startsWith("mac");
public static final boolean IS_LINUX = LOWER_OS_NAME.startsWith("linux");
private SystemInfo() {
}
}