void (final boolean makeEnumConstant) { PsiLocalVariable local = PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiLocalVariable.class); new MockLocalToFieldHandler(getProject(), true, makeEnumConstant).convertLocalToField(local, getEditor()); }