final boolean enabled = myFixture.getEditor().getSettings().isVariableInplaceRenameEnabled();
try {
TemplateManagerImpl.setTemplateTesting(getProject(), getTestRootDisposable());
myFixture.getEditor().getSettings().setVariableInplaceRenameEnabled(true);
DartIntroduceHandler handler = createHandler();
final DartIntroduceOperation introduceOperation =
new DartIntroduceOperation(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile(), "a");
introduceOperation.setReplaceAll(true);
if (customization != null) {
customization.consume(introduceOperation);
}
handler.performAction(introduceOperation);
TemplateState state = TemplateManagerImpl.getTemplateState(myFixture.getEditor());
assert state != null;
state.gotoEnd(false);
myFixture.checkResultByFile(name + ".after" + getFileExtension(), true);