Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] CDT refactoring support Google SoC project

Hello Eclipse CDT developers!

I was browsing the Google SoC projects for this year and came across this Eclipse proposal:

"Add full refactoring support to CDT."

As it turns out, my masters project relates to software tools for C. I was actually planning to develop a C refactoring tool for Eclipse, and been looking into adding at least partial refactoring support to CDT for a number of reasons. Firstly, my professor has asked me look at ways of dealing with the C-pre-processor, and the truckload of problems it causes for software tools, and also to apply some of his previous work to creating new tools. Seeing as I have an interest in software design in general also, I thought building a refactoring tool would be a useful tool to test whatever techniques we develop. Secondly, there seems to be a dearth of open source C refactoring tools. There are few commercial implementations, and research projects, but I was unable to find any open source implementations which I could download and play around with (although recently XRefectory has released a free version). Thirdly, I really think CDT would really benefit from refactoring support - and obviously whomever proposed that topic does too! I understand why this hasn't been tackled yet - C, and C++, create a load of problems for refactoring tools that languages like Java don't - the pre-processor, pointers, difficulty in parsing. etc.

I would be interested in tackling this project, wanted to send this mail out too see if any CDT developers have any suggestions or comments, and if any work has been done on refactoring support thus far (apart from Rename, as useful as this is! Thanks!). I realise I'm cutting this a bit fine - the Google SoC deadline is only a few days away (March 26th) - but I only discovered this project by chance a few days ago!

Even if I don't do this as a Google SoC project, I will most likely be developing a C refactoring tool of some sort for Eclipse as part of my research project. Doing it as a SoC would mean that I can spend more time on the refactoring tool that I otherwise would (as much as I would love to just hack away on the tool itself, I do need *some* novel research contributions!), so it is a win-win situation for both of us. I'm still in the process of getting aquainted with previous work on the topic, and it seems one of the Gang of Four (Ralph Johnson) and one of his students has put a fair bit of work into this with CRefactory < CRefactory.html>. One very useful outcome of this is a collection of refactorings tailored to C - rename macro, group a set of variables in a new struct etc. I think this could form a solid basis for the design of a CDT refactoring pugin, or at least as a starting point. Also, I came across this CDT refactoring proposal from a couple of years ago, which also is useful to look at bugs/attachment.cgi?id=14995

I haven't looked into the specific problems C++ causes, and honestly I'm not the most experienced C++ developer, but I have been delighted to find some of things that bothered me about C have been addressed in C++ (and yes, of course, it's object-oriented!!!)

Over the next few days I will work on an application for the Google SoC and a supporting website I can put additional information on.


Back to the top