Refactoring: Get rid of some duplicating 'isModified()' methods, now it's part of Configurable interface

Improvements: Start using UINumericRange to validate int values we parse from text fields (settings etc.)
This commit is contained in:
Vassiliy.Kudryashov
2016-12-05 23:01:38 +03:00
parent 2ebbf5b3c6
commit d76aee1576
11 changed files with 58 additions and 135 deletions
@@ -218,14 +218,6 @@ public class CodeStyleGenerationConfigurable implements Configurable {
return isModified(mySettings);
}
private static boolean isModified(JCheckBox checkBox, boolean value) {
return checkBox.isSelected() != value;
}
private static boolean isModified(JTextField textField, String value) {
return !textField.getText().trim().equals(value);
}
private void createUIComponents() {
myCommenterForm = new CommenterForm(JavaLanguage.INSTANCE);
myCommenterPanel = myCommenterForm.getCommenterPanel();