private IPath getLocation(IProject p) {
   // In eclipse... nothing is ever simple. No, you can not just ask a project for its location...
   URI uri = p.getRawLocationURI();
   if (uri == null) {
     // This means project description doesn't specify location, which means project is in the
     // default location
     IPath wsloc = ResourcesPlugin.getWorkspace().getRoot().getLocation();
     return wsloc.append(p.getName());
   } else if (uri.getScheme().equals("file")) {
     return new Path(uri.getPath());
   }
   return null;
 }