Пример #1
0
  /**
   * This constructor is called to create a projectType defined by an extension point in a plugin
   * manifest file.
   */
  public ProjectType(IManagedConfigElement element, String managedBuildRevision) {
    // setup for resolving
    resolved = false;

    setManagedBuildRevision(managedBuildRevision);

    loadFromManifest(element);

    // Hook me up to the Managed Build Manager
    ManagedBuildManager.addExtensionProjectType(this);

    // Load the configuration children
    IManagedConfigElement[] configs =
        element.getChildren(IConfiguration.CONFIGURATION_ELEMENT_NAME);

    String[] usedConfigNames = new String[configs.length];
    IConfigurationNameProvider configurationNameProvder = getConfigurationNameProvider();

    if (configurationNameProvder != null) {
      // Tool Integrator provided 'ConfigurationNameProvider' class
      // to get configuration names dynamically based architecture, os, toolchain version etc.
      for (int n = 0; n < configs.length; ++n) {
        Configuration config = new Configuration(this, configs[n], managedBuildRevision);
        String newConfigName =
            configurationNameProvder.getNewConfigurationName(config, usedConfigNames);
        config.setName(newConfigName);
        usedConfigNames[n] = newConfigName;
      }
    } else {
      for (int n = 0; n < configs.length; ++n) {
        Configuration config = new Configuration(this, configs[n], managedBuildRevision);
      }
    }
  }
Пример #2
0
  /**
   * This constructor is called to create a resource configuration defined by an extension point in
   * a plugin manifest file, or returned by a dynamic element provider
   *
   * @param parent The IConfiguration parent of this resource configuration
   * @param element The resource configuration definition from the manifest file or a dynamic
   *     element provider
   */
  public ResourceConfiguration(
      IConfiguration parent, IManagedConfigElement element, String managedBuildRevision) {
    super(parent, element, true);
    isExtensionResourceConfig = true;

    // setup for resolving
    resolved = false;

    setManagedBuildRevision(managedBuildRevision);
    loadFromManifest(element);

    // Hook me up to the Managed Build Manager
    ManagedBuildManager.addExtensionResourceConfiguration(this);

    // Load the tool children
    IManagedConfigElement[] tools = element.getChildren(ITool.TOOL_ELEMENT_NAME);
    for (int n = 0; n < tools.length; ++n) {
      Tool toolChild = new Tool(this, tools[n], getManagedBuildRevision());
      getToolList().add(toolChild);
      getToolMap().put(toolChild.getId(), toolChild);
    }

    setDirty(false);
  }
 public BooleanExpressionApplicabilityCalculator(IManagedConfigElement optionElement) {
   this(optionElement.getChildren(OptionEnablementExpression.NAME));
 }