示例#1
0
  public void storeMappings(IProject project, ProjectLanguageConfiguration config)
      throws CoreException {
    ICProjectDescription descriptor = getProjectDescription(project, true);
    ICStorageElement rootElement = descriptor.getStorage(LANGUAGE_MAPPING_ID, true);
    // clear all children and settings
    rootElement.clear();

    ICStorageElement projectMappings = rootElement.createChild(PROJECT_MAPPINGS);

    addProjectContentTypeMappings(config.getContentTypeMappings(), projectMappings);
    addFileMappings(config.getFileMappings(), projectMappings);
    CCorePlugin.getDefault().setProjectDescription(project, descriptor);
  }
 /** Clear all definitions inside this storage. */
 public void clear() {
   fStorage.clear();
 }