Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Object contribution and Project Explorer
Object contribution and Project Explorer [message #333854] Fri, 09 January 2009 14:37 Go to next message
Eclipse UserFriend
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 #333883 is a reply to message #333854] Mon, 12 January 2009 15:38 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You might need to make it adapt ... the project explorer is probably
showing ICompilationUnits not IFiles

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Object contribution and Project Explorer [message #333886 is a reply to message #333883] Mon, 12 January 2009 17:11 Go to previous messageGo to next message
Eclipse UserFriend
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 #333904 is a reply to message #333886] Tue, 13 January 2009 15:40 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Object contribution and Project Explorer [message #333916 is a reply to message #333904] Tue, 13 January 2009 20:53 Go to previous message
Eclipse UserFriend
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
Previous Topic:Image viewer for Eclipse
Next Topic:Eclipse won't start after computer crash and -clean option
Goto Forum:
  


Current Time: Sun Jun 30 12:31:39 GMT 2024

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

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

Back to the top