Eclipse 简明教程
Eclipse - Refactoring
Refactoring using Eclipse
重命名整个项目中广泛使用的类可能需要花费大量时间,但 Eclipse 重构向导通过自动检测对正在重命名的类的所有依赖关系并对其进行修改,使这项工作变得更加容易。
Renaming a class that is used widely throughout a project could take a lot of time but the Eclipse refactoring wizard makes the job easier by automatically detecting all dependencies on the class being renamed and modifying them also.
可以通过以下方式打开重构菜单:
The refactor menu can be opened by −
-
Right clicking on a Java element in the Package Explorer view and selecting Refactor menu item.
-
Right clicking on a Java element in the Java editor and selecting Refactor menu item.
-
Selecting a Java element in either the Package Explorer view or Java Editor and clicking Shift + Alt + T.
重构菜单显示对所选 Java 元素支持的所有可能的更改。要重命名类,请选择重命名菜单项。
The refactor menu shows all the possible changes that are supported on the selected Java element. To rename a class, select the Rename menu item.
单击下一步按钮以查看更改的预览(如果可用)。然后单击完成,让向导执行其工作。
Click on the Next button to see a preview of the changes (if available). Then click on Finish to get the wizard to do its work.