Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Hide existing wizard entries from File > New Wizard(Hide existing wizard entries from File > New Wizard)
Hide existing wizard entries from File > New Wizard [message #1392533] Wed, 02 July 2014 13:23 Go to next message
Michalis Papachristoforou is currently offline Michalis Papachristoforou
Messages: 1
Registered: July 2014
Junior Member
Hello people Smile

I'm trying to create a plugin that will Hide existing wizard entries from File > New wizards and re-populate it with my custom built wizards.

I've searched on Google and came accross the below method snippet...
AbstractExtensionWizardRegistry wizardRegistry = (AbstractExtensionWizardRegistry)PlatformUI.getWorkbench().getNewWizardRegistry();
IWizardCategory[] categories = PlatformUI.getWorkbench().getNewWizardRegistry().getRootCategory().getCategories();
for(IWizardDescriptor wizard : getAllWizards(categories)){
    if(wizard.getCategory().getId().matches("org.eclipse.ui.Basic")){
        WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard;
        wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), new Object[]{wizardElement});
    }
}

...but I really don't know where I should be using it within the project's Activator.java class.

Can anyone point out what should I be doing

I'm OK with creating new project/file wizard plugins but I'm having trouble hiding the already existing wizards as I mentioned earlier.
Re: Hide existing wizard entries from File > New Wizard [message #1396613 is a reply to message #1392533] Tue, 08 July 2014 14:53 Go to previous message
Christophe Bouhier is currently offline Christophe Bouhier
Messages: 919
Registered: July 2009
Senior Member
On 02-07-14 16:05, Michalis Papachristoforou wrote:
> Hello people :)
> I'm trying to create a plugin that will Hide existing wizard entries
Activities is used for this.
http://blog.vogella.com/2009/07/13/eclipse-activities/


> from File > New wizards and re-populate it with my custom built wizards.
>
> I've searched on Google and came accross the below method snippet...
>
> AbstractExtensionWizardRegistry wizardRegistry =
> (AbstractExtensionWizardRegistry)PlatformUI.getWorkbench().getNewWizardRegistry();
>
> IWizardCategory[] categories =
> PlatformUI.getWorkbench().getNewWizardRegistry().getRootCategory().getCategories();
>
> for(IWizardDescriptor wizard : getAllWizards(categories)){
> if(wizard.getCategory().getId().matches("org.eclipse.ui.Basic")){
> WorkbenchWizardElement wizardElement = (WorkbenchWizardElement)
> wizard;
>
> wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(),
> new Object[]{wizardElement});
> }
> }
>
> ..but I really don't know where I should be using it within the
> project's Activator.java class.
>
> Can anyone point out what should I be doing
>
> I'm OK with creating new project/file wizard plugins but I'm having
> trouble hiding the already existing wizards as I mentioned earlier.
Previous Topic:Early startup after workbench was initialized
Next Topic:Runtime Classpath load?
Goto Forum:
  


Current Time: Wed Sep 17 19:40:57 GMT 2014

Powered by FUDForum. Page generated in 0.12233 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software