Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator Standard Menu Options and Custom Models
Common Navigator Standard Menu Options and Custom Models [message #494412] Fri, 30 October 2009 14:47 Go to next message
Terran Gilman is currently offline Terran Gilman
Messages: 67
Registered: July 2009
Member
Hello,

I am working on converting the Voice Tools Project navigator view over to the common navigator framework. The content will be displayed in the standard Project Explorer rather than a new view instance.

We use a custom object model to represent much of our project structure, however most of the objects are backed by file system resources. Each object that can map to a physical resource is adaptable to IResource (IFile/IFolder).

The issue I'm having is that the standard context menu items are not present when selecting one of these objects, or more specifically only a small portion of them. The context menu does have:

- Remove From Context
------------------------------------
- Validate
- Team >
- Compare With >
- Replace With >
- Restore from Local History...

I was hoping to inherit the standard items like Open, Open With, New, Refactor, Cut/Copy/Paste, and the like. I've looked at both the JDT and CDT contributions to this view and can't seem to pin down what I'm missing.

My content extension does use the override element with the base navigator resource as it's parent. My content provider also implements the IPipelinedTreeContentProvider and intercepts the structure at the IProject level when retrieving its children by replacing them with the equivalent objects from our custom model.

Thanks for your time,

Trip Gilman
Voice Tools Project Lead
Re: Common Navigator Standard Menu Options and Custom Models [message #494432 is a reply to message #494412] Fri, 30 October 2009 15:33 Go to previous messageGo to next message
Terran Gilman is currently offline Terran Gilman
Messages: 67
Registered: July 2009
Member
After searching this new group some some I came across Post #336095 (not sure how to link in these messages). I followed the last reply to that thread and added the existing new action provider to my navigatorContent declaration with a new enablement clause that matched on of our model objects and the New content menu group was now present.

Why would this approach work but the enablement expression of the original actionProvider should match my object, as it is adaptable to IResource, doesn't seem to activate the menu group? Anyone have any clues about this? I would rather not duplicate all the existing actionProvider entries in my navigatorContent contribution as this would not stay in synch as new groups are added and contributed by others.

Trip Gilman
Voice Tools Project Lead
Re: Common Navigator Standard Menu Options and Custom Models [message #499488 is a reply to message #494412] Mon, 23 November 2009 00:53 Go to previous message
Francis Upton IV is currently offline Francis Upton IV
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
The pattern element supports regexps just for this purpose. WIll that help you?

Previous Topic:Override PropertiesActionProvider in Navigator
Next Topic:New-Wizard shortcuts in Project Explorer missing
Goto Forum:
  


Current Time: Sun Sep 21 02:17:59 GMT 2014

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

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