IProject project = ProjectUtils.getProject(projectName);
ICProjectDescription desc =
CCorePlugin.getDefault().getProjectDescription(project, true);
ICConfigurationDescription[] configs = desc.getConfigurations();
ICLanguageSettingEntry entry = createEntry(commandLine);
boolean deleted = false;
for(ICConfigurationDescription config : configs){
ICFolderDescription fdesc = config.getRootFolderDescription();
ICLanguageSetting[] ls = fdesc.getLanguageSettings();
for (ICLanguageSetting l : ls){
String name = StringUtils.split(l.getName())[0].toLowerCase();
if (name.equals(lang)){
List<ICLanguageSettingEntry> lst =
l.getSettingEntriesList(entry.getKind());
Iterator<ICLanguageSettingEntry> iterator = lst.iterator();
while (iterator.hasNext()){
if (iterator.next().getName().equals(entry.getName())){
iterator.remove();
}
}
l.setSettingEntries(entry.getKind(), lst);
deleted = true;
}
}
}
if(deleted){
CCorePlugin.getDefault().setProjectDescription(project, desc);
return Services.getMessage("entry.deleted");
}
return Services.getMessage("entry.not.found", entry.getName());
}