UsageViewDescriptor (final UsageInfo @NotNull [] usages) { return new UsageViewDescriptorAdapter() { @Override public PsiElement @NotNull [] getElements() { return new PsiElement[]{toSearchFor != null ? toSearchFor : toReplaceIn}; } @Override public String getProcessedElementsHeader() { return GroovyRefactoringBundle.message("introduce.closure.parameter.elements.header"); } }; }