| Summary: | Refactoring Support for C/C++ | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Robert Gravina <robert> |
| Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | emanuel |
| Version: | 4.0 | ||
| Target Milestone: | 5.0 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Robert Gravina
The question on what refactorings to start with is a matter of taste, I have no preferences. There are a couple of subproblems that have to be solved: * How to generate the Change/Edit structure that is required by the refactoring framework. For the rename-refactoring it is sort of hand-crafted. As we add more refactorings there is some commonality that should be done in a common place. JDT handles that with a class that is named 'ASTRewriter' or similar. * How to handle inactive code (#ifdef xx #endif), for which we do not have any information in the index. For the rename refactoring I use a text-search to be able to warn the user that there are potential matches. Is that the way to go? * How to deal with the fact that the information in the index is not (and will never be) perfect. Again in the rename-refactoring this is backed by the text- search that finds the places where the parsing fails. We could also think about storing problems we find during indexing in the index. bug 75364 - has a more updated version of Refactoring requirements. But still this document is from the end of 2004! I believe CDT is at the stage where it's very usable :) and for the user to make full use of modern IT knowledge he should be able to REFACTOR. Maybe start small and then grow? If at the moment there is a problem with the preprocessor in various places of code, why not write refactoring commands which do not work on code which has conditional defines? Simply warn the user and do nothing. Because, as I see it ... 3 yrs from know, people are still going to be discussing the problems and not fixing any problems. We are now handling each refactoring in a separate bug: e.g.: bug 226658, bug 226646, bug 226490, bug 226484. Marking this bug as fixed. |