diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompleteDescWindow.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompleteDescWindow.java index ad29a6a..620a213 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompleteDescWindow.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompleteDescWindow.java @@ -553,7 +553,7 @@ public String toString() { /** * Action that actually updates the summary text displayed. */ - private class TimerAction extends AbstractAction { + private final class TimerAction extends AbstractAction { private Completion completion; private String anchor; diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java index 68c4b52..5653c82 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java @@ -1437,7 +1437,7 @@ else if (oldTriggerAction != null) { * Listens for LookAndFeel changes and updates the various popup windows * involved in auto-completion accordingly. */ - private class LookAndFeelChangeListener implements PropertyChangeListener { + private final class LookAndFeelChangeListener implements PropertyChangeListener { @Override public void propertyChange(PropertyChangeEvent e) { @@ -1486,7 +1486,7 @@ public void actionPerformed(ActionEvent e) { * Listens for events in the parent window of the text component with * auto-completion enabled. */ - private class ParentWindowListener extends ComponentAdapter implements + private final class ParentWindowListener extends ComponentAdapter implements WindowFocusListener { public void addTo(Window w) { @@ -1530,7 +1530,7 @@ public void windowLostFocus(WindowEvent e) { /** * Listens for events from the popup window. */ - private class PopupWindowListener extends ComponentAdapter { + private final class PopupWindowListener extends ComponentAdapter { @Override public void componentHidden(ComponentEvent e) { @@ -1558,7 +1558,7 @@ public void uninstall(AutoCompletePopupWindow popupWindow) { /** * Listens for events from the text component we're installed on. */ - private class TextComponentListener extends FocusAdapter implements + private final class TextComponentListener extends FocusAdapter implements HierarchyListener { void addTo(JTextComponent tc) { diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/ParameterizedCompletionContext.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/ParameterizedCompletionContext.java index ad8c0ca..0671a52 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/ParameterizedCompletionContext.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/ParameterizedCompletionContext.java @@ -867,7 +867,7 @@ public void updateUI() { /** * Called when the user presses Enter while entering parameters. */ - private class GotoEndAction extends AbstractAction { + private final class GotoEndAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { @@ -912,7 +912,7 @@ private Action getDefaultEnterAction(JTextComponent tc) { * Called when the user types the character marking the closing of the * parameter list, such as ')'. */ - private class ClosingAction extends AbstractAction { + private final class ClosingAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { @@ -969,7 +969,7 @@ public int getCount(String text, char ch) { /** * Action performed when the user hits the escape key. */ - private class HideAction extends AbstractAction { + private final class HideAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { @@ -993,7 +993,7 @@ public void actionPerformed(ActionEvent e) { * Listens for various events in the text component while this tool tip * is visible. */ - private class Listener implements FocusListener, CaretListener, + private final class Listener implements FocusListener, CaretListener, DocumentListener { private boolean markOccurrencesEnabled; @@ -1209,7 +1209,7 @@ else if (oldAction!=null) { /** * Action performed when the user hits the tab key. */ - private class NextParamAction extends AbstractAction { + private final class NextParamAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { @@ -1238,7 +1238,7 @@ private static class ParamCopyInfo { /** * Action performed when the user hits shift+tab. */ - private class PrevParamAction extends AbstractAction { + private final class PrevParamAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java index dd81b0d..3d673ba 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java @@ -116,7 +116,7 @@ public void resetProvider() { * CompletionProvider is displayed based on the context in * which the user presses the trigger key. */ - private class CycleAutoCompleteAction extends AutoCompleteAction { + private final class CycleAutoCompleteAction extends AutoCompleteAction { @Override public void actionPerformed(ActionEvent e) { @@ -141,7 +141,7 @@ public void actionPerformed(ActionEvent e) { //nothing to do, just let the current provider display break; } - else{ + else { //search for non-empty completions advanceProvider(); } diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/SizeGrip.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/SizeGrip.java index 7a4a0b9..ec043fe 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/SizeGrip.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/SizeGrip.java @@ -205,7 +205,7 @@ public void updateUI() { * Listens for mouse events on this panel and resizes the parent window * appropriately. */ - private class MouseHandler extends MouseInputAdapter { + private final class MouseHandler extends MouseInputAdapter { private Point origPos; diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/SuppressFBWarnings.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/SuppressFBWarnings.java index 02354a7..17fe0a8 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/SuppressFBWarnings.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/SuppressFBWarnings.java @@ -1,3 +1,7 @@ +/* + * This library is distributed under a modified BSD license. See the included + * LICENSE.md file for details. + */ package org.fife.ui.autocomplete; import java.lang.annotation.Retention; diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/package-info.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/package-info.java index 579f353..01eb011 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/package-info.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/package-info.java @@ -1,3 +1,7 @@ +/* + * This library is distributed under a modified BSD license. See the included + * LICENSE.md file for details. + */ /** * The auto-completion library. */ diff --git a/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/package-info.java b/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/package-info.java index 8604eed..d0311f8 100644 --- a/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/package-info.java +++ b/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/package-info.java @@ -1,3 +1,7 @@ +/* + * This library is distributed under a modified BSD license. See the included + * LICENSE.md file for details. + */ /** * A package that demonstrates features of the AutoComplete library. */ diff --git a/build.gradle b/build.gradle index 6c1ebbf..9b9db39 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ subprojects { } checkstyle { - toolVersion = '9.3' + toolVersion = '10.20.1' configDirectory = file("$rootProject.projectDir/config/checkstyle") } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 1848ea3..c641178 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -75,8 +75,8 @@ - - + + @@ -84,12 +84,12 @@ - - - - - - + + + + + + @@ -127,8 +127,8 @@ - - + + @@ -139,8 +139,8 @@ - - + + @@ -154,8 +154,8 @@ - - + + @@ -165,8 +165,8 @@ - - + + @@ -177,6 +177,12 @@ + + + + @@ -186,8 +192,8 @@ - - + + @@ -196,13 +202,14 @@ - + - - + + + @@ -229,8 +236,8 @@ - - + + @@ -241,8 +248,8 @@ - - + + @@ -251,7 +258,7 @@ - + diff --git a/config/checkstyle/javaHeader.txt b/config/checkstyle/javaHeader.txt new file mode 100644 index 0000000..33662f5 --- /dev/null +++ b/config/checkstyle/javaHeader.txt @@ -0,0 +1 @@ +/*