dmitrybv 5 Posted yesterday at 01:49 AM In previous versions of Delphi, there was a Refactor → Rename menu for renaming types, fields, and properties across the entire project. In Delphi 13, this menu seems to be missing. I tried using MMX Code Explorer, but I couldn't find an equivalent. MMX offers Rename in Scope, but it only works at the unit level and does not rename the identifier throughout the entire project. Are there any alternatives or tools in Delphi 13 that provide full-project renaming functionality similar to the old Refactor → Rename? Share this post Link to post
havrlisan 46 Posted 21 hours ago I've been using dnGrep daily (although any general search and replace tool will suffice) for more than a year, and it has been more than enough for me. It has a wide variety of search features, and it displays the files with ease. I also made a small tool that allows you to open the matching file and jump to the line number in RAD Studio, which made the usage of the tool even better. GExperts also has an awesome grep tool integrated into the IDE, although I got used to dnGrep before I found out about it. The only downside is that trying to rename a public property, method or field might be inconvenient, as other might exist with the same name. Share this post Link to post
Uwe Raabe 2207 Posted 20 hours ago 5 hours ago, dmitrybv said: MMX offers Rename in Scope, but it only works at the unit level and does not rename the identifier throughout the entire project. While it wouldn't be a problem to extend the scope to the current project and project group, the outcome may not be what is expected. The removed refactoring used some sort of code model to limit the rename on the actual type, field, property or method. In contrast to MMX renaming using some search and replace action limited to the given scope. That way it is possible to extend the renaming on comments and/or string content - something a code model based rename cannot do. Nevertheless, there exists an epic in the issue tracker to extend the renaming to the project and project group level with respecting the underlying code model. As one might guess, that is quite a big task (hence an epic). As MMX still is a free time project of mine, I cannot give a time frame for implementing this request. Share this post Link to post
Anders Melander 2116 Posted 9 hours ago 10 hours ago, Uwe Raabe said: In contrast to MMX renaming using some search and replace action limited to the given scope. Doesn't MMX have an AST representing the code? 10 hours ago, Uwe Raabe said: something a code model based rename cannot do. It also cannot make coffee but who cares as long as it can actually refactor code - based on the code model. Messing with the comments, when doing a rename, is bound to change texts that wasn't meant to be changed. Share this post Link to post
Uwe Raabe 2207 Posted 8 hours ago 1 hour ago, Anders Melander said: Doesn't MMX have an AST representing the code? Unfortunately, it has not. Yet. Share this post Link to post
pyscripter 837 Posted 5 hours ago (edited) 5 hours ago, Uwe Raabe said: Yet This gives us some hope. Delphi users do need decent refactoring. Let us know if we can help. This could be a community effort. Edited 3 hours ago by pyscripter Share this post Link to post