Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Pop-up Menus with Files
Pop-up Menus with Files [message #501613] Thu, 03 December 2009 06:51 Go to next message
John S. is currently offline John S.Friend
Messages: 22
Registered: October 2009
Junior Member
Hello,

I created a Pop-up Menu plug-in associated with Files using the default template. How can I get the file name (and its path) of that file what i selected to start the plug-in?

Best Regards,
John
Re: Pop-up Menus with Files [message #503990 is a reply to message #501613] Wed, 16 December 2009 13:06 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

John S. wrote:
> Hello,
>
> I created a Pop-up Menu plug-in associated with Files using the default
> template. How can I get the file name (and its path) of that file what i
> selected to start the plug-in?

Do you mean you implemented IObjectActionDelegate (and got an ISelection
passed to you)? If that's the case, then you would check and cast to an
IStructuredSelection and go from there.

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


Previous Topic:The bundle could not be resolved in RCP-RAP application
Next Topic:Update: new plugin version not visible -- where cached?
Goto Forum:
  


Current Time: Tue Jul 25 17:03:37 GMT 2017

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

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