|
Re: Hide existing wizard entries from File > New Wizard [message #1396613 is a reply to message #1392533] |
Tue, 08 July 2014 10:53  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03887 seconds