Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Need help connecting Command Handler to my View
Need help connecting Command Handler to my View [message #327515] Wed, 23 April 2008 06:00 Go to next message
Trevor Campbell is currently offline Trevor CampbellFriend
Messages: 23
Registered: July 2009
Junior Member
I have been following the tutorial on at
http://www.ibm.com/developerworks/library/os-eclipse-3.3menu /index.html
and have created command, handler and menu contributions OK, but when the
handler execute method fires, how can I get hold of the view instance
where the original menu item is?
Re: Need help connecting Command Handler to my View [message #327533 is a reply to message #327515] Wed, 23 April 2008 17:45 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

HandlerUtil.getActivePart(event) should return the correct IViewPart if
the view was active.

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/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Need help connecting Command Handler to my View [message #327538 is a reply to message #327533] Wed, 23 April 2008 23:21 Go to previous message
Trevor Campbell is currently offline Trevor CampbellFriend
Messages: 23
Registered: July 2009
Junior Member
Thanks again on this one. [ There are certainly a lot of little tricks &
tips needed to put the whole picture together :) ]
Previous Topic:startup.jar in org.eclipse.releng.eclipsebuilder
Next Topic:How to imply two-layers menu in contextmenu
Goto Forum:
  


Current Time: Tue Nov 12 19:47:05 GMT 2024

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

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

Back to the top