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


  thanks alex!

  i have another question, if i have the full path to a resource that exists on disk, how can i find it's corresponding ISourceModule object? i'm working tracking dependencies for my compiler/validator and i need to be able to lookup the dependant resources so i can clear there markers and recompile them as well.

On Mon, Oct 20, 2008 at 12:48 PM, Alexey Panchenko <alex.panchenko@xxxxxxxxx> wrote:
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



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




--
-jae

Back to the top