add something a la CodeModelItem::visibility ?

Milian Wolff mail at milianw.de
Sun Sep 20 22:07:06 UTC 2009


David Nolden, 20.09.2009:
> Am Sonntag 20 September 2009 22:51:08 schrieb Milian Wolff:
> > Woha, yes indeed that could be. But could you explain a bit more when the
> > setInSymbolTable is required?
> 
> It should only be set on items that are globally visible, so for anything
>  that can be addressed globally, for example through "Class::member".
> 
> > I just thought: OK, setInSymbolTable to _false_ on anything I might not
> >  need during global completoin. That would class members, functions and
> > the like in my opinion, since I always do:
> >
> > classContext->findLocalDeclarations(...);
> >
> > But with setInSymbolTable(false) the above returns nothing. I assume the
> >  doc-
> >
> > comment of allLocalDeclarations talks about it:
> > > Returns all local declarations
> > > @param source A source-context that is needed to instantiate template-
> >
> > declarations in some cases.
> >
> > > If it is zero, that signalizes that missing members should not be
> >
> > instantiated.
> >
> > Is that what I have to use now? If so, what do I have to give as a
> > source?
> 
> Hmm findLocalDeclarations(..) should not be affected by whether the
> declarations are in the symbol-table or not. But I have added a speedup to
> "findLocalDeclarationsInternal" that uses the symbol-table also for local
> lookup, if the context is in the symbol-table.
> 
> I guess that is speedup is wrong in this case, if you do
> "setInSymbolTable(false)" on some declarations.
>
> But you can easily workaround it, by setting "setInSymbolTable(false)" on
>  all contexts that contain no globally visible declarations, instead of
>  doing it on a per-declaration basis. That's how it's done in C++.

In regard to your last email, I can't use this then.

Could this speedup be "fixed"? I mean this makes it really impossible for me 
add anything to setInSymbolTable(false) !

And it makes no sense to me that you would only get decs in the symbol table 
when you explicitly request the child-items of a context.

In my impression, any findLocalDeclaration or the localDeclarations() method 
should give me the declarations of the current context, no matter whether they 
are in the symbol table or not.
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090921/2119600b/attachment.sig>


More information about the KDevelop-devel mailing list