Package org.eclipse.core.resources

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


    try{
    IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
   
    if(!newProject.exists()){
      newProject.create(null);
      newProject.open(null);
     
      IProjectDescription description = newProject.getDescription();
      description.setNatureIds(new String[] { JadexProjectNature.NATURE_ID,JavaCore.NATURE_ID});
      newProject.setDescription(description, null);
     
View Full Code Here


    try{
    final IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
    if(!newProject.exists()){     
      //STEP 1 - Create new IProject
      newProject.create(null);
      newProject.open(null);
     
      //STEP 2 - Create folder structure
      createFolder(newProject, "src/main/java/", null);
      createFolder(newProject, "src/main/resources", null);
      createFolder(newProject, "src/test/java", null);
View Full Code Here

    try{
    final IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
    if(!newProject.exists()){     
      //STEP 1 - Create new IProject
      newProject.create(null);
      newProject.open(null);
     
      //STEP 2 - Create folder structure
      createFolder(newProject, "src/main/java/", null);
      createFolder(newProject, "src/main/resources", null);
      createFolder(newProject, "src/test/java", null);
View Full Code Here

      try {
        project.create(null);
      } catch (CoreException exc) {
      }
      try {
        project.open(null);
      } catch (CoreException exc) {
      }
      return ret;
    } catch (JDOMException exc) {
      throw new RuntimeException(exc);
View Full Code Here

            project.create(projectDescription, monitor);
        } else {
            project.create(monitor);
        }

        project.open(null);
    }

}
View Full Code Here

    {
        if( this.project == null )
        {
            final IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject( this.testClass.getName() );
            p.create( null );
            p.open( null );
           
            final IProjectDescription desc = p.getDescription();
            desc.setNatureIds( new String[] { JavaCore.NATURE_ID } );
            p.setDescription( desc, null );
           
View Full Code Here

            n = n + "." + name;
        }
       
        final IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject( n );
        p.create( null );
        p.open( null );
       
        return p;
    }
   
    protected final IFolder createFolder( final IProject project,
View Full Code Here

        File srcLocFile = projectLoc.append("src").toFile();
        srcLocFile.mkdir();

        assertTrue(!project.exists());
        project.create(monitor);
        project.open(monitor);
        project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
        IJobManager jobManager = Job.getJobManager();
        jobManager.resume();
        final PythonNature nature = (PythonNature) PythonNature.addNature(project, null, null, null, null, null, null);
        assertTrue(nature != null);
View Full Code Here

    }

    deleteStaleProject(name, folder);
    IProject project = createProject(
        name, folder, (String[])natures.toArray(new String[natures.size()]));
    project.open(null);
    // calling refresh for those project created against an existing code base.
    // performing a preemptive refresh prevents ProjectUtils.getFile
    // (IFile.refreshLocal) from kicking off a rebuild workspace job, which in
    // turn can cause issues with pdt select and completion engines
    // (See PhpUtils.waitOnBuild).
View Full Code Here

  {
    String name = commandLine.getValue(Options.PROJECT_OPTION);

    IProject project = ProjectUtils.getProject(name);
    if(project.exists()){
      project.open(null);
      return Services.getMessage("project.opened", name);
    }
    return Services.getMessage("project.not.found", name);
  }
}
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.