Package org.eclipse.cdt.core.settings.model

Examples of org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry


    IProject project = ProjectUtils.getProject(projectName);
    ICProjectDescription desc =
      CCorePlugin.getDefault().getProjectDescription(project, true);
    ICConfigurationDescription[] configs = desc.getConfigurations();
    ICLanguageSettingEntry entry = createEntry(commandLine);

    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());
          lst.add(entry);
          l.setSettingEntries(entry.getKind(), lst);
        }
      }
    }

    CCorePlugin.getDefault().setProjectDescription(project, desc);
View Full Code Here


    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());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.