private void addParameterValues(Map values, IWizardCategory wizardCategory) {

    final IWizardDescriptor[] wizardDescriptors = wizardCategory.getWizards();
    for (int i = 0; i < wizardDescriptors.length; i++) {
      final IWizardDescriptor wizardDescriptor = wizardDescriptors[i];

      // Note: using description instead of label for the name
      // to reduce possibilities of key collision in the map
      // final String name = wizardDescriptor.getDescription();

      // by request
      String name = wizardDescriptor.getLabel();
      final String id = wizardDescriptor.getId();
      final String value = (String) values.get(name);
      if (value != null && !value.equals(id)) {
        name = name + " (" + id + ")"; // $NON-NLS-1$//$NON-NLS-2$
      }
      values.put(name, id);
    }

    final IWizardCategory[] childCategories = wizardCategory.getCategories();
    for (int i = 0; i < childCategories.length; i++) {
      final IWizardCategory childCategory = childCategories[i];
      addParameterValues(values, childCategory);
    }
  }
Esempio n. 2
0
 public String getLabel() {
   return delegate.getLabel();
 }