add something a la CodeModelItem::visibility ?

Milian Wolff mail at milianw.de
Sun Sep 20 20:51:08 UTC 2009


David Nolden, 19.09.2009:
> Am Freitag 18 September 2009 21:43:14 schrieb Milian Wolff:
> > So I should set Kind::Hidden on every (local) _variable_?
> >
> > Or is it possible to use the uKind and store both in there, i.e. ::Hidden
> > &
> >
> > ::Variable ? That should work. Though personally that's not really
> > :: "nice".
> >
> > Adding a "GlobalVariable" would imo be much nicer. Is that really so
> >  language- dependent? I'd think pretty much every script language has a
> >  concept of "global variables".
> >
> > Please, help me in finding something suitable, else I'm stuck.
> 
> Local variables should not be in the code model in the first place. Items
> should be only added to the code-model and symbol-table if they are
>  globally visible (Through Declaration::setInSymbolTable).

Woha, yes indeed that could be. But could you explain a bit more when the 
setInSymbolTable is required?

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?
-- 
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/20090920/00a94375/attachment.sig>


More information about the KDevelop-devel mailing list