Rename Assistant

David Nolden zwabel at googlemail.com
Thu Oct 28 11:53:35 UTC 2010


There's one thing wrong with the way you cast the RangeInRevision's
from the uses() to SimpleRange's. A SimpleRange is always in the
current document revision, while a RangeInRevision may be in some
older revision (the revision-token is stored in the duchain, but not
in the range), and normally you need to cast them using the functions
from DocumentChangeTracker, or through the helper-functions from
DUChainBase. You can use Declaration::usesCurrentRevision() to get the
uses in the current revision, however that revision may again be
changed if you wait too long, so if you store the ranges for a longer
time, you should simply convert them to PersistentMovingRange after
retrieving them.

Greetings, David




More information about the KDevelop-devel mailing list