Java Reference
In-Depth Information
Checks for name collisions in the current scope.
Verifies that the new name is syntactically legal.
If a class or package is being renamed, creates the new files and directories
needed, and deletes the old ones.
Informs the version control system of any files that have been added or
removed from the source tree because of the name change.
Corrects all direct code references to the symbol so that they're using the
new name. This includes JSP scriptlets and bean property references.
Corrects any indirect references found in String s or non-Java configura-
tion files, such as when you're using reflection to invoke a class by name.
Corrects JavaDoc annotations that reference any code symbols that have
moved or renamed.
If a class or a package has been renamed, corrects the import statements.
Previewing your changes
All the refactoring functions in IDEA allow you to preview their effects before
they're performed, as shown in figure 9.13. This a good way to understand the
scope and effect of the changes IDEA is planning, and it also offers a way to fine-
tune the refactoring to your liking.
Navigate through the usage tree to examine IDEA 's refactoring plan and decide
if everything looks good. Pay careful attention to any changes to comments,
Figure 9.13 Before any refactoring is executed, the summary of its potential operation is
outlined in a preview tool window. This gives you the opportunity to cancel at the last second or
exclude usages from the operation.
 
Search WWH ::




Custom Search