In the Rename dialog that opens, add the new name and click OK. If you have a module with one content root, and it has the same name as your module, you can rename them both simultaneously. In the popup that opens, select what you want to rename. In the Projects tool window right-click a directory or a module that you want to rename.įrom the context menu, select Refactor | Rename ( Shift+F6). IntelliJ IDEA renames the code element and updates its usages accordingly. IntelliJ IDEA will display in the gutter.Ĭlick the gutter icon or press Alt+Enter and apply a suggestion. In the editor start renaming a parameter, a method, or other code element. The refactoring changes are displayed on the Refactoring Preview tab in the Find tool window. When you rename methods that are declared in interfaces, you can also review and rename their implementations as well. Preview potential changes before you refactor. Renaming classes or public methods could potentially impact a lot of files. Renaming local variables or private methods can be done easily inline since only the limited scope is affected. If you’d like to give this feature a try, grab the latest IntelliJ IDEA 14.1 EAP build, and share your feedback with us on our discussion forum and in the issue tracker.Use the Rename refactoring to change names of symbols, files, directories, packages, modules and all the references to them throughout code. Note that this particular editor improvement is only available in the Ultimate Edition, because it requires Velocity plugin, but everything else works well in Community Edition.Īfter the code has been generated, IntelliJ IDEA will make it clean and good-looking with automatic application of code style, Code Cleanup, and adding annotations where needed. To fully support this new feature, the Template Editor has been upgraded with complete Velocity coding assistance. In IntelliJ IDEA 14.1 we’re extending this support to all other generated methods. That’s why the toString() method generator included the support for Velocity templates that could be modified and tailored to your needs. IntelliJ IDEA already has impressive code generation capabilities: it can create getters and setters, equals(), hashCode(), toString(), and other methods, some of which are really simple to generate, and some are quite not.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |