Skip to main content

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 06:21 Go to next message
Riccardo  is currently offline Riccardo Friend
Messages: 6
Registered: March 2011
Junior Member

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?

Re: Get Class Location [message #674589 is a reply to message #667966] Fri, 27 May 2011 12:57 Go to previous message
Artur Kronenberg is currently offline Artur KronenbergFriend
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.


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

Current Time: Fri Jun 18 04:03:06 GMT 2021

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

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

Back to the top