How do I use DUChain::environmentFileForDocument ?

David Nolden zwabel at googlemail.com
Sun Sep 20 21:39:47 UTC 2009


Am Sonntag 20 September 2009 23:30:55 schrieb Milian Wolff:
> David Nolden, 20.09.2009:
> > Am Sonntag 20 September 2009 22:06:26 schrieb Milian Wolff:
> > > In the ctor of the PHP language support class I want to check the
> > >  modification revision of the PHPInternalFunctions file and, if
> > > required, delete it from the duchain so it gets reparsed.
> > >
> > > My problem is, that I don't know what to pass as ParsingEnvironment* to
> > > the above mentioned method...
> > >
> > > We don't have a PHP-specific ParsingEnvironment.
> >
> > That simply means that you don't use parsing-environments, and then you
> >  cannot use that function. It is a speedup function, that allows getting
> >  just the ParsingEnvironmentFile of a TopDUContext, instead of having to
> >  load the whole TopDUContext into memory.
> 
> Yes, and that's exactly why I want to use the above mentioned method. I
>  wan't to only load the duchain when really required. How would I use a
>  parsing environment? Do you have an example?
Take a look at the cpp support 
(kdevelop/languages/cpp/cppduchain/enviromentmanager.cpp/Cpp::ParsingEnvironment) 
or similar.
You just need to implement the pure virtual function of ParsingEnvironment, 
and pick a file in whatever way you wish.

Greetings, David




More information about the KDevelop-devel mailing list