Renaming files
You can rename files.
About this task
Procedure
- Right-click on the file and select (also from the menu or Alt+Shift+R).
- In the dialog, specify the new name and the level of refactoring
(that is, changing names in the source files to reflect the new file
name):
- New name - enter a unique name for the file.
- Update references - select this box to change names in the source files that match the old file name.
- Update similarly named variables and methods - select this box to change variable and method names in the source files that are similar to the old file name. Continue reading for instructions.
- Update textual occurrences in comments and strings - select this box to change the name where it occurs in comments and strings.
- Update fully qualified names in non-Java text files.
- If you elect to update similarly named variables and methods,
click Configure to specify the level of similarity.
You are presented with another dialog with the following options:
- Find exact names only (selected by default) - for example,
if the file name is
SomeClass.java, this option findsSomeClassandSomeClass(). - Also find embedded names (not selected by default) -
for example, this options finds
mySomeClassToUseandgetSomeClass(). - Also find name suffixes (not selected by default) -
for example, this option finds
class,myClass, andgetClassToUse.
- Find exact names only (selected by default) - for example,
if the file name is