Examples of ICLanguageSetting


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

  ICFolderDescription folderDescription = configurationDescription.getRootFolderDescription();
  ICLanguageSetting[] languageSettings = folderDescription.getLanguageSettings();

  // Add include path to all languages
  for (int idx = 0; idx < languageSettings.length; idx++) {
      ICLanguageSetting lang = languageSettings[idx];
      String LangID = lang.getLanguageId();
      if (LangID != null) {
    if (LangID.startsWith("org.eclipse.cdt.")) { //$NON-NLS-1$
        ICLanguageSettingEntry[] OrgIncludeEntries = lang.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
        ICLanguageSettingEntry[] IncludeEntries = new ICLanguageSettingEntry[OrgIncludeEntries.length + 1];
        System.arraycopy(OrgIncludeEntries, 0, IncludeEntries, 0, OrgIncludeEntries.length);
        IncludeEntries[OrgIncludeEntries.length] = new CIncludePathEntry(IncludePath, ICSettingEntry.VALUE_WORKSPACE_PATH); // (location.toString());
        lang.setSettingEntries(ICSettingEntry.INCLUDE_PATH, IncludeEntries);
    }
      }
  }
    }
View Full Code Here

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

  ICFolderDescription folderDescription = configurationDescription.getRootFolderDescription();
  ICLanguageSetting[] languageSettings = folderDescription.getLanguageSettings();
  boolean hasChange = false;
  // Add include path to all languages
  for (int idx = 0; idx < languageSettings.length; idx++) {
      ICLanguageSetting lang = languageSettings[idx];
      String LangID = lang.getLanguageId();
      if (LangID != null) {
    if (LangID.startsWith("org.eclipse.cdt.")) { //$NON-NLS-1$
        ICLanguageSettingEntry[] OrgIncludeEntries = lang.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
        ICLanguageSettingEntry[] OrgIncludeEntriesFull = lang.getResolvedSettingEntries(ICSettingEntry.INCLUDE_PATH);
        int copiedEntry = 0;
        for (int curEntry = 0; curEntry < OrgIncludeEntries.length; curEntry++) {
      IPath cusPath = ((CIncludePathEntry) OrgIncludeEntriesFull[curEntry]).getFullPath();
      if ((ResourcesPlugin.getWorkspace().getRoot().exists(cusPath))
        || (((CIncludePathEntry) OrgIncludeEntries[curEntry]).isBuiltIn())) {
          OrgIncludeEntries[copiedEntry++] = OrgIncludeEntries[curEntry];
      }
        }
        if (copiedEntry != OrgIncludeEntries.length) // do not save
                 // if nothing
                 // has changed
        {
      ICLanguageSettingEntry[] IncludeEntries = new ICLanguageSettingEntry[copiedEntry];
      System.arraycopy(OrgIncludeEntries, 0, IncludeEntries, 0, copiedEntry);
      lang.setSettingEntries(ICSettingEntry.INCLUDE_PATH, IncludeEntries);
      hasChange = true;
        }
    }
      }
  }
View Full Code Here

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

        ICFolderDescription folderDescription = configurationDescriptions[curConfigDescription].getRootFolderDescription();
        ICLanguageSetting[] languageSettings = folderDescription.getLanguageSettings();

        // Add include path to all languages
        for (int idx = 0; idx < languageSettings.length; idx++) {
      ICLanguageSetting lang = languageSettings[idx];
      String LangID = lang.getLanguageId();
      if (LangID != null) {
          if (LangID.startsWith("org.eclipse.cdt.")) { //$NON-NLS-1$
        boolean languageChanged = false;
        ICLanguageSettingEntry[] IncludeEntries = lang.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
        for (int curIncludeEntry = 0; curIncludeEntry < IncludeEntries.length; curIncludeEntry++) {
            if (IncludeEntries[curIncludeEntry].getName().startsWith(myOldName)) {
          String newValue = IncludeEntries[curIncludeEntry].getName().replace(myOldName, myNewName);
          languageChanged = true;
          projectDescriptionChanged = true;
          IncludeEntries[curIncludeEntry] = new CIncludePathEntry(newValue, ICSettingEntry.VALUE_WORKSPACE_PATH);
            }
        }
        if (languageChanged) {
            lang.setSettingEntries(ICSettingEntry.INCLUDE_PATH, IncludeEntries);
        }
          }
      }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.