Java源码示例:com.intellij.refactoring.rename.inplace.MemberInplaceRenameHandler
示例1@Override
public void invoke(@NotNull Project project, @NotNull PsiElement[] elements, DataContext dataContext) {
if (elements.length == 1) {
new MemberInplaceRenameHandler()
.doRename(elements[0], dataContext.getData(CommonDataKeys.EDITOR), dataContext);
} else {
invoke(project, dataContext.getData(CommonDataKeys.EDITOR), dataContext.getData(CommonDataKeys.PSI_FILE),
dataContext);
}
}