[refactor] Describe refactorings in the operation classes
authorAlex Lorenz <arphaman@gmail.com>
Fri, 27 Oct 2017 18:19:11 +0000 (18:19 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 27 Oct 2017 18:19:11 +0000 (18:19 +0000)
commit0beca4d1ecd6b20abd8be8ee4f46783128a009b4
treeecf2e7402ff710bb7816bfbd4ddb935776019785
parent1bfaa453a32189e6b570ab9ac9781f0101dca66d
[refactor] Describe refactorings in the operation classes

This commit changes the way that the refactoring operation classes are
structured:
- Users have to call `initiate` instead of constructing an instance of the
  class. The `initiate` is now supposed to have custom initiation logic, and
  you don't need to subclass the builtin requirements.
- A new `describe` function returns a structure with the id, title and the
  description of the refactoring operation.

The refactoring action classes are now placed into one common place in
RefactoringActions.cpp instead of being separate.

Differential Revision: https://reviews.llvm.org/D38985

llvm-svn: 316780
clang/include/clang/Tooling/Refactoring/Extract/Extract.h [new file with mode: 0644]
clang/include/clang/Tooling/Refactoring/RefactoringActionRegistry.def [deleted file]
clang/include/clang/Tooling/Refactoring/RefactoringActionRule.h
clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h
clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h
clang/include/clang/module.modulemap
clang/lib/Tooling/Refactoring/Extract.cpp
clang/lib/Tooling/Refactoring/RefactoringActions.cpp
clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp
clang/unittests/Tooling/RefactoringActionRulesTest.cpp