How to register uses for declarations which are outside of the current file?

Sven Brauch svenbrauch at googlemail.com
Sun Mar 20 18:43:36 UTC 2011


Hi,

yeah, I'm just experiencing that problem. Sometimes uses in my test
documents cannot be resolved... but just sometimes. I was just
wondering why that was.
I'll try to force it to reparse the document if a dependency changes
(although that has turned out to be difficult to deal with, that whole
reparse stuf... :)

Thanks,
Sven

2011/3/20 David Nolden <david.nolden.kdevelop at art-master.de>:
>
> Am 20.03.2011 17:23 schrieb "Sven Brauch" <svenbrauch at googlemail.com>:
>
>>
>> Hey,
>>
>> thanks for your response.
>> When adding such a context, there was suddenly lots of problems I
>> couldn't identify exactly; for example, all the highlighting was gone
>> (probably because of the uses not being reported properly? don't
>> know). This is strange of course, I'd have expected nothing to happen.
>> Anyways, I was searching for the problem for quite a while and didn't
>> find anything.
>
> Then it probaby wasn't integrated properly into the multiple-pass "create"
> it in the first pass, but you also need to match it in the following passes
> (like the UseBuilder).
>
>> I now submitted a patch which makes it possible to force all
>> declarations to be direct for me. What concrete disadvantages does
>> that have? I already noticed I need a read lock for some operations
>> for which I didn't need one before; will it mainly cause a performance
>> decrease? From the feature point of view, everything seems to work
>> smoothly with this.
>
> The only problem is that, in case the declaration is deleted and re-created
> with a differen index, then it won't be found anymore. However anyway, we
> try to keep the declaration-indices consistent even if a declaration was
> re-created, so this hopefully should not cause too much pain. You anyway
> should make sure that your document is reparsed if any of its dependencies
> has changed, so this would also mostly workaround the issue.
>
> Greetings, David




More information about the KDevelop-devel mailing list