boolean (PsiLocalVariable local, PsiClass aClass, Editor editor, boolean isStatic) { final PsiExpression[] occurences = CodeInsightUtil.findReferenceExpressions(CommonJavaRefactoringUtil.getVariableScope(local), local); if (editor != null) { RefactoringUtil.highlightAllOccurrences(myProject, occurences, editor); } final BaseExpressionToFieldHandler.Settings settings = showRefactoringDialog(aClass, local, occurences, isStatic); if (settings == null) return true; //LocalToFieldDialog dialog = new LocalToFieldDialog(project, aClass, local, isStatic); final PsiClass destinationClass = settings.getDestinationClass(); boolean rebindNeeded = false; if (destinationClass != null) { aClass = destinationClass; rebindNeeded = true; } final PsiClass aaClass = aClass; final boolean rebindNeeded1 = rebindNeeded; final Runnable runnable = new IntroduceFieldRunnable(rebindNeeded1, local, aaClass, settings, occurences); CommandProcessor.getInstance().executeCommand(myProject, () -> ApplicationManager.getApplication().runWriteAction(runnable), getRefactoringName(), null); return false; }