Ejemplo n.º 1
0
 protected IProject getProject() {
   URI root = _index.getRoot();
   IPath containerPath = org.eclipse.core.filesystem.URIUtil.toPath(root);
   if (containerPath == null) {
     return null;
   }
   IContainer container =
       ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(containerPath);
   if (container == null) {
     return null;
   }
   return container.getProject();
 }