Package org.eclipse.core.resources

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


                    newPath = null;
                }

                IWorkspace workspace = ResourcesPlugin.getWorkspace();
                final IProjectDescription description =
                        workspace.newProjectDescription(newProjectHandle.
                        getName());
                description.setLocation(newPath);

                // create the new project operation
                WorkspaceModifyOperation op =
View Full Code Here


            }
            f = new File(locationAsFile, ".classpath");
            if (f.exists()) {
                f.delete();
            }
            IProjectDescription pid = workspace
                .newProjectDescription(_projectName);
            String natures[] = { "org.eclipse.jdt.core.javanature" };
            pid.setNatureIds(natures);
            pid.setLocation(null);
View Full Code Here

   * @throws CoreException
   */
  private IProject createIProject(String name, final java.net.URI hdfsURI) {
    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
    final IProject project = workspace.getRoot().getProject(name);
    final IProjectDescription pd = workspace.newProjectDescription(name);
      WorkspaceJob operation = new WorkspaceJob("Adding HDFS Location") {

      @Override
      public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
        monitor.beginTask("Creating Project", 100);
View Full Code Here

    URI projectURI = (!wizardPage.useDefaults()) ? wizardPage
        .getLocationURI() : null;

    IWorkspace workspace = ResourcesPlugin.getWorkspace();

    final IProjectDescription desc = workspace
        .newProjectDescription(projectHandle.getName());

    desc.setLocationURI(projectURI);

    /*
 
View Full Code Here

         
          if (locationPath.append(".project").toFile().exists()) {
            ProjectDescriptionReader reader = new ProjectDescriptionReader(project);
            description = reader.read(locationPath.append(".project"));
          } else {
            description = workspace.newProjectDescription(projectName);
          }
         
          // If it is under the root use the default location
          if (Platform.getLocation().isPrefixOf(locationPath)) {
            description.setLocation(null);
View Full Code Here

    if (!page.useDefaults())
      newPath = page.getLocationPath();

    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProjectDescription description;
    description = workspace.newProjectDescription(newProject.getName());
    description.setLocation(newPath);

    CreateProjectOperation op;
    op = new CreateProjectOperation(newProject, description);
View Full Code Here

    if (!_mainPage.useDefaults()) {
      location = _mainPage.getLocationURI();
    }

    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    final IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
    description.setLocationURI(location);

    // update the referenced project if provided
    final IProject[] refProjects;
    if (_referencePage != null) {
View Full Code Here

        IPath newPath = null;
        if (!mainPage.useDefaults())
            newPath = mainPage.getLocationPath();

        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        final IProjectDescription description = workspace
                .newProjectDescription(newProjectHandle.getName());
        description.setLocation(newPath);
        addNatures(description);

        // create the new project operation
View Full Code Here

     * @param location URI
     * @return
     */
    protected IProjectDescription createProjectDescription(IProject newProjectHandle, URI location) {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    final IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
    description.setLocationURI(location);
    String[] natures = description.getNatureIds();
    int numberOfAddedNatures = 2;
    boolean addTernNature = store.getBoolean(PreferenceConstants.ADD_TERN_NATURE);
    if (addTernNature){
View Full Code Here

        // get a project handle
        final IProject projectHandle = getProjectHandle(projectName);

        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        final IProjectDescription description = workspace.newProjectDescription(projectHandle.getName());
        description.setLocation(projectLocationPath);

        // update the referenced project if provided
        if (references != null && references.length > 0) {
            description.setReferencedProjects(references);
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.