Search in sources :

Example 1 with WorkbenchWizardElement

use of org.eclipse.ui.internal.dialogs.WorkbenchWizardElement in project egit by eclipse.

the class GitRepositoriesViewTest method removeSmartImportWizardToForceGitImportWizardUsage.

private static void removeSmartImportWizardToForceGitImportWizardUsage() throws Exception {
    final String smartImportWizardId = "org.eclipse.e4.ui.importer.wizard";
    AbstractExtensionWizardRegistry wizardRegistry = (AbstractExtensionWizardRegistry) PlatformUI.getWorkbench().getImportWizardRegistry();
    IWizardCategory[] categories = PlatformUI.getWorkbench().getImportWizardRegistry().getRootCategory().getCategories();
    for (IWizardDescriptor wizard : getAllWizards(categories)) {
        if (wizard.getId().equals(smartImportWizardId)) {
            WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard;
            wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), new Object[] { wizardElement });
            return;
        }
    }
}
Also used : IWizardDescriptor(org.eclipse.ui.wizards.IWizardDescriptor) AbstractExtensionWizardRegistry(org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry) IWizardCategory(org.eclipse.ui.wizards.IWizardCategory) WorkbenchWizardElement(org.eclipse.ui.internal.dialogs.WorkbenchWizardElement)

Aggregations

WorkbenchWizardElement (org.eclipse.ui.internal.dialogs.WorkbenchWizardElement)1 AbstractExtensionWizardRegistry (org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry)1 IWizardCategory (org.eclipse.ui.wizards.IWizardCategory)1 IWizardDescriptor (org.eclipse.ui.wizards.IWizardDescriptor)1