![]() ![]() ![]() Also you cannot rename any element that is defined outside of the project, for example, in an imported package. idea project directory since P圜harm always reads the project files from the directory with that exact name. Next time you invoke the Rename refactoring, P圜harm remembers the options you have specified inside the Rename dialog. When you click Preview, P圜harm opens the Find tool window with the results of found usages where you can check the results and confirm the refactoring ( Do Refactor). You can also specify a scope for the refactoring.Ĭlick Preview to see the potential changes or click Refactor. For example, specify where to search for element occurrences, or what else to rename. Enter a new name of the element to enable the Preview and Refactor buttons. You can perform the rename refactoring inline or press Shift+F6 again to open the Rename dialog. Press Shift+F6 or from the main menu, select Refactor | Rename. If you need to rename a file, select one in the Project tool window. In the editor, select the element you want to rename. In the Rename dialog that opens, type the new name, specify additional options and the scope of the refactoring, and click Refactor. In the Project tool window right-click a directory or a module that you want to rename.įrom the context menu, select Refactor | Rename ( Shift+F6). P圜harm renames the code element and updates its usages accordingly. ![]() P圜harm will display in the gutter.Ĭlick the gutter icon or press Alt+Enter and apply a suggestion. In the editor start renaming a code element. If there are changes that require your attention, P圜harm opens the Find tool window where you can check the results and confirm the refactoring by clicking Do Refactor. Press Tab or Enter to apply the refactoring. All occurrences will change automatically: To open the Rename dialog, click More options or press Shift+F6 again. If there are occurrences of this element in comments, strings, or text files, inline icons are displayed:Ĭlick the icons and select the desired options: Place the caret on the element that you want to rename and press Shift+F6. The refactoring changes are displayed on the Refactoring Preview tab in the Find tool window. When you rename methods that are declared in abstract base classes, you can also review and rename their implementations as well. Preview potential changes before you refactor. Renaming classes or their methods could potentially impact a lot of files. Renaming local variables or functions can be done easily inline since only the limited scope is affected. Use the Rename refactoring to change names of symbols, files, variables, functions, packages, modules and all the references to them throughout code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |