@Override public String getLabel() { return wizardDescriptor.getLabel() + separator + wizardDescriptor.getDescription(); }
private void addParameterValues(Map values, IWizardCategory wizardCategory) { for (final IWizardDescriptor wizardDescriptor : wizardCategory.getWizards()) { // 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); } for (final IWizardCategory childCategory : wizardCategory.getCategories()) { addParameterValues(values, childCategory); } }
@Override public void updateElement(UIElement element, Map parameters) { String wizardId = (String) parameters.get(getWizardIdParameterId()); if (wizardId == null) return; IWizardDescriptor wizard = getWizardRegistry().findWizard(wizardId); if (wizard != null) { element.setText(NLS.bind(WorkbenchMessages.WizardHandler_menuLabel, wizard.getLabel())); element.setTooltip(wizard.getDescription()); element.setIcon(wizard.getImageDescriptor()); } }
/** * Create an instance of this class. * * @param window the workbench window in which this action will appear * @param wizardDesc a wizard element */ public NewWizardShortcutAction(IWorkbenchWindow window, IWizardDescriptor wizardDesc) { super(wizardDesc.getLabel()); setToolTipText(wizardDesc.getDescription()); setImageDescriptor(wizardDesc.getImageDescriptor()); setId(ActionFactory.NEW.getId()); wizardElement = wizardDesc; this.window = window; }
/** * * @param aWindow * The window to use for the shell and selection service. * @param aDescriptor * The descriptor with information for triggering the desired * wizard. */ public WizardShortcutAction(IWorkbenchWindow aWindow, IWizardDescriptor aDescriptor) { super(aDescriptor.getLabel()); descriptor = aDescriptor; setToolTipText(descriptor.getDescription()); setImageDescriptor(descriptor.getImageDescriptor()); setId(ActionFactory.NEW.getId()); this.window = aWindow; }