Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] ICDescriptor.saveProjectData() doesn't always serializeto .cproject

I am also seeing an Exception thrown when Eclipse shuts down. I haven't traced the exact cause, but it seems to be that when I try to save my extra data, the .cproject is no longer avilable.

Does this sound familiar? (Sorry for net checking the bugzilla, but I am on the end of a 9600baud modem, so anything other than simple emails is very difficult!

--
Derek


Schaber, Gerhard wrote:
Hi1

I came across similar problems in one case where I tried to save a
project description. Possible reasons where saving does not work:

- You make those calls within a job, and the job has a rule other than
workspace root (however, without rule it works). This gives an exception
that is swallowed by CDT without any message. See also bug #198523.

- The .cproject file is writable. In this case an exception is thrown.

Best regards,

    Gerhard


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jason Montojo
Sent: Montag, 17. September 2007 17:23
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] ICDescriptor.saveProjectData() doesn't always serializeto .cproject


Hi everyone,

I'm using ICDescriptor to serialize project language mappings to .cproject. When I add language mappings to a project, sometimes they get saved and sometimes they don't. Here's the general pattern I'm using to update the
descriptor:

      ICDescriptor descriptor = getProjectDescription(project);
Element rootElement = descriptor.getProjectData(LANGUAGE_MAPPING_ID);

      // Update rootElement with new language mappings

      descriptor.saveProjectData();

I stepped through the code and ended up in
SetCProjectDescriptionOperation.executeOperation():66

      modified = fNewDescriptionCache.applyDatas(context);

The line above sets modified to false, so the .cproject doesn't get serialized with the updated language mappings. However, the correct ICDescriptor with the language mappings is resident in memory so the mappings show up in the property pages.

Is there something special I need to do to get
fNewDescriptionCache.applyDatas() to return true?

Thanks,

Jason Montojo
IBM CDT Team
IBM Toronto Lab
905-413-5228
jmontojo@xxxxxxxxxx

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top