Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Remove 'Static Web Project' from CNF view
Remove 'Static Web Project' from CNF view [message #757313] Thu, 17 November 2011 11:15 Go to next message
Mark Walters is currently offline Mark Walters
Messages: 25
Registered: June 2011
Junior Member
Hi,
we're using the Common Navigator Framework for our main project explorer view and if I right click in the view without a selection, I'm always offered 'Static Web Project' in the 'New' menu.

Plugin menu spy says it's contributed by 'WizardShortCutAction'.

How can I prevent this from being contributed?

It isn't contributed in the 'File' 'New' menu, only from the context menu and only when we don't have a selection.

Thanks,
Mark.
Re: Remove 'Static Web Project' from CNF view [message #813596 is a reply to message #757313] Mon, 05 March 2012 08:35 Go to previous message
Mark Walters is currently offline Mark Walters
Messages: 25
Registered: June 2011
Junior Member
I had to subclass all the behaviour of org.eclipse.ui.internal.navigator.resources.actions.NewActionProvider and remove
<actionExtension pattern="org.eclipse.ui.navigator.resources.NewActions" /> from the viewerActionBinding and create my own action provider:

<actionProvider
class="com.thing.ui.commands.WBENewActionProvider"
id="com.thing.ui.NewActions">
<enablement>
<or>
<adapt type="org.eclipse.core.resources.IResource" />
<adapt type="java.util.Collection">
<count value="0" />
</adapt>
</or>
</enablement>
</actionProvider>

Not the easiest and had to ignore all the discouraged access warnings as usual.
Previous Topic:Why org.eclipse.equinox.simpleconfigurator/bundles.info can not be updated based on the plugins
Next Topic:TodoTaskPreferencePage for another plugin that JDT
Goto Forum:
  


Current Time: Wed Aug 20 04:48:19 EDT 2014

Powered by FUDForum. Page generated in 0.12806 seconds