Hi Prakash,
I don't have much experience with that
class since it is not a PDE class, but you might try calling "baseSelectionListenerAction.run()"
before you call .getStructuredSelection(). This class extends Action,
and every Action is executed by calling it's run method. Just a thought
on how you might be able to fix the NPE.
Also, if .getFullPath() doesn't give
you the result you are looking for, you might try .getRawLocation(). I
remember having to experiment with a couple different calls to get the
result I was looking for.
HTH
Brian Bauman
IBM Software Group - Austin, TX
Eclipse Committer
baumanbr@xxxxxxxxxx
(512) 838 -2938 (T/L 678-2938)
Hi all,
i m creating plugin for my envivronment.for my plugin to access some
of my file in the general location in the hard disk i have hard coded
the plugin. i want to make it generalised for all the user.now i have
hard coded the path in the code.
public RecordingUpload(IWorkbenchWindow
window){
try{
BaseSelectionListenerAction
baseSelectionListenerAction = new
ExportResourcesAction(window);
IStructuredSelection structuredSelection =
baseSelectionListenerAction.getStructuredSelection();
IResource currentResource
=(IResource)structuredSelection.getFirstElement();
System.out.println(" workspace.fullpath:"+
currentResource.getFullPath());
i m using this code to get the path in one
of my menu.when i take that
menu i m getting java.lang.NullPointerException. please correct me if
i m wrong the way or the place i m using.Recording Upload in my menu
class constructor.
plz guide me where and how i have to use this code to get the project
location.
thanks in advance
Prakash _______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev