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 01:51 Go to next message
John S. is currently offline John S.
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 08:06 Go to previous message
Paul Webster is currently offline Paul Webster
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:"View descriptor not found"
Next Topic:CVS show history on Project
Goto Forum:
  


Current Time: Sat Aug 23 05:39:28 EDT 2014

Powered by FUDForum. Page generated in 0.02586 seconds