Example #1
0
  /**
   * Create a <code>ResourceConfiguration</code> based on the specification stored in the project
   * file (.cdtbuild).
   *
   * @param parent The <code>IConfiguration</code> the resource configuration will be added to.
   * @param element The XML element that contains the resource configuration settings.
   */
  public ResourceConfiguration(
      IConfiguration parent, ICStorageElement element, String managedBuildRevision) {
    super(parent, element, true);
    isExtensionResourceConfig = false;
    setResourceData(new BuildFileData(this));

    setManagedBuildRevision(managedBuildRevision);
    // Initialize from the XML attributes
    loadFromProject(element);

    // Load children
    ICStorageElement configElements[] = element.getChildren();
    for (int i = 0; i < configElements.length; ++i) {
      ICStorageElement configElement = configElements[i];
      if (configElement.getName().equals(ITool.TOOL_ELEMENT_NAME)) {
        Tool tool = new Tool(this, configElement, getManagedBuildRevision());
        addTool(tool);
      }
    }

    String rebuild = PropertyManager.getInstance().getProperty(this, REBUILD_STATE);
    if (rebuild == null || Boolean.valueOf(rebuild).booleanValue()) setRebuildState(true);
    setDirty(false);
  }