Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Looking for info on using ICStorgaeElement

Mikhail,

This works just as expected.

Thanks
--
Derek


Sennikovsky, Mikhail wrote:
Hi Derek,

Here is how you could use the ICProjectDescription API for storing your
custom data within the .cproject file:

ICProjectDescriptionManager mngr =
CoreModel.getDefault().getProjectDescriptionManager();
ICProjectDescription des = mngr.getProjectDescription(project, true
/*writable description*/);
//to store project-wide info use
ICStorageElement el = des.getStorage("unique string id", true);
//use ICStorageElement methods for storing data

//to store configuration-specific information use
ICConfigurationDescription cfg = des.getConfiguration*(...);
ICStorageElement el = cfg.getStorage("unique string id", true);
//use ICStorageElement methods for storing data

//save modifications
mngr.setProjectDescription(project, des);

Hope this helps.

Mikhail

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of subs
Sent: Monday, September 03, 2007 6:44 PM
To: CDT General developers list.
Subject: [cdt-dev] Looking for info on using ICStorgaeElement

Hi,

I'm currently storing some additional private project information in my
own file within a project. However, I see that CDT4 has introduced a new project storage format, and it appears that I should be able to use this to store my information instead. However, there is no documentation that I can see on how to do
this.

It seem that I need to use a ICStorageElement, which is obtained from a CProjectDescription. I thought that I might be able to cast from a ProjectDescription, but that doesn't work.

I found a CProjectDesciptionManager, but that is not accessible to me...

Is there a bugzilla entry that describes the new model? I tried
searching but couldn't find anything

Any descriptions or some pointers to code that could get me started
would be great!

Thanks


Back to the top