LayoutCodeOptions () { return new LayoutCodeOptions() { @Override public TextRangeType getTextRangeType() { if (myOnlyVCSChangedTextRb.isSelected()) { return TextRangeType.VCS_CHANGED_TEXT; } if (mySelectedTextRadioButton.isSelected()) { return TextRangeType.SELECTED_TEXT; } return TextRangeType.WHOLE_FILE; } @Override public boolean isRearrangeCode() { return myRearrangeCodeCb.isEnabled() && myRearrangeCodeCb.isSelected(); } @Override public boolean isOptimizeImports() { return myOptimizeImportsCb.isEnabled() && myOptimizeImportsCb.isSelected(); } @Override public boolean isCodeCleanup() { return myApplyCodeCleanup.isEnabled() && myApplyCodeCleanup.isSelected(); } @Override public boolean doNotKeepLineBreaks() { return myDoNotKeepLineBreaks.isEnabled() && myDoNotKeepLineBreaks.isSelected(); } }; }