Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IFolder.create()


        IFolder folder = templateFolder;
        for (String packageName : packageNames) {
            folder = folder.getFolder(new Path(packageName));
            try {
                if (!folder.exists()) {
                    folder.create(true, true, null);
                }
            }
            catch (CoreException e) {
                e.printStackTrace();
            }
View Full Code Here


    if (!testSourceFolder.exists()
        || testSourceFragmentRoot == null
        || !testSourceFragmentRoot.exists()) {
      // create folder
      if (!testSourceFolder.exists()) {
        testSourceFolder.create(true, false, null);
      }
      IClasspathEntry[] classpath = javaProject.getRawClasspath();
      // find last source entry
      int insertIndex = -1;
      for (int i = 0; i < classpath.length; i++) {
View Full Code Here

        for (String subPath : subPaths) {
            if (subPath.endsWith("/")) {
                IPath destinationPath = new Path(subPath).makeRelativeTo(sourcePrefix);
                IFolder folder = destination.getFolder(destinationPath);
                if (!folder.exists())
                    folder.create(true, true, null);
                copyBundleEntries(sourceBundle, subPath, sourcePrefix, destination, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
                progress.setWorkRemaining(--work);
            } else {
                copyBundleEntry(sourceBundle, subPath, sourcePrefix, destination, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
                progress.setWorkRemaining(--work);
View Full Code Here

        BuildPathsBlock.addJavaNature(project, progress.newChild(1));

        // Create the source folder
        IFolder srcFolder = project.getFolder("src");
        if (!srcFolder.exists()) {
            srcFolder.create(true, true, progress.newChild(1));
        }
        progress.setWorkRemaining(3);

        // Create the output location
        IFolder outputFolder = project.getFolder("bin");
View Full Code Here

        progress.setWorkRemaining(3);

        // Create the output location
        IFolder outputFolder = project.getFolder("bin");
        if (!outputFolder.exists())
            outputFolder.create(true, true, progress.newChild(1));
        outputFolder.setDerived(true, null);
        progress.setWorkRemaining(2);

        // Set the output location
        javaProject.setOutputLocation(outputFolder.getFullPath(), progress.newChild(1));
View Full Code Here

    for (int ii = 1; ii <= path.segmentCount(); ii++) {
      IPath subpath = path.uptoSegment(ii);
      IFolder subfolder = project.getFolder(subpath);
     
      if (subfolder.exists() == false) {
        subfolder.create(true, true, monitor);
      }
    }
   
    return project.getFolder(path);
  }
View Full Code Here

        if (folder.exists()) {
          // System.err.println("Parser.getSource exists " + folder.getLocation());
        }
        else {
          // System.err.println("Parser.getSource creating " + folder.getLocation());
          folder.create(true, true, null);
        }
      }

      final TSubSt subst = TGlobal.sub(this.global);
      final URLClassLoader loader = TSubSt.loader(subst);
View Full Code Here

      IFile file = project.getProject().getFile(".settings/.jbpm.runtime");
      String runtimeString = "<runtime>" + runtime.getName() + "</runtime>";
      if (!file.exists()) {
        IFolder folder = project.getProject().getFolder(".settings");
        if (!folder.exists()) {
          folder.create(true, true, null);
        }
        file.create(new ByteArrayInputStream(runtimeString.getBytes()), true, null);
      } else {
        file.setContents(new ByteArrayInputStream(runtimeString.getBytes()), true, false, null);
      }
View Full Code Here

    return project.getLocation().toFile().toPath();
  }
 
  public IFolder createFolder(String name) throws CoreException {
    IFolder folder = getFolder(name);
    folder.create(true, true, null);
    return folder;
  }
 
  public IFolder getFolder(String name) {
    IFolder folder = project.getFolder(name);
View Full Code Here

    IProject project = preferences.project();
    for (String segment : segmentsOf(directoryName)) {
      path.append(segment);
      directory = project.getFolder(path.toString());
      if (!directory.exists()) {
        directory.create(true, true, NO_MONITOR);
      }
      path.append(SEPARATOR);
    }
    return directory;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.