InplaceRefactoring (@NotNull PsiElement elementToRename, @NotNull Editor editor, @Nullable DataContext dataContext) { VariableInplaceRenamer renamer = createRenamer(elementToRename, editor); boolean startedRename = renamer != null && renamer.performInplaceRename(); if (!startedRename && dataContext != null) { performDialogRename(elementToRename, editor, dataContext, renamer != null ? renamer.myInitialName : null); } return renamer; }