Object contribution and Project Explorer [message #333854] |
Fri, 09 January 2009 14:37 |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Hi,
I have been reading the article Contributing Actions to the Eclipse
Workbench.
Following the example, I have been able to add a context menu item to an
object in the Navigator view, but I can't see how to get the same
context menu item to an object selected in the Project Explorer view.
Any suggestions?
This is my XML:
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
id="org.eclipse.ui.articles.action.contribution.popup.object "
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.java">
<filter
name="projectNature"
value="org.eclipse.jdt.core.javanature">
</filter>
<action
id="org.eclipse.ui.articles.action.contribution.object.action1 "
label="Object Action 1"
icon="icons/flash16x16.gif"
menubarPath="additions"
class="my.utilities.MyObjectDelegate">
</action>
</objectContribution>
</extension>
Thanks,
--
Derek
|
|
|
|
Re: Object contribution and Project Explorer [message #333886 is a reply to message #333883] |
Mon, 12 January 2009 17:11 |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Paul Webster wrote:
> You might need to make it adapt ... the project explorer is probably
> showing ICompilationUnits not IFiles
>
> PW
>
Sorry, but how do I make it adapt? Is this something I can do in the xml?
Thanks,
--
Derek
|
|
|
|
Re: Object contribution and Project Explorer [message #333916 is a reply to message #333904] |
Tue, 13 January 2009 20:53 |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Paul Webster wrote:
> Derek wrote:
>> Sorry, but how do I make it adapt? Is this something I can do in the xml?
>
> Yes, please read the org.eclipse.ui.popupMenus Extension Point
> Description (you are looking for an adapt attribute)
>
> PW
>
>
That did it - thanks,
--
Derek
|
|
|
Powered by
FUDForum. Page generated in 0.06366 seconds