Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » "Open" menu action in Project Explorer
"Open" menu action in Project Explorer [message #329711] Tue, 01 July 2008 16:40 Go to next message
Derek Rea is currently offline Derek ReaFriend
Messages: 14
Registered: July 2009
Junior Member
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
Re: "Open" menu action in Project Explorer [message #329730 is a reply to message #329711] Wed, 02 July 2008 08:15 Go to previous messageGo to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
"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-n avigator-_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@yahoo.com> wrote in message
news:bebbee45c1427d37979c7fd25ef91f26$1@www.eclipse.org...
> 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
>
>
Re: "Open" menu action in Project Explorer [message #329758 is a reply to message #329730] Wed, 02 July 2008 21:28 Go to previous messageGo to next message
Derek Rea is currently offline Derek ReaFriend
Messages: 14
Registered: July 2009
Junior Member
Thanks for the reply!

The link helped me greatly, thanks for that. I don't quite understand
what is supposed to happen from the code in the article are though - the
author sets the global action handler on the open action, which I assumed
would retarget the Open action in the context menu. I get confused when
the author then appends his custom open action to the "Open Group" of the
context menu - why would this need to be done if he is retargetting the
global Open action? I dont want to add a new action, I want to override
the functionality of the existing one.

I did implement it however, and saw that my open action did not get called
when the Open action was selected in the context menu. When I appended my
action to the "Open Group", my action appeared in the Context menu above
the global open action. Is this correct? Again, I thought my custom
action would just get called when the global action was selected, rather
than adding a new action.

I also am not understanding how to use <enablement> with my action
provider extension - I get as far as "instanceof IFile", but how do I tell
it only IFile's of a certain Project Nature?

Thanks,
Derek
Re: "Open" menu action in Project Explorer [message #329790 is a reply to message #329758] Fri, 04 July 2008 09:34 Go to previous messageGo to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
Hi sorry for a late reply, I happened to check this today only...

Regarding the enablement clause:

<enablement>

<or>

<and>

<adapt type="org.eclipse.core.resources.IResource/IFile" />

<test

property="org.eclipse.core.resources.projectNature"

value="">

</test>

</and>

</or>

</enablement>

You need to add your own action and this needs to go into the "Open Group".
However, if you find that there are two "Open" actions coming up, that is
not the expected behavior. Can you post code from your plugin.xml where you
have contributed the actionProvider and also snippets from your class
implementing the commonActionProvider. Maybe we can identify what's going
wrong.

Rahul


"Derek. R" <spadge248@yahoo.com> wrote in message
news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
> Thanks for the reply!
>
> The link helped me greatly, thanks for that. I don't quite understand
> what is supposed to happen from the code in the article are though - the
> author sets the global action handler on the open action, which I assumed
> would retarget the Open action in the context menu. I get confused when
> the author then appends his custom open action to the "Open Group" of the
> context menu - why would this need to be done if he is retargetting the
> global Open action? I dont want to add a new action, I want to override
> the functionality of the existing one.
>
> I did implement it however, and saw that my open action did not get called
> when the Open action was selected in the context menu. When I appended my
> action to the "Open Group", my action appeared in the Context menu above
> the global open action. Is this correct? Again, I thought my custom
> action would just get called when the global action was selected, rather
> than adding a new action.
>
> I also am not understanding how to use <enablement> with my action
> provider extension - I get as far as "instanceof IFile", but how do I tell
> it only IFile's of a certain Project Nature?
>
> Thanks,
> Derek
>
Re: "Open" menu action in Project Explorer [message #329853 is a reply to message #329790] Tue, 08 July 2008 15:27 Go to previous messageGo to next message
Derek Rea is currently offline Derek ReaFriend
Messages: 14
Registered: July 2009
Junior Member
Here is my plugin.xml code:

<extension point="org.eclipse.ui.navigator.navigatorContent">
<actionProvider
class="my.plugin.name.ui.actions.PropertyActionProvider"
id="my.plugin.name.ui.actions.OpenProvider">
<enablement>
<and>
<instanceof
value="org.eclipse.core.resources.IFile">
</instanceof>
<test
property="org.eclipse.core.resources.projectNature"
value="&apos;my.plugin.name.core.natures.myNature&apos; ">
</test>
</and>
</enablement>
</actionProvider>
</extension>
<extension point="org.eclipse.ui.navigator.viewer">
<viewerActionBinding
viewerId="org.eclipse.ui.navigator.ProjectExplorer">
<includes>
<actionExtension
pattern="my.plugin.name.ui.actions.OpenProvider">
</actionExtension>
</includes>
</viewerActionBinding>
</extension>


This seems to be working, thanks for the example below. I still see my
open action along with the global open action, however. Here is a snippet
of my commonActionProvider:


public class PropertyActionProvider extends CommonActionProvider
{
OpenEditorAction m_openAction;
.
.
.
.

public void fillActionBars(IActionBars actionBars)
{
if (m_openAction.isEnabled())
{
actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
m_openAction);
}

public void fillContextMenu(IMenuManager menu)
{
if (m_openAction.isEnabled())
{
menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN, m_openAction);
}
}
}


It is very similar to the example given in the article you suggested,
which is why I am stumped as to what is wrong.

Thanks,
Derek


Rahul Kamdar wrote:

> Hi sorry for a late reply, I happened to check this today only...

> Regarding the enablement clause:

> <enablement>

> <or>

> <and>

> <adapt type="org.eclipse.core.resources.IResource/IFile" />

> <test

> property="org.eclipse.core.resources.projectNature"

> value="">

> </test>

> </and>

> </or>

> </enablement>

> You need to add your own action and this needs to go into the "Open Group".
> However, if you find that there are two "Open" actions coming up, that is
> not the expected behavior. Can you post code from your plugin.xml where you
> have contributed the actionProvider and also snippets from your class
> implementing the commonActionProvider. Maybe we can identify what's going
> wrong.

> Rahul


> "Derek. R" <spadge248@yahoo.com> wrote in message
> news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
>> Thanks for the reply!
>>
>> The link helped me greatly, thanks for that. I don't quite understand
>> what is supposed to happen from the code in the article are though - the
>> author sets the global action handler on the open action, which I assumed
>> would retarget the Open action in the context menu. I get confused when
>> the author then appends his custom open action to the "Open Group" of the
>> context menu - why would this need to be done if he is retargetting the
>> global Open action? I dont want to add a new action, I want to override
>> the functionality of the existing one.
>>
>> I did implement it however, and saw that my open action did not get called
>> when the Open action was selected in the context menu. When I appended my
>> action to the "Open Group", my action appeared in the Context menu above
>> the global open action. Is this correct? Again, I thought my custom
>> action would just get called when the global action was selected, rather
>> than adding a new action.
>>
>> I also am not understanding how to use <enablement> with my action
>> provider extension - I get as far as "instanceof IFile", but how do I tell
>> it only IFile's of a certain Project Nature?
>>
>> Thanks,
>> Derek
>>
Re: "Open" menu action in Project Explorer [message #329901 is a reply to message #329853] Thu, 10 July 2008 09:19 Go to previous messageGo to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
In your plugin.xml, put the following and see:
overrides="org.eclipse.ui.navigator.resources.OpenActions"

This should be in the actionProvider declaration after you declare the class
and id... so:
<extension point="....navigatorContent">
<actionProvider
class="..."
id="....."
overrides="org.eclipse.ui.navigator.resources.OpenActions">

Try this and let me know. Rest of the code looks fine.

Rahul

"Derek R." <spadge248@yahoo.com> wrote in message
news:5d6913f6a98a9c197e53c44f9703c4b8$1@www.eclipse.org...
> Here is my plugin.xml code:
>
> <extension point="org.eclipse.ui.navigator.navigatorContent">
> <actionProvider
> class="my.plugin.name.ui.actions.PropertyActionProvider"
> id="my.plugin.name.ui.actions.OpenProvider">
> <enablement>
> <and>
> <instanceof
> value="org.eclipse.core.resources.IFile">
> </instanceof>
> <test
> property="org.eclipse.core.resources.projectNature"
> value="&apos;my.plugin.name.core.natures.myNature&apos; ">
> </test>
> </and>
> </enablement>
> </actionProvider>
> </extension>
> <extension point="org.eclipse.ui.navigator.viewer">
> <viewerActionBinding
> viewerId="org.eclipse.ui.navigator.ProjectExplorer">
> <includes>
> <actionExtension
> pattern="my.plugin.name.ui.actions.OpenProvider">
> </actionExtension>
> </includes>
> </viewerActionBinding>
> </extension>
>
>
> This seems to be working, thanks for the example below. I still see my
> open action along with the global open action, however. Here is a snippet
> of my commonActionProvider:
>
>
> public class PropertyActionProvider extends CommonActionProvider
> {
> OpenEditorAction m_openAction;
> .
> .
> .
> .
>
> public void fillActionBars(IActionBars actionBars)
> {
> if (m_openAction.isEnabled())
> {
> actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
> m_openAction);
> }
>
> public void fillContextMenu(IMenuManager menu)
> {
> if (m_openAction.isEnabled())
> {
> menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN, m_openAction);
> }
> }
> }
>
>
> It is very similar to the example given in the article you suggested,
> which is why I am stumped as to what is wrong.
>
> Thanks,
> Derek
>
>
> Rahul Kamdar wrote:
>
>> Hi sorry for a late reply, I happened to check this today only...
>
>> Regarding the enablement clause:
>
>> <enablement>
>
>> <or>
>
>> <and>
>
>> <adapt type="org.eclipse.core.resources.IResource/IFile" />
>
>> <test
>
>> property="org.eclipse.core.resources.projectNature"
>
>> value="">
>
>> </test>
>
>> </and>
>
>> </or>
>
>> </enablement>
>
>> You need to add your own action and this needs to go into the "Open
>> Group". However, if you find that there are two "Open" actions coming up,
>> that is not the expected behavior. Can you post code from your plugin.xml
>> where you have contributed the actionProvider and also snippets from your
>> class implementing the commonActionProvider. Maybe we can identify what's
>> going wrong.
>
>> Rahul
>
>
>> "Derek. R" <spadge248@yahoo.com> wrote in message
>> news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
>>> Thanks for the reply!
>>>
>>> The link helped me greatly, thanks for that. I don't quite understand
>>> what is supposed to happen from the code in the article are though - the
>>> author sets the global action handler on the open action, which I
>>> assumed would retarget the Open action in the context menu. I get
>>> confused when the author then appends his custom open action to the
>>> "Open Group" of the context menu - why would this need to be done if he
>>> is retargetting the global Open action? I dont want to add a new
>>> action, I want to override the functionality of the existing one.
>>>
>>> I did implement it however, and saw that my open action did not get
>>> called when the Open action was selected in the context menu. When I
>>> appended my action to the "Open Group", my action appeared in the
>>> Context menu above the global open action. Is this correct? Again, I
>>> thought my custom action would just get called when the global action
>>> was selected, rather than adding a new action.
>>>
>>> I also am not understanding how to use <enablement> with my action
>>> provider extension - I get as far as "instanceof IFile", but how do I
>>> tell it only IFile's of a certain Project Nature?
>>>
>>> Thanks,
>>> Derek
>>>
>
>
Re: "Open" menu action in Project Explorer [message #329917 is a reply to message #329901] Thu, 10 July 2008 15:10 Go to previous messageGo to next message
Derek Rea is currently offline Derek ReaFriend
Messages: 14
Registered: July 2009
Junior Member
Rahul,

I added the overrides and nothing changed. However, when I add that as
well as priority="high"> or priority="higher">, it does work...not sure
why this is, but it works.

Also, when I say "it works", I mean both the Open and Open With menu
actions are replaced by my custom open action. This is not what I
expected though - I want the context menu to contain my custom open action
and the Open With action. Basically I just want to just retarget the Open
action and nothing else... is this possible or do I have to retarget the
Open With action as well?

Thanks much for the help,
Derek


Rahul Kamdar wrote:

> In your plugin.xml, put the following and see:
> overrides="org.eclipse.ui.navigator.resources.OpenActions"

> This should be in the actionProvider declaration after you declare the class
> and id... so:
> <extension point="....navigatorContent">
> <actionProvider
> class="..."
> id="....."
> overrides="org.eclipse.ui.navigator.resources.OpenActions">

> Try this and let me know. Rest of the code looks fine.

> Rahul

> "Derek R." <spadge248@yahoo.com> wrote in message
> news:5d6913f6a98a9c197e53c44f9703c4b8$1@www.eclipse.org...
>> Here is my plugin.xml code:
>>
>> <extension point="org.eclipse.ui.navigator.navigatorContent">
>> <actionProvider
>> class="my.plugin.name.ui.actions.PropertyActionProvider"
>> id="my.plugin.name.ui.actions.OpenProvider">
>> <enablement>
>> <and>
>> <instanceof
>> value="org.eclipse.core.resources.IFile">
>> </instanceof>
>> <test
>> property="org.eclipse.core.resources.projectNature"
>> value="&apos;my.plugin.name.core.natures.myNature&apos; ">
>> </test>
>> </and>
>> </enablement>
>> </actionProvider>
>> </extension>
>> <extension point="org.eclipse.ui.navigator.viewer">
>> <viewerActionBinding
>> viewerId="org.eclipse.ui.navigator.ProjectExplorer">
>> <includes>
>> <actionExtension
>> pattern="my.plugin.name.ui.actions.OpenProvider">
>> </actionExtension>
>> </includes>
>> </viewerActionBinding>
>> </extension>
>>
>>
>> This seems to be working, thanks for the example below. I still see my
>> open action along with the global open action, however. Here is a snippet
>> of my commonActionProvider:
>>
>>
>> public class PropertyActionProvider extends CommonActionProvider
>> {
>> OpenEditorAction m_openAction;
>> .
>> .
>> .
>> .
>>
>> public void fillActionBars(IActionBars actionBars)
>> {
>> if (m_openAction.isEnabled())
>> {
>> actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
>> m_openAction);
>> }
>>
>> public void fillContextMenu(IMenuManager menu)
>> {
>> if (m_openAction.isEnabled())
>> {
>> menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN, m_openAction);
>> }
>> }
>> }
>>
>>
>> It is very similar to the example given in the article you suggested,
>> which is why I am stumped as to what is wrong.
>>
>> Thanks,
>> Derek
>>
>>
>> Rahul Kamdar wrote:
>>
>>> Hi sorry for a late reply, I happened to check this today only...
>>
>>> Regarding the enablement clause:
>>
>>> <enablement>
>>
>>> <or>
>>
>>> <and>
>>
>>> <adapt type="org.eclipse.core.resources.IResource/IFile" />
>>
>>> <test
>>
>>> property="org.eclipse.core.resources.projectNature"
>>
>>> value="">
>>
>>> </test>
>>
>>> </and>
>>
>>> </or>
>>
>>> </enablement>
>>
>>> You need to add your own action and this needs to go into the "Open
>>> Group". However, if you find that there are two "Open" actions coming up,
>>> that is not the expected behavior. Can you post code from your plugin.xml
>>> where you have contributed the actionProvider and also snippets from your
>>> class implementing the commonActionProvider. Maybe we can identify what's
>>> going wrong.
>>
>>> Rahul
>>
>>
>>> "Derek. R" <spadge248@yahoo.com> wrote in message
>>> news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
>>>> Thanks for the reply!
>>>>
>>>> The link helped me greatly, thanks for that. I don't quite understand
>>>> what is supposed to happen from the code in the article are though - the
>>>> author sets the global action handler on the open action, which I
>>>> assumed would retarget the Open action in the context menu. I get
>>>> confused when the author then appends his custom open action to the
>>>> "Open Group" of the context menu - why would this need to be done if he
>>>> is retargetting the global Open action? I dont want to add a new
>>>> action, I want to override the functionality of the existing one.
>>>>
>>>> I did implement it however, and saw that my open action did not get
>>>> called when the Open action was selected in the context menu. When I
>>>> appended my action to the "Open Group", my action appeared in the
>>>> Context menu above the global open action. Is this correct? Again, I
>>>> thought my custom action would just get called when the global action
>>>> was selected, rather than adding a new action.
>>>>
>>>> I also am not understanding how to use <enablement> with my action
>>>> provider extension - I get as far as "instanceof IFile", but how do I
>>>> tell it only IFile's of a certain Project Nature?
>>>>
>>>> Thanks,
>>>> Derek
>>>>
>>
>>
Re: "Open" menu action in Project Explorer [message #329946 is a reply to message #329917] Fri, 11 July 2008 06:56 Go to previous messageGo to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
Hi Derek,

Right the priority needs to be set to "high" as well so basically your
extension gets the highest priority over other navigator content extensions
made by other plug-ins.

When you override the Open action you are going to override the "Open With"
action/menu as well. I think you might have to provide your own alternative
implementation for "Open With" or you could leverage the existing code for
"Open With.." menu and add that as your alternative implementation.

I am not sure if you can retarget "just" the Open action keeping the native
"Open With... " menu. Most probably you can't do that but just to confirm
maybe you can put a post again in this group with CNF and override Open
action in the Subject line. Someone more experienced might help you out.

Thanks,
Rahul

"Derek R." <spadge248@yahoo.com> wrote in message
news:4c76f0d516c2eca0fea17bcefe8ba0ec$1@www.eclipse.org...
> Rahul,
>
> I added the overrides and nothing changed. However, when I add that as
> well as priority="high"> or priority="higher">, it does work...not sure
> why this is, but it works.
>
> Also, when I say "it works", I mean both the Open and Open With menu
> actions are replaced by my custom open action. This is not what I
> expected though - I want the context menu to contain my custom open action
> and the Open With action. Basically I just want to just retarget the Open
> action and nothing else... is this possible or do I have to retarget the
> Open With action as well?
>
> Thanks much for the help,
> Derek
>
>
> Rahul Kamdar wrote:
>
>> In your plugin.xml, put the following and see:
>> overrides="org.eclipse.ui.navigator.resources.OpenActions"
>
>> This should be in the actionProvider declaration after you declare the
>> class and id... so:
>> <extension point="....navigatorContent">
>> <actionProvider
>> class="..."
>> id="....."
>> overrides="org.eclipse.ui.navigator.resources.OpenActions">
>
>> Try this and let me know. Rest of the code looks fine.
>
>> Rahul
>
>> "Derek R." <spadge248@yahoo.com> wrote in message
>> news:5d6913f6a98a9c197e53c44f9703c4b8$1@www.eclipse.org...
>>> Here is my plugin.xml code:
>>>
>>> <extension point="org.eclipse.ui.navigator.navigatorContent">
>>> <actionProvider
>>> class="my.plugin.name.ui.actions.PropertyActionProvider"
>>> id="my.plugin.name.ui.actions.OpenProvider">
>>> <enablement>
>>> <and>
>>> <instanceof
>>> value="org.eclipse.core.resources.IFile">
>>> </instanceof>
>>> <test
>>> property="org.eclipse.core.resources.projectNature"
>>>
>>> value="&apos;my.plugin.name.core.natures.myNature&apos; ">
>>> </test>
>>> </and>
>>> </enablement>
>>> </actionProvider>
>>> </extension>
>>> <extension point="org.eclipse.ui.navigator.viewer">
>>> <viewerActionBinding
>>> viewerId="org.eclipse.ui.navigator.ProjectExplorer">
>>> <includes>
>>> <actionExtension
>>> pattern="my.plugin.name.ui.actions.OpenProvider">
>>> </actionExtension>
>>> </includes>
>>> </viewerActionBinding>
>>> </extension>
>>>
>>>
>>> This seems to be working, thanks for the example below. I still see my
>>> open action along with the global open action, however. Here is a
>>> snippet of my commonActionProvider:
>>>
>>>
>>> public class PropertyActionProvider extends CommonActionProvider
>>> {
>>> OpenEditorAction m_openAction;
>>> .
>>> .
>>> .
>>> .
>>>
>>> public void fillActionBars(IActionBars actionBars)
>>> {
>>> if (m_openAction.isEnabled())
>>> {
>>> actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
>>> m_openAction);
>>> }
>>>
>>> public void fillContextMenu(IMenuManager menu)
>>> {
>>> if (m_openAction.isEnabled())
>>> {
>>> menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN,
>>> m_openAction);
>>> }
>>> }
>>> }
>>>
>>>
>>> It is very similar to the example given in the article you suggested,
>>> which is why I am stumped as to what is wrong.
>>>
>>> Thanks,
>>> Derek
>>>
>>>
>>> Rahul Kamdar wrote:
>>>
>>>> Hi sorry for a late reply, I happened to check this today only...
>>>
>>>> Regarding the enablement clause:
>>>
>>>> <enablement>
>>>
>>>> <or>
>>>
>>>> <and>
>>>
>>>> <adapt type="org.eclipse.core.resources.IResource/IFile" />
>>>
>>>> <test
>>>
>>>> property="org.eclipse.core.resources.projectNature"
>>>
>>>> value="">
>>>
>>>> </test>
>>>
>>>> </and>
>>>
>>>> </or>
>>>
>>>> </enablement>
>>>
>>>> You need to add your own action and this needs to go into the "Open
>>>> Group". However, if you find that there are two "Open" actions coming
>>>> up, that is not the expected behavior. Can you post code from your
>>>> plugin.xml where you have contributed the actionProvider and also
>>>> snippets from your class implementing the commonActionProvider. Maybe
>>>> we can identify what's going wrong.
>>>
>>>> Rahul
>>>
>>>
>>>> "Derek. R" <spadge248@yahoo.com> wrote in message
>>>> news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
>>>>> Thanks for the reply!
>>>>>
>>>>> The link helped me greatly, thanks for that. I don't quite understand
>>>>> what is supposed to happen from the code in the article are though -
>>>>> the author sets the global action handler on the open action, which I
>>>>> assumed would retarget the Open action in the context menu. I get
>>>>> confused when the author then appends his custom open action to the
>>>>> "Open Group" of the context menu - why would this need to be done if
>>>>> he is retargetting the global Open action? I dont want to add a new
>>>>> action, I want to override the functionality of the existing one.
>>>>>
>>>>> I did implement it however, and saw that my open action did not get
>>>>> called when the Open action was selected in the context menu. When I
>>>>> appended my action to the "Open Group", my action appeared in the
>>>>> Context menu above the global open action. Is this correct? Again, I
>>>>> thought my custom action would just get called when the global action
>>>>> was selected, rather than adding a new action.
>>>>>
>>>>> I also am not understanding how to use <enablement> with my action
>>>>> provider extension - I get as far as "instanceof IFile", but how do I
>>>>> tell it only IFile's of a certain Project Nature?
>>>>>
>>>>> Thanks,
>>>>> Derek
>>>>>
>>>
>>>
>
>
Re: "Open" menu action in Project Explorer [message #329970 is a reply to message #329946] Fri, 11 July 2008 14:30 Go to previous messageGo to next message
Derek Rea is currently offline Derek ReaFriend
Messages: 14
Registered: July 2009
Junior Member
Ah I see. Thank you for all your help Rahul!

Derek


Rahul Kamdar wrote:

> Hi Derek,

> Right the priority needs to be set to "high" as well so basically your
> extension gets the highest priority over other navigator content extensions
> made by other plug-ins.

> When you override the Open action you are going to override the "Open With"
> action/menu as well. I think you might have to provide your own alternative
> implementation for "Open With" or you could leverage the existing code for
> "Open With.." menu and add that as your alternative implementation.

> I am not sure if you can retarget "just" the Open action keeping the native
> "Open With... " menu. Most probably you can't do that but just to confirm
> maybe you can put a post again in this group with CNF and override Open
> action in the Subject line. Someone more experienced might help you out.

> Thanks,
> Rahul

> "Derek R." <spadge248@yahoo.com> wrote in message
> news:4c76f0d516c2eca0fea17bcefe8ba0ec$1@www.eclipse.org...
>> Rahul,
>>
>> I added the overrides and nothing changed. However, when I add that as
>> well as priority="high"> or priority="higher">, it does work...not sure
>> why this is, but it works.
>>
>> Also, when I say "it works", I mean both the Open and Open With menu
>> actions are replaced by my custom open action. This is not what I
>> expected though - I want the context menu to contain my custom open action
>> and the Open With action. Basically I just want to just retarget the Open
>> action and nothing else... is this possible or do I have to retarget the
>> Open With action as well?
>>
>> Thanks much for the help,
>> Derek
>>
>>
>> Rahul Kamdar wrote:
>>
>>> In your plugin.xml, put the following and see:
>>> overrides="org.eclipse.ui.navigator.resources.OpenActions"
>>
>>> This should be in the actionProvider declaration after you declare the
>>> class and id... so:
>>> <extension point="....navigatorContent">
>>> <actionProvider
>>> class="..."
>>> id="....."
>>> overrides="org.eclipse.ui.navigator.resources.OpenActions">
>>
>>> Try this and let me know. Rest of the code looks fine.
>>
>>> Rahul
>>
>>> "Derek R." <spadge248@yahoo.com> wrote in message
>>> news:5d6913f6a98a9c197e53c44f9703c4b8$1@www.eclipse.org...
>>>> Here is my plugin.xml code:
>>>>
>>>> <extension point="org.eclipse.ui.navigator.navigatorContent">
>>>> <actionProvider
>>>> class="my.plugin.name.ui.actions.PropertyActionProvider"
>>>> id="my.plugin.name.ui.actions.OpenProvider">
>>>> <enablement>
>>>> <and>
>>>> <instanceof
>>>> value="org.eclipse.core.resources.IFile">
>>>> </instanceof>
>>>> <test
>>>> property="org.eclipse.core.resources.projectNature"
>>>>
>>>> value="&apos;my.plugin.name.core.natures.myNature&apos; ">
>>>> </test>
>>>> </and>
>>>> </enablement>
>>>> </actionProvider>
>>>> </extension>
>>>> <extension point="org.eclipse.ui.navigator.viewer">
>>>> <viewerActionBinding
>>>> viewerId="org.eclipse.ui.navigator.ProjectExplorer">
>>>> <includes>
>>>> <actionExtension
>>>> pattern="my.plugin.name.ui.actions.OpenProvider">
>>>> </actionExtension>
>>>> </includes>
>>>> </viewerActionBinding>
>>>> </extension>
>>>>
>>>>
>>>> This seems to be working, thanks for the example below. I still see my
>>>> open action along with the global open action, however. Here is a
>>>> snippet of my commonActionProvider:
>>>>
>>>>
>>>> public class PropertyActionProvider extends CommonActionProvider
>>>> {
>>>> OpenEditorAction m_openAction;
>>>> .
>>>> .
>>>> .
>>>> .
>>>>
>>>> public void fillActionBars(IActionBars actionBars)
>>>> {
>>>> if (m_openAction.isEnabled())
>>>> {
>>>> actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
>>>> m_openAction);
>>>> }
>>>>
>>>> public void fillContextMenu(IMenuManager menu)
>>>> {
>>>> if (m_openAction.isEnabled())
>>>> {
>>>> menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN,
>>>> m_openAction);
>>>> }
>>>> }
>>>> }
>>>>
>>>>
>>>> It is very similar to the example given in the article you suggested,
>>>> which is why I am stumped as to what is wrong.
>>>>
>>>> Thanks,
>>>> Derek
>>>>
>>>>
>>>> Rahul Kamdar wrote:
>>>>
>>>>> Hi sorry for a late reply, I happened to check this today only...
>>>>
>>>>> Regarding the enablement clause:
>>>>
>>>>> <enablement>
>>>>
>>>>> <or>
>>>>
>>>>> <and>
>>>>
>>>>> <adapt type="org.eclipse.core.resources.IResource/IFile" />
>>>>
>>>>> <test
>>>>
>>>>> property="org.eclipse.core.resources.projectNature"
>>>>
>>>>> value="">
>>>>
>>>>> </test>
>>>>
>>>>> </and>
>>>>
>>>>> </or>
>>>>
>>>>> </enablement>
>>>>
>>>>> You need to add your own action and this needs to go into the "Open
>>>>> Group". However, if you find that there are two "Open" actions coming
>>>>> up, that is not the expected behavior. Can you post code from your
>>>>> plugin.xml where you have contributed the actionProvider and also
>>>>> snippets from your class implementing the commonActionProvider. Maybe
>>>>> we can identify what's going wrong.
>>>>
>>>>> Rahul
>>>>
>>>>
>>>>> "Derek. R" <spadge248@yahoo.com> wrote in message
>>>>> news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
>>>>>> Thanks for the reply!
>>>>>>
>>>>>> The link helped me greatly, thanks for that. I don't quite understand
>>>>>> what is supposed to happen from the code in the article are though -
>>>>>> the author sets the global action handler on the open action, which I
>>>>>> assumed would retarget the Open action in the context menu. I get
>>>>>> confused when the author then appends his custom open action to the
>>>>>> "Open Group" of the context menu - why would this need to be done if
>>>>>> he is retargetting the global Open action? I dont want to add a new
>>>>>> action, I want to override the functionality of the existing one.
>>>>>>
>>>>>> I did implement it however, and saw that my open action did not get
>>>>>> called when the Open action was selected in the context menu. When I
>>>>>> appended my action to the "Open Group", my action appeared in the
>>>>>> Context menu above the global open action. Is this correct? Again, I
>>>>>> thought my custom action would just get called when the global action
>>>>>> was selected, rather than adding a new action.
>>>>>>
>>>>>> I also am not understanding how to use <enablement> with my action
>>>>>> provider extension - I get as far as "instanceof IFile", but how do I
>>>>>> tell it only IFile's of a certain Project Nature?
>>>>>>
>>>>>> Thanks,
>>>>>> Derek
>>>>>>
>>>>
>>>>
>>
>>
Re: "Open" menu action in Project Explorer [message #330375 is a reply to message #329970] Sun, 27 July 2008 10:33 Go to previous messageGo to next message
Mathias Schaeffner is currently offline Mathias SchaeffnerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

I try to do quite the same with "Open" menu action.
But it doesn't work, even I tried to follow the steps in your discussion.
If you have a working solution now, maybe you can provide some piece of
code.

In addition, I need the open action not only for Project Explorer.
Preferable platform-wide.
So is there a chance to provide a "Open" action, if I don't know all
registered views?

What I precisely need is:
When opening a file, then it should use my own editor if the file has a
certain extension (.css) AND it is located in a certain project type( my
own project nature ).

I appreciate any help, thanks.


Derek R. wrote:

> Ah I see. Thank you for all your help Rahul!

> Derek


> Rahul Kamdar wrote:

>> Hi Derek,

>> Right the priority needs to be set to "high" as well so basically your
>> extension gets the highest priority over other navigator content extensions
>> made by other plug-ins.

>> When you override the Open action you are going to override the "Open With"
>> action/menu as well. I think you might have to provide your own alternative
>> implementation for "Open With" or you could leverage the existing code for
>> "Open With.." menu and add that as your alternative implementation.

>> I am not sure if you can retarget "just" the Open action keeping the native
>> "Open With... " menu. Most probably you can't do that but just to confirm
>> maybe you can put a post again in this group with CNF and override Open
>> action in the Subject line. Someone more experienced might help you out.

>> Thanks,
>> Rahul

>> "Derek R." <spadge248@yahoo.com> wrote in message
>> news:4c76f0d516c2eca0fea17bcefe8ba0ec$1@www.eclipse.org...
>>> Rahul,
>>>
>>> I added the overrides and nothing changed. However, when I add that as
>>> well as priority="high"> or priority="higher">, it does work...not sure
>>> why this is, but it works.
>>>
>>> Also, when I say "it works", I mean both the Open and Open With menu
>>> actions are replaced by my custom open action. This is not what I
>>> expected though - I want the context menu to contain my custom open action
>>> and the Open With action. Basically I just want to just retarget the Open
>>> action and nothing else... is this possible or do I have to retarget the
>>> Open With action as well?
>>>
>>> Thanks much for the help,
>>> Derek
>>>
>>>
>>> Rahul Kamdar wrote:
>>>
>>>> In your plugin.xml, put the following and see:
>>>> overrides="org.eclipse.ui.navigator.resources.OpenActions"
>>>
>>>> This should be in the actionProvider declaration after you declare the
>>>> class and id... so:
>>>> <extension point="....navigatorContent">
>>>> <actionProvider
>>>> class="..."
>>>> id="....."
>>>> overrides="org.eclipse.ui.navigator.resources.OpenActions">
>>>
>>>> Try this and let me know. Rest of the code looks fine.
>>>
>>>> Rahul
>>>
>>>> "Derek R." <spadge248@yahoo.com> wrote in message
>>>> news:5d6913f6a98a9c197e53c44f9703c4b8$1@www.eclipse.org...
>>>>> Here is my plugin.xml code:
>>>>>
>>>>> <extension point="org.eclipse.ui.navigator.navigatorContent">
>>>>> <actionProvider
>>>>> class="my.plugin.name.ui.actions.PropertyActionProvider"
>>>>> id="my.plugin.name.ui.actions.OpenProvider">
>>>>> <enablement>
>>>>> <and>
>>>>> <instanceof
>>>>> value="org.eclipse.core.resources.IFile">
>>>>> </instanceof>
>>>>> <test
>>>>> property="org.eclipse.core.resources.projectNature"
>>>>>
>>>>> value="&apos;my.plugin.name.core.natures.myNature&apos; ">
>>>>> </test>
>>>>> </and>
>>>>> </enablement>
>>>>> </actionProvider>
>>>>> </extension>
>>>>> <extension point="org.eclipse.ui.navigator.viewer">
>>>>> <viewerActionBinding
>>>>> viewerId="org.eclipse.ui.navigator.ProjectExplorer">
>>>>> <includes>
>>>>> <actionExtension
>>>>> pattern="my.plugin.name.ui.actions.OpenProvider">
>>>>> </actionExtension>
>>>>> </includes>
>>>>> </viewerActionBinding>
>>>>> </extension>
>>>>>
>>>>>
>>>>> This seems to be working, thanks for the example below. I still see my
>>>>> open action along with the global open action, however. Here is a
>>>>> snippet of my commonActionProvider:
>>>>>
>>>>>
>>>>> public class PropertyActionProvider extends CommonActionProvider
>>>>> {
>>>>> OpenEditorAction m_openAction;
>>>>> .
>>>>> .
>>>>> .
>>>>> .
>>>>>
>>>>> public void fillActionBars(IActionBars actionBars)
>>>>> {
>>>>> if (m_openAction.isEnabled())
>>>>> {
>>>>> actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
>>>>> m_openAction);
>>>>> }
>>>>>
>>>>> public void fillContextMenu(IMenuManager menu)
>>>>> {
>>>>> if (m_openAction.isEnabled())
>>>>> {
>>>>> menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN,
>>>>> m_openAction);
>>>>> }
>>>>> }
>>>>> }
>>>>>
>>>>>
>>>>> It is very similar to the example given in the article you suggested,
>>>>> which is why I am stumped as to what is wrong.
>>>>>
>>>>> Thanks,
>>>>> Derek
>>>>>
>>>>>
>>>>> Rahul Kamdar wrote:
>>>>>
>>>>>> Hi sorry for a late reply, I happened to check this today only...
>>>>>
>>>>>> Regarding the enablement clause:
>>>>>
>>>>>> <enablement>
>>>>>
>>>>>> <or>
>>>>>
>>>>>> <and>
>>>>>
>>>>>> <adapt type="org.eclipse.core.resources.IResource/IFile" />
>>>>>
>>>>>> <test
>>>>>
>>>>>> property="org.eclipse.core.resources.projectNature"
>>>>>
>>>>>> value="">
>>>>>
>>>>>> </test>
>>>>>
>>>>>> </and>
>>>>>
>>>>>> </or>
>>>>>
>>>>>> </enablement>
>>>>>
>>>>>> You need to add your own action and this needs to go into the "Open
>>>>>> Group". However, if you find that there are two "Open" actions coming
>>>>>> up, that is not the expected behavior. Can you post code from your
>>>>>> plugin.xml where you have contributed the actionProvider and also
>>>>>> snippets from your class implementing the commonActionProvider. Maybe
>>>>>> we can identify what's going wrong.
>>>>>
>>>>>> Rahul
>>>>>
>>>>>
>>>>>> "Derek. R" <spadge248@yahoo.com> wrote in message
>>>>>> news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
>>>>>>> Thanks for the reply!
>>>>>>>
>>>>>>> The link helped me greatly, thanks for that. I don't quite understand
>>>>>>> what is supposed to happen from the code in the article are though -
>>>>>>> the author sets the global action handler on the open action, which I
>>>>>>> assumed would retarget the Open action in the context menu. I get
>>>>>>> confused when the author then appends his custom open action to the
>>>>>>> "Open Group" of the context menu - why would this need to be done if
>>>>>>> he is retargetting the global Open action? I dont want to add a new
>>>>>>> action, I want to override the functionality of the existing one.
>>>>>>>
>>>>>>> I did implement it however, and saw that my open action did not get
>>>>>>> called when the Open action was selected in the context menu. When I
>>>>>>> appended my action to the "Open Group", my action appeared in the
>>>>>>> Context menu above the global open action. Is this correct? Again, I
>>>>>>> thought my custom action would just get called when the global action
>>>>>>> was selected, rather than adding a new action.
>>>>>>>
>>>>>>> I also am not understanding how to use <enablement> with my action
>>>>>>> provider extension - I get as far as "instanceof IFile", but how do I
>>>>>>> tell it only IFile's of a certain Project Nature?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Derek
>>>>>>>
>>>>>
>>>>>
>>>
>>>
Re: "Open" menu action in Project Explorer [message #330434 is a reply to message #330375] Mon, 28 July 2008 19:31 Go to previous message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
Hi Mathias,

What is the problem you are facing while implementing the "Open" menu
action? You could try and describe the problem and post code and maybe we
could tell you what is going wrong.

About the second part of your query/mail - you probably need to make a
change in the "Editor associations" for the filetype. I am not sure if
that's the way to go or even if it is, what's the way to do it. You should
try posting a new post in this group with your query specifically to this
issue.

Rahul

"Mathias Schaeffner" <mathias.schaeffner@googlemail.com> wrote in message
news:d46bca47430a80a59e3ed487952b6408$1@www.eclipsecon.com...
> Hi,
>
> I try to do quite the same with "Open" menu action.
> But it doesn't work, even I tried to follow the steps in your discussion.
> If you have a working solution now, maybe you can provide some piece of
> code.
>
> In addition, I need the open action not only for Project Explorer.
> Preferable platform-wide.
> So is there a chance to provide a "Open" action, if I don't know all
> registered views?
>
> What I precisely need is:
> When opening a file, then it should use my own editor if the file has a
> certain extension (.css) AND it is located in a certain project type( my
> own project nature ).
>
> I appreciate any help, thanks.
>
>
> Derek R. wrote:
>
>> Ah I see. Thank you for all your help Rahul!
>
>> Derek
>
>
>> Rahul Kamdar wrote:
>
>>> Hi Derek,
>
>>> Right the priority needs to be set to "high" as well so basically your
>>> extension gets the highest priority over other navigator content
>>> extensions made by other plug-ins.
>
>>> When you override the Open action you are going to override the "Open
>>> With" action/menu as well. I think you might have to provide your own
>>> alternative implementation for "Open With" or you could leverage the
>>> existing code for "Open With.." menu and add that as your alternative
>>> implementation.
>
>>> I am not sure if you can retarget "just" the Open action keeping the
>>> native "Open With... " menu. Most probably you can't do that but just to
>>> confirm maybe you can put a post again in this group with CNF and
>>> override Open action in the Subject line. Someone more experienced might
>>> help you out.
>
>>> Thanks,
>>> Rahul
>
>>> "Derek R." <spadge248@yahoo.com> wrote in message
>>> news:4c76f0d516c2eca0fea17bcefe8ba0ec$1@www.eclipse.org...
>>>> Rahul,
>>>>
>>>> I added the overrides and nothing changed. However, when I add that as
>>>> well as priority="high"> or priority="higher">, it does work...not sure
>>>> why this is, but it works.
>>>>
>>>> Also, when I say "it works", I mean both the Open and Open With menu
>>>> actions are replaced by my custom open action. This is not what I
>>>> expected though - I want the context menu to contain my custom open
>>>> action and the Open With action. Basically I just want to just
>>>> retarget the Open action and nothing else... is this possible or do I
>>>> have to retarget the Open With action as well?
>>>>
>>>> Thanks much for the help,
>>>> Derek
>>>>
>>>>
>>>> Rahul Kamdar wrote:
>>>>
>>>>> In your plugin.xml, put the following and see:
>>>>> overrides="org.eclipse.ui.navigator.resources.OpenActions"
>>>>
>>>>> This should be in the actionProvider declaration after you declare the
>>>>> class and id... so:
>>>>> <extension point="....navigatorContent">
>>>>> <actionProvider
>>>>> class="..."
>>>>> id="....."
>>>>>
>>>>> overrides="org.eclipse.ui.navigator.resources.OpenActions">
>>>>
>>>>> Try this and let me know. Rest of the code looks fine.
>>>>
>>>>> Rahul
>>>>
>>>>> "Derek R." <spadge248@yahoo.com> wrote in message
>>>>> news:5d6913f6a98a9c197e53c44f9703c4b8$1@www.eclipse.org...
>>>>>> Here is my plugin.xml code:
>>>>>>
>>>>>> <extension point="org.eclipse.ui.navigator.navigatorContent">
>>>>>> <actionProvider
>>>>>> class="my.plugin.name.ui.actions.PropertyActionProvider"
>>>>>> id="my.plugin.name.ui.actions.OpenProvider">
>>>>>> <enablement>
>>>>>> <and>
>>>>>> <instanceof
>>>>>> value="org.eclipse.core.resources.IFile">
>>>>>> </instanceof>
>>>>>> <test
>>>>>> property="org.eclipse.core.resources.projectNature"
>>>>>>
>>>>>> value="&apos;my.plugin.name.core.natures.myNature&apos; ">
>>>>>> </test>
>>>>>> </and>
>>>>>> </enablement>
>>>>>> </actionProvider>
>>>>>> </extension>
>>>>>> <extension point="org.eclipse.ui.navigator.viewer">
>>>>>> <viewerActionBinding
>>>>>> viewerId="org.eclipse.ui.navigator.ProjectExplorer">
>>>>>> <includes>
>>>>>> <actionExtension
>>>>>> pattern="my.plugin.name.ui.actions.OpenProvider">
>>>>>> </actionExtension>
>>>>>> </includes>
>>>>>> </viewerActionBinding>
>>>>>> </extension>
>>>>>>
>>>>>>
>>>>>> This seems to be working, thanks for the example below. I still see
>>>>>> my open action along with the global open action, however. Here is a
>>>>>> snippet of my commonActionProvider:
>>>>>>
>>>>>>
>>>>>> public class PropertyActionProvider extends CommonActionProvider
>>>>>> {
>>>>>> OpenEditorAction m_openAction;
>>>>>> .
>>>>>> .
>>>>>> .
>>>>>> .
>>>>>>
>>>>>> public void fillActionBars(IActionBars actionBars)
>>>>>> {
>>>>>> if (m_openAction.isEnabled())
>>>>>> {
>>>>>>
>>>>>> actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
>>>>>> m_openAction);
>>>>>> }
>>>>>>
>>>>>> public void fillContextMenu(IMenuManager menu)
>>>>>> {
>>>>>> if (m_openAction.isEnabled())
>>>>>> {
>>>>>> menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN,
>>>>>> m_openAction);
>>>>>> }
>>>>>> }
>>>>>> }
>>>>>>
>>>>>>
>>>>>> It is very similar to the example given in the article you suggested,
>>>>>> which is why I am stumped as to what is wrong.
>>>>>>
>>>>>> Thanks,
>>>>>> Derek
>>>>>>
>>>>>>
>>>>>> Rahul Kamdar wrote:
>>>>>>
>>>>>>> Hi sorry for a late reply, I happened to check this today only...
>>>>>>
>>>>>>> Regarding the enablement clause:
>>>>>>
>>>>>>> <enablement>
>>>>>>
>>>>>>> <or>
>>>>>>
>>>>>>> <and>
>>>>>>
>>>>>>> <adapt type="org.eclipse.core.resources.IResource/IFile" />
>>>>>>
>>>>>>> <test
>>>>>>
>>>>>>> property="org.eclipse.core.resources.projectNature"
>>>>>>
>>>>>>> value="">
>>>>>>
>>>>>>> </test>
>>>>>>
>>>>>>> </and>
>>>>>>
>>>>>>> </or>
>>>>>>
>>>>>>> </enablement>
>>>>>>
>>>>>>> You need to add your own action and this needs to go into the "Open
>>>>>>> Group". However, if you find that there are two "Open" actions
>>>>>>> coming up, that is not the expected behavior. Can you post code from
>>>>>>> your plugin.xml where you have contributed the actionProvider and
>>>>>>> also snippets from your class implementing the commonActionProvider.
>>>>>>> Maybe we can identify what's going wrong.
>>>>>>
>>>>>>> Rahul
>>>>>>
>>>>>>
>>>>>>> "Derek. R" <spadge248@yahoo.com> wrote in message
>>>>>>> news:806ed4676af95918da0c41122aa60762$1@www.eclipse.org...
>>>>>>>> Thanks for the reply!
>>>>>>>>
>>>>>>>> The link helped me greatly, thanks for that. I don't quite
>>>>>>>> understand what is supposed to happen from the code in the article
>>>>>>>> are though - the author sets the global action handler on the open
>>>>>>>> action, which I assumed would retarget the Open action in the
>>>>>>>> context menu. I get confused when the author then appends his
>>>>>>>> custom open action to the "Open Group" of the context menu - why
>>>>>>>> would this need to be done if he is retargetting the global Open
>>>>>>>> action? I dont want to add a new action, I want to override the
>>>>>>>> functionality of the existing one.
>>>>>>>>
>>>>>>>> I did implement it however, and saw that my open action did not get
>>>>>>>> called when the Open action was selected in the context menu. When
>>>>>>>> I appended my action to the "Open Group", my action appeared in the
>>>>>>>> Context menu above the global open action. Is this correct?
>>>>>>>> Again, I thought my custom action would just get called when the
>>>>>>>> global action was selected, rather than adding a new action.
>>>>>>>>
>>>>>>>> I also am not understanding how to use <enablement> with my action
>>>>>>>> provider extension - I get as far as "instanceof IFile", but how do
>>>>>>>> I tell it only IFile's of a certain Project Nature?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Derek
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>
>
Previous Topic:bundle vs. plugin
Next Topic:Using eclipse launch framework
Goto Forum:
  


Current Time: Wed Jul 17 19:50:07 GMT 2024

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

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

Back to the top