use of org.jetbrains.plugins.groovy.refactoring.introduce.IntroduceOccurrencesChooser in project intellij-community by JetBrains.
the class GrIntroduceParameterHandler method showDialogOrStartInplace.
//method to hack in tests
protected void showDialogOrStartInplace(@NotNull final IntroduceParameterInfo info, @NotNull final Editor editor) {
if (isInplace(info, editor)) {
final GrIntroduceContext context = createContext(info, editor);
Map<OccurrencesChooser.ReplaceChoice, List<Object>> occurrencesMap = GrIntroduceHandlerBase.fillChoice(context);
new IntroduceOccurrencesChooser(editor).showChooser(new Pass<OccurrencesChooser.ReplaceChoice>() {
@Override
public void pass(OccurrencesChooser.ReplaceChoice choice) {
startInplace(info, context, choice);
}
}, occurrencesMap);
} else {
showDialog(info);
}
}
Aggregations