Better documentation / restrictions on enum values for Declaration IDs
apaku at gmx.de
Mon Jun 14 16:12:25 UTC 2010
On 14.06.10 17:14:03, David Nolden wrote:
> 2010/6/14 Milian Wolff <mail at milianw.de>:
> > Ah but looking at it, I see this:
> > UnsureType (KDevplatform) is in the 30's area,
> > PHPs types are in the 50's area
> > Types, Contexts and Declarations are all stored in the same registrator,
> > right? Meaning they must have distinct identities?
> Yes, _all_ duchain objects must have distict identities, including
> objects deriving ParsingEnvironmentFile (aka. Cpp::EnvironmentFile).
> > What are the limitations for changing the Identities? I expect I'd have to
> > increase the DUChain version so that it gets reparsed to prevent crashes?
> Yes the repository version has to be increased. At some point we'll
> have to find a solution here that also works with more or less
> independent plugins.
Just thinking out loud:
Could this be done by having a registry for this? That is when a plugin is
being loaded it registers all its type and each one gets an id (possibly
read from a special place in the duchain repository if it was seen before).
This is the stored during the runtime in an easily accessible variable that
doesn't need a function call to fetch (could just make it a protected
member variable in the base class of all duchain items).
A visit to a fresh place will bring strange work.
More information about the KDevelop-devel