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

Sven Brauch svenbrauch at googlemail.com
Sun Mar 20 16:23:24 UTC 2011


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.

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.

Cheers,
Sven


2011/3/20 David Nolden <david.nolden.kdevelop at art-master.de>:
>
> Am 14.03.2011 17:15 schrieb "Sven Brauch" <svenbrauch at googlemail.com>:
>>
>> Hi,
>>
>
>> I tried wrapping a context around every file, but for some reason that
>> screws up about everything. So if possible, I'd like to avoid that.
>
> In what way does it screw up?
>
>> Could you maybe explain again which conditions must be met so a
>> declaration can be found by findDeclaration()? I tried opening a new
>> context when processing the import statement, then adding the imported
>> files top-context into that newly opened one (using
>> addImportedParentContext), but when doing a search for a declaration
>> from the added context it apparently still fails. Why?
>
> The declaration has to be in the symbol table, then it should work. Try
> looking into findDeclaration and check at which point it fails.
>
> Greetings, David




More information about the KDevelop-devel mailing list