[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: "Open" menu action in Project Explorer

"Open" is a retargetable action already defined under 
org.eclipse.ui.navigator.ICommonActionConstants.OPEN

A very direct guide on how to override the "open" action in context menu of 
project explorer is given here: 
http://scribbledideas.blogspot.com/2006/06/building-common-navigator-_115067357450703178.html

You can specify in the <enablement> tags for the "Open" action provider the 
IFile clause or your projectNature check so that your Open is called only 
when the file with your projectNature is selected.

Hope this helps,
Rahul

"Derek R." <spadge248@xxxxxxxxx> wrote in message 
news:bebbee45c1427d37979c7fd25ef91f26$1@xxxxxxxxxxxxxxxxxx
> Hello,
>
> I am trying to override the "Open" action in the context menu of the 
> Project Explorer to use my own custom action instead, which opens a 
> resource in a custom editor and sets additional properties as well.
>
> I am not sure which extension point to use for this - my initial thought 
> would be popupMenus.
>
> The resources of interest are of type IFile, and have no extension because 
> they are linked to a file system that does not require an extension.  They 
> are of a certain Project Nature type, however - but I am not sure how to 
> check for this in an extension point.  I only want the "Open" action to be 
> overridden for files within projects of my custom Nature.
>
> Any help will be appreciated.
>
> Thanks,
> Derek
>
>