Eclipse tutoria...login
Eclipse tutorial
author:php.cn  update time:2022-04-13 14:09:28

Eclipse Refactoring Menu



Refactoring using Eclipse

We often need to modify the class name during project development, but if other classes depend on this class, we need to spend a lot of time to modify it. Class name.

But the Eclipse refactoring function can automatically detect class dependencies and modify class names, helping us save a lot of time.

You can open the Refactor menu in the following ways:

  • Right-click the Java element in the Package Explorer view and select the Refactor menu item

  • class-refactor
  • Right-click the Java element in the Java editor and select the Refactor menu item

  • Select the Java element in the Package Explorer view and Press Shift + Alt + T

In the picture below we have selected the HelloWorld class in the Java editor:

refactor

After selecting Rename, you will be prompted to enter a new class name and press Enter to end the modification:

refactor-rename

After the modification is completed and the Enter key is pressed, the class to be modified will pop up:

will-refactor

You only need to Click the Continue button to complete the operation.

php.cn