|

03-18-2008, 03:04 AM
Hi,
When i want to right click on a file in package explorer and get its location, i will implement a popupmenu (who's action class will implement the IObjectActionDelegate).
In the selectionChanged(IAction, ISelection) method of this interface, i will get the selection object which is selected in the PkgExplorer.
From this selection obj i can use below code, try this:
TreeSelection treeSel = (TreeSelection) selection;
((IFile)treeSel.getFirstElement()).getLocation();
Did it help u?
|