Beispiel #1
0
 /**
  * Create a folder relative to the project based on aProjectRelativePathString.
  *
  * @param aProjectRelativePath
  * @return
  * @throws CoreException
  * @since 1.0.0
  */
 public IFolder createFolder(IPath aProjectRelativePath) throws CoreException {
   if (aProjectRelativePath != null && !aProjectRelativePath.isEmpty()) {
     IFolder folder =
         getWorkspace().getRoot().getFolder(getProjectPath().append(aProjectRelativePath));
     if (!folder.exists()) {
       ProjectUtilities.ensureContainerNotReadOnly(folder);
       folder.create(true, true, null);
     }
     return folder;
   }
   return null;
 }
Beispiel #2
0
 /**
  * Add the nature id to the project.
  *
  * @param proj
  * @param natureId
  * @throws CoreException
  * @since 1.0.0
  */
 protected static void addNatureToProject(IProject proj, String natureId) throws CoreException {
   ProjectUtilities.addNatureToProject(proj, natureId);
 }