Making duchain non-language-dependant

Aleix aleixpol at gmail.com
Tue Aug 21 19:36:00 UTC 2007


Hi List!
I have been working this summer giving CMake support to KDevelop. The
initial idea was to make it configurable from the GUI but we (mattr
and me) decided to bring full cmake support (such as completion,
highlighting, etc).

I have been working on this support for the last weeks and now I have
something working but I realized that I have to do strange things just
to adapt it to the DUChain structure. I will give an example.
In CMake there is no variable declaration. one can set a variable
passing it as a function parameter (such as set() or string(), where
it is an output variable).
The logical reaction is to say: "Hey, then use the definition as the
variable declaration" (i mean declaration in the sense of
KDevelop::Declaration class), but then I realize that there are
variables that are not even defined in the code, for example
CMAKE_CURRENT_SOURCE_DIR or CMAKE_C_COMPILER .

My proposal is that we need something different, a variable ::Use
should not depend to its declaration, but to a (possible) ::Variable
class that could have in there the Declaration, Definition or whatever
we want.

I would like to know what do you think about it, I just began with
duchain a few days ago and I am not an expert on it ;).

Thanks,
Aleix




More information about the KDevelop-devel mailing list