Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Context Sensitive New-wizard
Context Sensitive New-wizard [message #605906] Tue, 01 June 2010 19:46
Troy Nichols is currently offline Troy NicholsFriend
Messages: 28
Registered: July 2009
Junior Member
Hello,

Question about how to make the available "New..." wizards in the
(right-click) popup context menu (Package Explorer) context-sensitive,
i.e. available wizards are filtered based on what resource is currently
selected in Package Explorer.

We have a set of plugins that contributes our own perspective. Part of
our tooling includes adding some New wizard extensions, via the
org.eclipse.ui.newWizards extension point. We have created our own
category for these wizards, and they show up in the expected way if go
into File > New > Other... and find them under our category.

To get the wizards to show up in the right-click context menu, we are
calling some code like this in our Perspective class's
createInitialLayout() method:

layout.addNewWizardShortcut(SOME_WIZARD_ID);

There are about 15 new-wizards in all, and currently they always show up
in the File > New menu, no matter what kind of resource is selected.
Certain wizards really only apply to certain kinds of resources though,
so we would like to be able to filter based on type. This is how it
works in JDT, for instance, so it does seem to be possible (e.g. if you
have selected a Java resource, get the option to pick some Java-related
wizards, etc).

What is the best way to filter which wizards show up in File > New based
on the type of resource currently selected?
Previous Topic:Context Sensitive New-wizard
Next Topic:Eclipse minimal with my plugin
Goto Forum:
  


Current Time: Fri Apr 26 05:06:29 GMT 2024

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

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

Back to the top