TextRangeType () { if (myOnlyVCSChangedTextRb.isSelected()) { return TextRangeType.VCS_CHANGED_TEXT; } if (mySelectedTextRadioButton.isSelected()) { return TextRangeType.SELECTED_TEXT; } return TextRangeType.WHOLE_FILE; }