DUContext::range()
David Nolden
david.nolden.kdevelop at art-master.de
Sun Jun 28 12:16:01 UTC 2009
Am Sonntag 28 Juni 2009 05:10:53 schrieb Ramon Zarazua:
> Well I have been having a problem where sometimes a call to
> DUContext::range() through DUContext::findContextIncluding() will return an
> empty range. from what David told me it is usually for contexts that are
> not open on the editor, but I am testing it always with open documents on
> the editor. To my knowledge this is a bug, or maybe there is another way to
> accessincluding context from an editor range?
Well no it is not normal to be empty. It is normal for the top-context range
not to have the exact size of the document though.
The only contexts that have empty ranges are usally those that were expanded
by a preprocessor macro, since they cannot have a valid range in the document.
If you don't want "findContextIncluding(Range)" to return you such empty
ranges, then you should call it non-empty ranges, as only empty ranges can be
contained by an empty range.
Greetings, David
More information about the KDevelop-devel
mailing list