void () { mySelectedTextRadioButton.setEnabled(myTextSelected); if (!myTextSelected) { mySelectedTextRadioButton.setToolTipText(CodeInsightBundle.message("tooltip.no.text.selected.in.editor")); } final boolean fileHasChanges = VcsFacade.getInstance().hasChanges(myFile); if (myFile.getVirtualFile() instanceof LightVirtualFile) { myOnlyVCSChangedTextRb.setVisible(false); } else { myOnlyVCSChangedTextRb.setEnabled(fileHasChanges); if (!fileHasChanges) { String hint = getChangesNotAvailableHint(); if (hint != null) myOnlyVCSChangedTextRb.setToolTipText(hint); } } myWholeFileRadioButton.setEnabled(true); if (myTextSelected) { mySelectedTextRadioButton.setSelected(true); } else { boolean lastRunProcessedChangedText = myLastRunOptions.getLastTextRangeType() == TextRangeType.VCS_CHANGED_TEXT; if (lastRunProcessedChangedText && fileHasChanges) { myOnlyVCSChangedTextRb.setSelected(true); } else { myWholeFileRadioButton.setSelected(true); } } }