I am attempting to get full path of a selected node in the package explorer which is a folder or package not a file in my Eclipse Ganymede plug-in. I tried the way that is mentioned at http://stackoverflow.com/questions/585802/how-to-get-the-selected-node-in-the-package-explorer-from-an-eclipse-plugin page, but whenever i use the following line in my code,
IFile file = (IFile) structured.getFirstElement(); (This one) IPath path = file.getLocation();
plugin does not work and does not respond also it gives no exception warning. When i changed IFile declaration to Object declaration it is fine. But i need to get file or folder to get full path for my operations.
Any help will be appreciated...