Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] obtain full path from ISourceModule

Hi Jae,

Something like the following:

IResource resource = module.getResource()
if (resource != null) {
  //workspace
  return resource.getLocation(); // could be null
}
else if (module instanceof IExternalSourceModule) {
  IFileHandle file = EnvironmentPathUtils.getFile(module.getPath())
  if (file != null) {
   return file.toOSString()
  }
}

Regards,
Alex



On Mon, Oct 20, 2008 at 22:17, Jae Gangemi <jgangemi@xxxxxxxxx> wrote:
hello all -

  how can i obtain the full path to the underlying resource for an ISourceModule?

  i see that the object already has a getPath() call, but those that just returnst the inner most element (ie: perl/lib/Foo.pm'), but i would like the full path on disk ('/Users/jae/projects/pde-test/perl/lib/Foo.pm')

  thanks!

--
-jae

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev



Back to the top