void (GrParameterListOwner selectedMethod, Editor editor, TextAttributesKey attributesKey, List<? super RangeHighlighter> highlighters, JCheckBox superMethod) { final MarkupModel markupModel = editor.getMarkupModel(); final TextRange textRange = selectedMethod.getTextRange(); final RangeHighlighter rangeHighlighter = markupModel.addRangeHighlighter(attributesKey, textRange.getStartOffset(), textRange.getEndOffset(), HighlighterLayer.SELECTION - 1, HighlighterTargetArea.EXACT_RANGE); highlighters.add(rangeHighlighter); if (selectedMethod instanceof GrMethod) { superMethod.setText(GroovyBundle.message("change.base.method.label")); superMethod.setEnabled(((GrMethod)selectedMethod).findDeepestSuperMethod() != null); } else { superMethod.setText(GroovyBundle.message("change.usages.label")); superMethod.setEnabled(findVariableToUse(selectedMethod) != null); } }