Review Request 124245: Introduced RefactoringManager

Milian Wolff mail at milianw.de
Mon Jul 6 14:51:12 UTC 2015


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



refactoring/refactoringmanager.cpp (line 43)
<https://git.reviewboard.kde.org/r/124245/#comment56524>

    wrap in anonymous namespace



refactoring/refactoringmanager.cpp (line 100)
<https://git.reviewboard.kde.org/r/124245/#comment56526>

    stlye:
    
    less indent, one member per line, { and } on their own lines



refactoring/refactoringmanager.cpp (line 109)
<https://git.reviewboard.kde.org/r/124245/#comment56525>

    I don't like returning references, at all. if you want to add stuff, add a function for that.



refactoring/refactoringmanager.cpp (line 121)
<https://git.reviewboard.kde.org/r/124245/#comment56527>

    style: put `: QObject(parent)` into its own line, indented by one level



refactoring/refactoringmanager.cpp (line 148)
<https://git.reviewboard.kde.org/r/124245/#comment56528>

    too much indentation



refactoring/refactoringmanager.cpp (line 190)
<https://git.reviewboard.kde.org/r/124245/#comment56529>

    style: for multi-line conditionals, put the brace on its own line



refactoring/refactoringmanager.cpp (line 197)
<https://git.reviewboard.kde.org/r/124245/#comment56530>

    rename: canonicalDecl



refactoring/renamevardeclrefactoring.cpp (line 73)
<https://git.reviewboard.kde.org/r/124245/#comment56531>

    too much indendation, and put one member/base on each line


- Milian Wolff


On July 3, 2015, 8:02 p.m., Maciej Poleski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124245/
> -----------------------------------------------------------
> 
> (Updated July 3, 2015, 8:02 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Introduced RefactoringManager.
> 
> Class used to prepare list of applicable refactorings "here" and their initialization. This replaces unfinished functionality of `Refactorings::allApplicableRefactorings`.
> 
> This class is coupled to all refactorings implementations. It works by traversing AST looking for node at given localization. Then it makes inspections to decide which refactorings can be used "here". When some refactoring is available - instantiates appropriate classes (derived from `Refactoring`) providing it with additional informations as required.
> 
> List of created instances is used to populate context menu. Action on menu item is to invoke refactoring. All instances are (will be) children of context menu (appropriate `QAction` to be precise).
> 
> This functionality is required for almost any nontrivial refactoring.
> 
> I have problem with multi-pass tooling. I cannot preserve AST nodes between passes. As a result I'm unable to make processing as efficient as it could be. I will work more on it.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 875172a8407f4bd9faf330f032a280fa66c2b16f 
>   clangsupport.h 8ed1ec90bbbc41d7c7a94d926e0951c729a6194c 
>   clangsupport.cpp e22c55426a2e839ec11cbe0b2fe1e13721b0583a 
>   cmake/FindClang.cmake 6c9bd6ef0242319122dcc7e6fd6cea8d9f0cbfbb 
>   refactoring/CMakeLists.txt PRE-CREATION 
>   refactoring/documentcache.h PRE-CREATION 
>   refactoring/documentcache.cpp PRE-CREATION 
>   refactoring/interface.h PRE-CREATION 
>   refactoring/interface.cpp PRE-CREATION 
>   refactoring/kdevrefactorings.h PRE-CREATION 
>   refactoring/kdevrefactorings.cpp PRE-CREATION 
>   refactoring/kdevrefactorings_disabled.h PRE-CREATION 
>   refactoring/nooprefactoring.h PRE-CREATION 
>   refactoring/nooprefactoring.cpp PRE-CREATION 
>   refactoring/refactoring.h PRE-CREATION 
>   refactoring/refactoring.cpp PRE-CREATION 
>   refactoring/refactoringcontext.h PRE-CREATION 
>   refactoring/refactoringcontext.cpp PRE-CREATION 
>   refactoring/refactoringinfo.h PRE-CREATION 
>   refactoring/refactoringinfo.cpp PRE-CREATION 
>   refactoring/refactoringmanager.h PRE-CREATION 
>   refactoring/refactoringmanager.cpp PRE-CREATION 
>   refactoring/renamevardeclrefactoring.h PRE-CREATION 
>   refactoring/renamevardeclrefactoring.cpp PRE-CREATION 
>   refactoring/utils.h PRE-CREATION 
>   refactoring/utils.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/124245/diff/
> 
> 
> Testing
> -------
> 
> Manual testing
> 
> 
> Thanks,
> 
> Maciej Poleski
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150706/231d8af9/attachment.html>


More information about the KDevelop-devel mailing list