Eclipse refactoring menu uses eclipse refactoring
We often need to modify the class name in project development, but if other classes depend on the class, we need to spend a lot of time modifying the class name.
But the Eclipse refactoring feature can automatically detect class dependencies and modify class names, saving us a lot of time.
You can open the refactoring menu in the following ways:
- Right-click the Java element in the package Explorer view and select the Refactor (Refactor) menu item
- Right-click the Java element in the Java editor and select the Refactor (Refactor) menu item
- Select the Java element in the package Explorer view and press Shift + ALT + T
We have selected the HelloWorld class in the Java editor:
After selecting Rename, you will be prompted to enter a new class name and press ENTER to end the modification:
Once the change is complete, the class that will be modified will pop up:
You simply click the Continue button to complete the operation.
Eclipse refactoring Menu