private IContainer containerForPath(IPath path){
  if (path.segmentCount() == 1) {
    return workspaceRoot.getProject(path.segment(0));
  }
 else {
    return workspaceRoot.getFolder(path);
  }
}

private IContainer containerForPath ( IPath path ) { if ( path . segmentCount ( ) == 1 ) { return workspaceRoot . getProject ( path . segment ( 0 ) ) ; } else { return workspaceRoot . getFolder ( path ) ; } }
return the container with the given path
