void (int... disableParams) { boolean enabled = true; try { configureByFile("/refactoring/introduceFunctionalVariable/before" + getTestName(false) + ".java"); enabled = getEditor().getSettings().isVariableInplaceRenameEnabled(); getEditor().getSettings().setVariableInplaceRenameEnabled(true); new IntroduceFunctionalVariableHandler() { @Override protected void setupProcessorWithoutDialog(ExtractMethodProcessor processor, InputVariables inputVariables) { inputVariables.setPassFields(true); super.setupProcessorWithoutDialog(processor, inputVariables); for (int i : disableParams) { processor.doNotPassParameter(i); } } }.invoke(getProject(), getEditor(), getFile(), new MapDataContext()); checkResultByFile("/refactoring/introduceFunctionalVariable/after" + getTestName(false) + ".java"); } finally { getEditor().getSettings().setVariableInplaceRenameEnabled(enabled); } }