Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] ICDescriptor.saveProjectData() doesn't always serialize to .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



Back to the top