Refactoring features in KDevelop
Kevin Funk
kfunk at kde.org
Thu Jan 29 10:53:04 UTC 2015
On Wednesday 28 January 2015 23:22:39 Milian Wolff wrote:
> On Wednesday 28 January 2015 17:10:54 Maciej Poleski wrote:
> > Hello
> >
> > I was looking for C++ IDE capable of doing (at least partially automated)
> > source code refactoring for years. Without success. I have Idea to
> > implement some refactoring tools in KDevelop. What would You say about
> > that? I know there is GSoC coming on and this seems be quite nice
> > project.
>
> Yes, this would indeed be an extremely interesting project. Note though,
> that we want potential students to get active before the GSoC period, to
> show their capabilities. Thus, if you want to work on this over the summer,
> you should get started *now*.
>
> A good idea would be to get a list of goals, i.e. refactoring features that
> you want to implement. Then, you'll need to get your hands dirty with kdev-
> clang in the master branch, i.e. also build kdevplatform and kdevelop from
> sources and against KDE frameworks 5 and Qt 5. Then try to figure out how to
> add refactoring capabilities there. Start by porting existing features from
> our old C++ language plugin over to kdev-clang, e.g. the ability to
> de-inline a function in a header by moving its implementation to the
> accompanying .cpp file.
Yep. That would be my plan as well.
I didn't manage to come to refactoring tools during *my* GSoC last year, so
this would be a nice continuation of the Clang integration work in KDevelop.
Start off by checking out libTooling of Clang:
http://clang.llvm.org/docs/LibTooling.html
Unfortunately that's pure C++, more low-level, and not as stable as the C
interface of libclang -- [1] indicates that people would be happy if you'd
expose more interfaces in libclang in order to make it inter-operable with
libTooling.
Happy to help out if you're interested in this area.
[1] http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-December/034304.html
> Overall, it would be a good idea to figure out how one could potentially
> leverage the existing clang refactoring tools from our existing codebase.
> The problem is that, afaik, these are all inaccessible via the C API we
> use.
>
> Bye
--
Kevin Funk | kfunk at kde.org | http://kfunk.org
More information about the KDevelop-devel
mailing list