Ejemplo n.º 1
0
 public static void createFolderHelper(final IFolder folder) throws CoreException {
   if (!folder.exists()) {
     final IContainer parent = folder.getParent();
     if (parent instanceof IFolder) {
       createFolderHelper((IFolder) parent);
     }
     folder.create(false, true, null);
   }
 }
Ejemplo n.º 2
0
 private static void buildPaths(
     final IWorkspaceRoot root, final IProject project, final Collection<IPath> list)
     throws CoreException {
   final IPath projectPath = project.getFullPath();
   for (final IPath pp : list) {
     // only create in-project paths
     if (!pp.isAbsolute() && !pp.toString().equals(".") && !pp.isEmpty()) {
       final IPath path = projectPath.append(pp);
       final IFolder folder = root.getFolder(path);
       createFolderHelper(folder);
     }
   }
 }