Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IWorkspace.newProjectDescription()


          }

          monitor.subTask("importing project into workspace");
          IWorkspace workspace = ResourcesPlugin.getWorkspace();
          IProject project = workspace.getRoot().getProject(projectPage.getProjectName());
          IProjectDescription desc = workspace.newProjectDescription(projectPage.getProjectName());
          if (projectPage.isExternalProject()) {
            desc.setLocation(new Path(projectLocation));
          }

          project.create(desc, new NullProgressMonitor());
View Full Code Here


    public static void createGeneralProject(String projectName, File projectDir, IProgressMonitor mon) throws CoreException {
      mon.beginTask("Create project "+projectName, 3);
      try {
        //1
        IWorkspace ws = ResourcesPlugin.getWorkspace();
        IProjectDescription projectDescription = ws.newProjectDescription(projectName);
        Path projectLocation = new Path(projectDir.getAbsolutePath());
        if (!GeneralProjectImport.isDefaultProjectLocation(projectName, projectDir)) {
          projectDescription.setLocation(projectLocation);
        }
        //To improve error message... check validity of project location vs name
View Full Code Here

          InterruptedException {
        monitor.subTask("Creating project " + projectName);

        Policy.checkCancelled(monitor);
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IProjectDescription projectDescription = workspace.newProjectDescription(projectName);

        URI projectLocation = (projectPath != null && !ResourcesPlugin.getWorkspace().getRoot()
            .getLocationURI().equals(projectPath)) ? projectPath : null;

        projectDescription.setLocationURI(projectLocation);
View Full Code Here

      IStatus result = ResourcesPlugin.getWorkspace().validateProjectLocationURI(project, locationURI);
      if (!result.isOK()) {
        return result;
      }

      newDesc = workspace.newProjectDescription(projectName);
      newDesc.setBuildSpec(downloadedDescription.getBuildSpec());
      newDesc.setComment(downloadedDescription.getComment());
      newDesc.setDynamicReferences(downloadedDescription.getDynamicReferences());
      newDesc.setNatureIds(downloadedDescription.getNatureIds());
      newDesc.setReferencedProjects(downloadedDescription.getReferencedProjects());
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.