Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] ASTRewrite rewrite

>         This is not an issue with ASTRewrite. Refactorings derived
>         from CRefactoring2 don't require saving. We need to migrate
>         all refactorings to this framework. See for
>         example https://bugs.eclipse.org/bugs/show_bug.cgi?id=347712.
> 
> 
> That's good to know! I'll have a look on that

Migrating to CRefactoring2 might indeed allow you to refactor on unsaved
files. This will however cause severe indexer issues (at least for
refactorings which use the index, e.g. finding definitions etc.). This
happens because the index is only refreshed on save action. So as long
as the indexer does not provide the possibility to be updated with
unsaved file contents (and necessarily reversion of those changes on
possible drop of file-changes), refactorings using the index will work
more or less in the "dark" because the indexer will (1) return
inaccurate node locations, (2) fail to return newly added
declarations/definitions/references or (3) return non-existing
declarations/definitions/references.

Lukas



Back to the top