Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Managing additional toolchain state

Alain Magloire wrote:
The ".cdtproject" is a file that is created when you create a C/C++ Project
it contains information that are relevant to CDT components.

The Document for .cdtproject is relatively easy to access and persists throughout the session, making it relatively easy to extend. What's not so easy to extend is the InternalCExtension class. I suppose I could have used AbstractCExtension, but InternalCExtension looked like a better choice b/c I was duplicating the exact same state. (BTW: That's what the patch to bug #83584 is all about.)

The rationale: CDT components(Indexer, Builder, Parser, ..)
will/may need a mechanism to save relevant info and this
information needs to be sharable (i.e. shared with the project).
Instead of littering the project with dotfiles, all components
will use the .cdtproject file to save there info.
The .cdtproject provides features:
 - it can save an extension point in the file
   i.e. extension point interface must implement ICExtension
 - but it can  also save raw data.
 - it provide serialization
 - notification of changes
 - recreation of the file if it was deleted

I've gotten my stuff to serialize/deserialize from .cdtproject, as well as implemented as a cextension, so I'm happy for the time being...


Back to the top