Examples of ICConfigurationDescription


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

      CoreModel.getDefault().getProjectDescriptionManager();
    //manager.updateProjectDescriptions(new IProject[]{project}, null);

    ICProjectDescription desc = manager.getProjectDescription(project, false);

    ICConfigurationDescription config = desc.getDefaultSettingConfiguration();
    PathEntryTranslator.PathEntryCollector cr =
      PathEntryTranslator.collectEntries(project, config);

    IPathEntry[] entries = cr.getEntries(
        PathEntryTranslator.INCLUDE_USER, config);
View Full Code Here

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

      // Set the environment variables
      ICProjectDescription prjDesc = CoreModel.getDefault().getProjectDescription(project);

      for (int i = 0; i < cfgNamesAndTCIds.size(); i++) {
    ICConfigurationDescription configurationDescription = prjDesc.getConfigurationByName(cfgNamesAndTCIds.get(i).Name);
    mArduinoPage.saveAllSelections(configurationDescription);
    ArduinoHelpers.setTheEnvironmentVariables(project, configurationDescription, cfgNamesAndTCIds.get(i).DebugCompilerSettings);
      }

      // Set the path variables
      ArduinoHelpers.setProjectPathVariables(project, mArduinoPage.getPlatformFolder());

      // Intermediately save or the adding code will fail
      // Release is the active config (as that is the "IDE" Arduino type....)
      ICConfigurationDescription defaultConfigDescription = prjDesc.getConfigurationByName(cfgNamesAndTCIds.get(0).Name);
      prjDesc.setActiveConfiguration(defaultConfigDescription);

      // Insert The Arduino Code
      // NOTE: Not duplicated for debug (the release reference is just to get at some environment variables)
      ArduinoHelpers.addArduinoCodeToProject(project, defaultConfigDescription);

      //
      // add the correct files to the project
      //
      mNewArduinoSketchWizardCodeSelectionPage.createFiles(project, monitor);
      //
      // add the libraries to the project if needed
      //
      mNewArduinoSketchWizardCodeSelectionPage.importLibraries(project, prjDesc.getConfigurations());

      ICResourceDescription cfgd = defaultConfigDescription.getResourceDescription(new Path(""), true);
      ICExclusionPatternPathEntry[] entries = cfgd.getConfiguration().getSourceEntries();
      if (entries.length == 1) {
    Path exclusionPath[] = new Path[2];
    exclusionPath[0] = new Path("Libraries/*/?xamples");
    exclusionPath[1] = new Path("Libraries/*/?xtras");
 
View Full Code Here

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

     */
    public static void addIncludeFolder(IProject project, IPath IncludePath) {
  // find all languages
  ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
  ICProjectDescription projectDescription = mngr.getProjectDescription(project, true);
  ICConfigurationDescription configurationDescription = projectDescription.getDefaultSettingConfiguration();
  addIncludeFolder(configurationDescription, IncludePath);

  projectDescription.setActiveConfiguration(configurationDescription);
  projectDescription.setCdtProjectCreated();
  try {
View Full Code Here

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

     */
    @Override
    public boolean performFinish() {
  IProject project = mFolderSelectionPage.getProject();
  ICProjectDescription projectDescription = CoreModel.getDefault().getProjectDescription(project);
  ICConfigurationDescription configurationDescriptions[] = projectDescription.getConfigurations();

  for (int curConfigurationDescription = 0; curConfigurationDescription < configurationDescriptions.length; curConfigurationDescription++) {
      try {
    ArduinoHelpers.addCodeFolder(project, new Path(mFolderSelectionPage.GetLibraryFolder()),
      configurationDescriptions[curConfigurationDescription]);
View Full Code Here

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

    }

    private void importLibs(String PathVarName, TreeItem[] AllItems) {
  ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
  ICProjectDescription projectDescription = mngr.getProjectDescription(myProject, true);
  ICConfigurationDescription configurationDescriptions[] = projectDescription.getConfigurations();

  for (TreeItem CurItem : AllItems) {
      if (CurItem.getChecked()) {
    try {
        ArduinoHelpers.addCodeFolder(myProject, PathVarName, CurItem.getText(), ArduinoConst.WORKSPACE_LIB_FOLDER + CurItem.getText(),
View Full Code Here

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

    cfg.setArtifactName("${ProjName}");
      } else {
    System.out.println("Messages.StdProjectTypeHandler_3");
      }
      CConfigurationData data = cfg.getConfigurationData();
      ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);

      setDefaultLanguageSettingsProviders(project, alCfgs.get(i), cfg, cfgDes);
  }
  monitor.worked(50);
  mngr.setProjectDescription(project, des);
View Full Code Here

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

    }

    private void saveAllSelections() {
  if (page != null) {
      ICConfigurationDescription confdesc = getResDesc().getConfiguration();
      if (confdesc instanceof ICMultiConfigDescription) {
    ICMultiConfigDescription multiConfDesc = (ICMultiConfigDescription) confdesc;
    ICConfigurationDescription confdescs[] = (ICConfigurationDescription[]) multiConfDesc.getItems();
    for (int curdesc = 0; curdesc < confdescs.length; curdesc++) {
        saveAllSelections(confdescs[curdesc]);
    }
      } else {
    saveAllSelections(confdesc);
View Full Code Here

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

  String uploadPort = ArduinoInstancePreferences.getLastUsedUploadPort();
  String uploadProtocol = ArduinoInstancePreferences.getLastUsedUploadProgrammer();

  if (page != null) {

      ICConfigurationDescription confdesc = getResDesc().getConfiguration();
      boardFile = Common.getBuildEnvironmentVariable(confdesc, ArduinoConst.ENV_KEY_JANTJE_BOARDS_FILE, boardFile);
      boardName = Common.getBuildEnvironmentVariable(confdesc, ArduinoConst.ENV_KEY_JANTJE_BOARD_NAME, boardName);
      uploadPort = Common.getBuildEnvironmentVariable(confdesc, ArduinoConst.ENV_KEY_JANTJE_COM_PORT, uploadPort);
      uploadProtocol = Common.getBuildEnvironmentVariable(confdesc, ArduinoConst.ENV_KEY_JANTJE_COM_PROG, uploadProtocol);
  }
View Full Code Here

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

  ICProjectDescription prjDesc = CoreModel.getDefault().getProjectDescription(currentProject);

  IEnvironmentVariableManager envManager = CCorePlugin.getDefault().getBuildEnvironmentManager();
  // IContributedEnvironment contribEnv =
  // envManager.getContributedEnvironment();
  ICConfigurationDescription confDesc = prjDesc.getActiveConfiguration();
  // Bug fix for CDT 8.1 fixed in 8.2
  IFolder buildFolder = currentProject.getFolder(confDesc.getName());
  if (!buildFolder.exists()) {
      try {
    buildFolder.create(true, true, null);
      } catch (CoreException e) {
    Common.log(new Status(IStatus.ERROR, ArduinoConst.CORE_PLUGIN_ID, "failed to create folder " + confDesc.getName(), e));
      }
  }
  // End of Bug fix for CDT 8.1 fixed in 8.2
  if (languageId.equals("org.eclipse.cdt.core.gcc")) {
      compilerCommand = envManager.getVariable(ArduinoConst.ENV_KEY_recipe_c_o_pattern, confDesc, true).getValue().replace(" -o ", " ");
View Full Code Here

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

  srcEntries = config.getSourceEntries();
  if (srcEntries.length == 0) {
      srcEntries = new ICSourceEntry[] { new CSourceEntry(Path.EMPTY, null, ICSettingEntry.RESOLVED | ICSettingEntry.VALUE_WORKSPACE_PATH) };
  } else {
      ICConfigurationDescription cfgDes = ManagedBuildManager.getDescriptionForConfiguration(config);
      srcEntries = CDataUtil.resolveEntries(srcEntries, cfgDes);
  }
    }
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.