Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Get Class Location
Get Class Location [message #667966] Tue, 03 May 2011 02:21 Go to next message
Riccardo  is currently offline Riccardo
Messages: 6
Registered: March 2011
Junior Member
Hi!

I created a "Plugin with popup menu" from avaible templates.
I want that my popup print the location of selected file.
How can i do it?

thanks!
Re: Get Class Location [message #674589 is a reply to message #667966] Fri, 27 May 2011 08:57 Go to previous message
Artur Kronenberg is currently offline Artur Kronenberg
Messages: 159
Registered: August 2009
Senior Member
If you're plug-in is using the Commands framework, then you're action will trigger a handler. Handler have a utility called HandlerUtil and there is a nice collection of useful methods in there. You can get the current selection in the util and will get an IFile object. For that one you can simply get the location and print it wherever you want.

It should work similar with Actions (all though I'd have to look it up). Pretty sure though that there is some sort of selection event. You should check if you can get the selection from that even and print out its location.

regards,

-- artur
Previous Topic:Class.forName in plugin developement
Next Topic:New XML Editor
Goto Forum:
  


Current Time: Thu Aug 28 05:32:49 EDT 2014

Powered by FUDForum. Page generated in 0.02192 seconds