org.eclipse.ui.wizards.IWizardCategory Java Examples
The following examples show how to use
org.eclipse.ui.wizards.IWizardCategory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CleanupHelper.java From gama with GNU General Public License v3.0 | 6 votes |
static void run() { final List<IWizardCategory> cats = new ArrayList<>(); AbstractExtensionWizardRegistry r = (AbstractExtensionWizardRegistry) PlatformUI.getWorkbench().getNewWizardRegistry(); cats.addAll(Arrays.asList(r.getRootCategory().getCategories())); r = (AbstractExtensionWizardRegistry) PlatformUI.getWorkbench().getImportWizardRegistry(); cats.addAll(Arrays.asList(r.getRootCategory().getCategories())); r = (AbstractExtensionWizardRegistry) PlatformUI.getWorkbench().getExportWizardRegistry(); cats.addAll(Arrays.asList(r.getRootCategory().getCategories())); for (final IWizardDescriptor wizard : getAllWizards(cats.toArray(new IWizardCategory[0]))) { final String id = wizard.getCategory().getId(); if (CATEGORIES_TO_REMOVE.contains(id) || IDS_TO_REMOVE.contains(wizard.getId())) { // DEBUG.LOG("Removing wizard " + wizard.getId() + // " in category " + id); final WorkbenchWizardElement element = (WorkbenchWizardElement) wizard; r.removeExtension(element.getConfigurationElement().getDeclaringExtension(), new Object[] { element }); } } }
Example #2
Source File: CleanupHelper.java From gama with GNU General Public License v3.0 | 5 votes |
static private IWizardDescriptor[] getAllWizards(final IWizardCategory[] categories) { final List<IWizardDescriptor> results = new ArrayList<>(); for (final IWizardCategory wizardCategory : categories) { results.addAll(Arrays.asList(wizardCategory.getWizards())); results.addAll(Arrays.asList(getAllWizards(wizardCategory.getCategories()))); } return results.toArray(new IWizardDescriptor[0]); }
Example #3
Source File: ApplicationWorkbenchWindowAdvisor.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
private IWizardDescriptor[] getAllWizards(IWizardCategory... categories) { List<IWizardDescriptor> results = new ArrayList<IWizardDescriptor>(); for (IWizardCategory wizardCategory : categories) { results.addAll(Arrays.asList(wizardCategory.getWizards())); results.addAll(Arrays.asList(getAllWizards(wizardCategory.getCategories()))); } return results.toArray(new IWizardDescriptor[0]); }
Example #4
Source File: NewActionProvider.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
/** * Return whether or not any examples are in the current install. * * @return True if there exists a full examples wizard category. */ private boolean hasExamples() { IWizardRegistry newRegistry = PlatformUI.getWorkbench().getNewWizardRegistry(); IWizardCategory category = newRegistry.findCategory(FULL_EXAMPLES_WIZARD_CATEGORY); return category != null; }
Example #5
Source File: ApplicationWorkbenchWindowAdvisor.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
private IWizardDescriptor[] getAllWizards(IWizardCategory... categories) { List<IWizardDescriptor> results = new ArrayList<IWizardDescriptor>(); for (IWizardCategory wizardCategory : categories) { results.addAll(Arrays.asList(wizardCategory.getWizards())); results.addAll(Arrays.asList(getAllWizards(wizardCategory.getCategories()))); } return results.toArray(new IWizardDescriptor[0]); }
Example #6
Source File: NewActionProvider.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
/** * Return whether or not any examples are in the current install. * * @return True if there exists a full examples wizard category. */ private boolean hasExamples() { IWizardRegistry newRegistry = PlatformUI.getWorkbench().getNewWizardRegistry(); IWizardCategory category = newRegistry.findCategory(FULL_EXAMPLES_WIZARD_CATEGORY); return category != null; }