![]() If there is an occurrence that you do not want to change, deselect that line's checkbox.īy default, matches to a Find command remain highlighted in the Source Editor after you have dismissed the Find dialog box. In the Refactoring window (shown in Figure 5-13), which appears at the bottom of the IDE, verify the occurrences that are set to change.If you leave the Preview All Changes checkbox selected, the Refactoring window appears with a preview of the changes. If you have deselected the Preview All Changes checkbox, the changes are applied immediately. If you want occurrences of the name in comments to also be changed, check the Apply Name on Comments checkbox. In the Rename dialog box, type the new name for the element. Right-click and choose Refactor | Rename or press Alt-Shift-R.In the Source Editor, move the insertion point to an occurrence in the code of the class, method, or field name that you want to rename.To rename a class, method, or field name: In addition, with the Rename command, you get a preview of the changes to be made and can prevent renaming of specific occurrences. Unlike standard search and replace operations, the Rename command is sensitive to the Java context of your code, which makes it much more easy and reliable to use when reworking code. If you want to rename a class, method, or field, you can use the Refactor | Rename command to update all occurrences of the identifier in the Project to the new name. Renaming All Occurrences of the Currently Selected Class, Method, or Field Name You can navigate to a given occurrence of a class, method, or field name by doubleclicking the occurrences line in the Usages window. The results are displayed in the Usages window (shown in Figure 5-12), which appears at the bottom of the IDE. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |