[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Re: DUContext::range()
From:       Hamish Rodda <rodda () kde ! org>
Date:       2009-07-02 0:43:57
Message-ID: 200907021043.57222.rodda () kde ! org
[Download RAW message or body]

On Tue, 30 Jun 2009 04:11:04 am Ramon Zarazua wrote:
> On Sunday 28 June 2009 07:16:01 am David Nolden wrote:
> > 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
>
> Then this seems to be a Bug, because I have tried it with different
> documents, and sometimes on the TopDUContext the range is 0, and sometimes
> it is not. I have yet to find the common denominator. It is possible that
> it might be due to a local change, but I doubt it, since I have not changed
> any code related to text ranges.

Can you point us at the code where the problem is occurring?  If you can't 
commit to head, make a branch so we can look at it.

Cheers,
Hamish.

_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic