View previous topic :: View next topic |
Author |
Message |
3-S-E
Joined: 16 Jun 2008 Posts: 54
|
Posted: Sat Jun 21, 2008 9:34 am Post subject: renaming with refactor-function available?! |
|
|
Does Descent feature the refactoring-functionality for d-sources, like eclipse features for java-sources? It is very exhausting to rename every single appearance of a variable in a 100+ lines sourcefile... Find/Replace is no option... |
|
Back to top |
|
|
ElZilcho
Joined: 20 Jun 2008 Posts: 7
|
Posted: Sat Jun 21, 2008 10:16 am Post subject: |
|
|
I don't think this feature is present, but I would like to second the request for it. This is very nice in Java, and would be very nice in D.
There is limited refactoring, however it isn't for variables. If you take a module and drag it to a new package, then it will update the module name and all imports linking that module. I found this very useful when I make an organizational mistake. |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sat Jun 21, 2008 1:13 pm Post subject: |
|
|
We have refactoring in mind, but for that we need to implement search funcionality, because refactoring works like that: search occurrences, and rewrite the AST.
There is currently a "rename locally" feature. Press ctrl+1 over a name (of a class, variable, function or template) and select "rename locally", or press ctrl + 2, r. Then type the desired name and it will rename it in the current source file. |
|
Back to top |
|
|
|