Community
Participate
Working Groups
Undoing after creating the implementation file doesn't delete the implementation file. I don't know much about undoing but it looks like you have to call ModificationCollector.addFileChange at some point.
Created attachment 229260 [details] Minimal project to verify the problem Verified the problem using eclipse.buildId=I20130204-1400 ; org.eclipse.cdt (8.2.0.201302052218) . This is a minimal project that shows the error.
I'm not sure this should be fixed. We don't generally support Undo-ing the creation of files (i.e. if you select New -> Source file, it doesn't generate an Undo entry), so why should we support it here? Currently, the file is created *before* the refactoring is actually done, which prevents it from using the undo facilities used by the actual refactoring. I looked into moving the file creation into the refactoring itself, but that runs into problems defining the later changes, which rely on the existence of the file. So, as long as the file creation is actually a separate step, before the real refactoring, I don't see why it should be treated as different than any other file creation, and therefore, it shouldn't get an Undo entry. I'd close this as WONTFIX.
Apparently the Java refactorings *do* include file creation within the refactoring itself, so we really ought to do the same. So, no, this shouldn't be closed as WONTFIX. (Per discussion on cdt-dev).