Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-13628

Only one JBoss Central Configurator is selected for display

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 4.1.0.Alpha2
    • None
    • central
    • None

      I wanted to contribute Teiid Designer's 'new model project' wizard as a link in the 'Create Projects' section of JBoss Central. link

      However, I found that the list of project wizards is hard-coded in the default configurator [1]. Thus, the only way I can contribute this link is by extending the default configurator and using the configurators extension point[2] to load my configurator.

      This works correctly but if another project decides to do the same thing then their configurator 'could' be loaded instead of mine due to the following logic in [3]:

      ProjectExamplesActivator.java
      // ... ~ Line 1163
      IExtension extension = extensions[0];
      IConfigurationElement[] configurationElements = extension.getConfigurationElements();
      for (int j = 0; j < configurationElements.length; j++) {
        IConfigurationElement configurationElement = configurationElements[j];
        if (CONFIGURATOR.equals(configurationElement.getName())) {
          try {
            configurator = (IJBossCentralConfigurator) configurationElement.createExecutableExtension("class");
          } catch (CoreException e) {
            ProjectExamplesActivator.log(e);
            continue;
          }
          break;
        }
      }
      // ...
      

      Thought an alternative configurator that aggregates all extension-pointed configurators and displays the content of each accordingly.

      Happy to provide a patch if required.

      [1] org.jboss.tools.project.examples.configurators.DefaultJBossCentralConfigurator
      [2] org.jboss.tools.project.examples.configurators
      [3] org.jboss.tools.project.examples.ProjectExamplesActivator.java

            manderse@redhat.com Max Andersen
            parichar@redhat.com Paul Richardson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: