Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IProject.open()


    String projectName = generateProjectName();
    System.out.println("Creating project " + projectName);
   
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
    project.create(null);
    project.open(null);
   
    IProjectDescription description = project.getDescription();
    description.setNatureIds(new String[] { JavaCore.NATURE_ID });
    project.setDescription(description, null);
   
View Full Code Here


                try {
                    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=219901
                    // Making this undoable would be a bad idea
                    op1.execute(monitor, notifier);

                    newProjectHandle.open(monitor);
                    description.setNatureIds(new String[] { ErlangCore.NATURE_ID });
                    newProjectHandle.setDescription(description, null);

                    final BuilderTool builder = info.getBuilder();
                    ErlangNature.setErlangProjectBuilder(newProjectHandle, builder);
View Full Code Here

        try {
            if (!project.exists()) {
                IProjectDescription description = ws.newProjectDescription(name);
                description.setLocation(new Path(path));
                project.create(description, null);
                project.open(null);

                description = project.getDescription();
                description.setNatureIds(new String[] { ModelPlugin.NATURE_ID });
                description.setName(name);
                project.setDescription(description, null);
View Full Code Here

                description.setNatureIds(new String[] { ModelPlugin.NATURE_ID });
                description.setName(name);
                project.setDescription(description, null);
            }
            if (!project.isOpen()) {
                project.open(null);
            }
            return createProject(project);
        } catch (final CoreException e) {
            throw new ErlModelException(e, new ErlModelStatus(e));
        }
View Full Code Here

        try {
            aProject.close(null);
            erlProject.getReferencedProjects();
        } finally {
            if (!aProject.isOpen()) {
                aProject.open(null);
            }
        }
    }

    // IErlModule getModule(String name) throws ErlModelException;
View Full Code Here

    this.setUpFile(_workspaceURL, name);
    final IProject project = this.getProject(name);
    final IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
      public void run(final IProgressMonitor monitor) throws CoreException {
        project.create(null);
        project.open(null);
      }
    };
    IWorkspace _workspace = this.getWorkspace();
    _workspace.run(runnable, null);
    return project;
View Full Code Here

      _workspaceProject.close(null);
      HandleDelta _newDelta_5 = this.newDelta();
      HandleDelta _insertRemoved_1 = _newDelta_5.insertRemoved(erlProject2, HandleDelta.F_OPEN);
      ErlNotificationTest.assertEquality(_insertRemoved_1, this.listener.delta);
      IProject _workspaceProject_1 = erlProject2.getWorkspaceProject();
      _workspaceProject_1.open(null);
      HandleDelta _newDelta_6 = this.newDelta();
      HandleDelta _insertAdded_2 = _newDelta_6.insertAdded(erlProject2, HandleDelta.F_OPEN);
      ErlNotificationTest.assertEquality(_insertAdded_2, this.listener.delta);
      IProject _workspaceProject_2 = erlProject2.getWorkspaceProject();
      _workspaceProject_2.delete(true, null);
View Full Code Here

    IProject project = root.getProject("Tmp");
    if (!project.exists()) {
      project.create(null);
    }
    if (!project.isOpen()) {
      project.open(null);
    }

    IFile file = project.getFile(System.nanoTime() + ".txt");
    if (!file.exists()) {
      File tmpFile = File.createTempFile("tmp", "txt");
View Full Code Here

    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject project = workspace.getRoot().getProject(name);
    IProjectDescription pd = workspace.newProjectDescription(name);
    pd.setLocationURI(hdfsURI);
    project.create(pd, new NullProgressMonitor());
    project.open(new NullProgressMonitor());
    RepositoryProvider.map(project, HDFSTeamRepositoryProvider.ID);
    return project;
  }

  public HDFSServer getServer(String uri) {
View Full Code Here

  public static CompilationUnit parseCode(String qualifiedCompUnitName, String code) throws CoreException {
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    CompilationUnit node;
   
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("CrystalTest");
    project.open(null /* IProgressMonitor */);
   
    IJavaProject javaProject = JavaCore.create(project);

    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setProject(javaProject);
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.