Review Request 124200: Introduction of rename variable refactoring

Maciej Poleski d82ks8djf82msd83hf8sc02lqb5gh5 at gmail.com
Thu Jul 16 13:10:09 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124200/
-----------------------------------------------------------

(Updated Lip 16, 2015, 3:10 po poĊ‚udniu)


Status
------

This change has been marked as submitted.


Review request for KDevelop.


Repository: kdev-clang


Description
-------

Introduced rename variable refactoring.

This patch provides preliminary support for variable rename refactoring.
Currently only one project is supported.
Currently it is required to save all opened documents (cache is not ready).
Regeneration of compile_commands.json needs to be polished. How to get appropriate notification (IProjectBuilder::configured signal)? As a workaround i simply restarted KDevelop to get this regenerated.
To use this refactoring right click on variable declaration (definition) and select "rename" refactoring.


Full renaming support will consist of a few parts - one of them is renaming around VarDecl (this patch).
Quite early, but i wanted to see that this work is going into some direction after month of coding of pure interfaces/details.

How to split diffs? I noticed that RBTool created diff consisting of all changes ignoring other pending request. I wanted only the last one, because earlier commits are subject of other review.

NOTE: This is very conservative refactoring. It runs ClangTool on every TU defined in compile_commands.json. Such refactorings are very slow. I will have to work more on it (make some heuristics reducing set of TUs which need processing).


Diffs
-----

  refactoring/utils.cpp PRE-CREATION 
  refactoring/utils.h PRE-CREATION 
  refactoring/renamevardeclrefactoring.cpp PRE-CREATION 
  refactoring/renamevardeclrefactoring.h PRE-CREATION 
  refactoring/refactoringmanager.cpp PRE-CREATION 
  refactoring/kdevrefactorings.cpp PRE-CREATION 
  refactoring/debug.cpp PRE-CREATION 
  refactoring/debug.h PRE-CREATION 
  refactoring/CMakeLists.txt PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/124200/diff/


Testing
-------

Manual testing on very small code bases as cache and compile_commands.json regeneration is not fully functional.


Thanks,

Maciej Poleski

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150716/06294bb9/attachment.html>


More information about the KDevelop-devel mailing list