Skip to content

Commit

Permalink
PMD: Inline field
Browse files Browse the repository at this point in the history
  • Loading branch information
AB-xdev committed Sep 19, 2024
1 parent ab48054 commit 46180ee
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/main/java/software/xdev/saveactions/ui/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ public class Configuration implements Configurable
private final Map<Action, JCheckBox> checkboxes = new EnumMap<>(Action.class);
private final ActionListener checkboxActionListener = this::updateCheckboxEnabled;

private GeneralPanel generalPanel;
private FormattingPanel formattingPanel;
private BuildPanel buildPanel;
private InspectionPanel inspectionPanel;
private FileMaskPanel fileMasksExclusionPanel;
private FileMaskPanel fileMasksInclusionPanel;
private IdeSupportPanel ideSupport;
Expand Down Expand Up @@ -159,10 +156,7 @@ public void disposeUIResources()
this.exclusions.clear();
this.inclusions.clear();
this.quickLists.clear();
this.generalPanel = null;
this.formattingPanel = null;
this.buildPanel = null;
this.inspectionPanel = null;
this.fileMasksInclusionPanel = null;
this.fileMasksExclusionPanel = null;
this.ideSupport = null;
Expand All @@ -188,18 +182,18 @@ private JPanel initComponent()
{
this.checkboxes.put(action, new JCheckBox(action.getText()));
}
this.generalPanel = new GeneralPanel(this.checkboxes);
this.formattingPanel = new FormattingPanel(this.checkboxes);
final GeneralPanel generalPanel = new GeneralPanel(this.checkboxes);
final FormattingPanel formattingPanel = new FormattingPanel(this.checkboxes);
this.buildPanel = new BuildPanel(this.checkboxes, this.quickLists);
this.inspectionPanel = new InspectionPanel(this.checkboxes);
final InspectionPanel inspectionPanel = new InspectionPanel(this.checkboxes);
this.fileMasksInclusionPanel = new FileMaskInclusionPanel(this.inclusions);
this.fileMasksExclusionPanel = new FileMaskExclusionPanel(this.exclusions);
this.ideSupport = new IdeSupportPanel();
return this.initRootPanel(
this.generalPanel.getPanel(),
this.formattingPanel.getPanel(),
generalPanel.getPanel(),
formattingPanel.getPanel(),
this.buildPanel.getPanel(),
this.inspectionPanel.getPanel(),
inspectionPanel.getPanel(),
this.fileMasksInclusionPanel.getPanel(),
this.fileMasksExclusionPanel.getPanel(),
this.ideSupport.getPanel(this.storage.getConfigurationPath())
Expand All @@ -208,8 +202,12 @@ private JPanel initComponent()

@SuppressWarnings("checkstyle:MagicNumber")
private JPanel initRootPanel(
final JPanel general, final JPanel actions, final JPanel build, final JPanel inspections,
final JPanel fileMasksInclusions, final JPanel fileMasksExclusions,
final JPanel general,
final JPanel actions,
final JPanel build,
final JPanel inspections,
final JPanel fileMasksInclusions,
final JPanel fileMasksExclusions,
final JPanel ideSupport)
{
final JPanel panel = new JPanel();
Expand Down

0 comments on commit 46180ee

Please sign in to comment.