Package org.eclipse.core.resources

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


      if (!ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(creationURI)) {
        IPath path = URIUtil.toPath(creationURI).append(projectName);
        uri = URIUtil.toURI(path);
      }
      desc.setLocationURI(uri);
      project.create(desc, monitor);
    }
    if (!project.isOpen()) {
      project.open(monitor);
    }
    return project;
View Full Code Here


    }

    @Override
    protected void preInstallTemplate(IProgressMonitor monitor) throws Exception {
      IProject project = getProject();
      project.create(_projectDescription, new SubProgressMonitor(monitor, 1000));
    }

    @Override
    protected void postInstallTemplate(IProgressMonitor monitor) throws Exception {
      NewWOProjectWizard.this.postInstallTemplate(getProject(), monitor);
View Full Code Here

  public void testAddIncrementalFrameworkNature() {
    IProject project = this.getProject("testAddIncrementalFrameworkNature");
    NullProgressMonitor monitor = new NullProgressMonitor();
    try {
      project.create(monitor);
      project.open(monitor);
      IProjectDescription description = project.getDescription();
      List<String> naturesList = new ArrayList<String>(Arrays.asList(description.getNatureIds()));
      naturesList.add("org.eclipse.jdt.core.javanature");
      description.setNatureIds(naturesList.toArray(new String[naturesList.size()]));
View Full Code Here

  public void testAddIncrementalApplicationNature() {
    IProject project = this.getProject("testAddIncrementalApplicationNature");
    NullProgressMonitor monitor = new NullProgressMonitor();
    try {
      project.create(monitor);
      project.open(monitor);
      IProjectDescription description = project.getDescription();
      List<String> naturesList = new ArrayList<String>(Arrays.asList(description.getNatureIds()));
      naturesList.add("org.eclipse.jdt.core.javanature");
      description.setNatureIds(naturesList.toArray(new String[naturesList.size()]));
View Full Code Here

  public void testAddAndFrameworkNature() {
    IProject project = this.getProject("testAddAndFrameworkNature");
    NullProgressMonitor monitor = new NullProgressMonitor();
    try {
      project.create(monitor);
      project.open(monitor);
      IProjectDescription description = project.getDescription();
      List<String> naturesList = new ArrayList<String>(Arrays.asList(description.getNatureIds()));
      naturesList.add("org.eclipse.jdt.core.javanature");
      description.setNatureIds(naturesList.toArray(new String[naturesList.size()]));
View Full Code Here

  public void testAddAntApplicationNature() {
    IProject project = this.getProject("testAddAntApplicationNature");
    NullProgressMonitor monitor = new NullProgressMonitor();
    try {
      project.create(monitor);
      project.open(monitor);
      IProjectDescription description = project.getDescription();
      List<String> naturesList = new ArrayList<String>(Arrays.asList(description.getNatureIds()));
      naturesList.add("org.eclipse.jdt.core.javanature");
      description.setNatureIds(naturesList.toArray(new String[naturesList.size()]));
View Full Code Here

        try {
          for (IProjectDescription projectDescription : projectDescriptions) {
            try {
              IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectDescription.getName());
              monitor.beginTask("Importing " + project.getName() + " ...", 100);
              project.create(projectDescription, new SubProgressMonitor(monitor, 30));
              project.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 70));
            }
            catch (Throwable t) {
              System.out.println("ImportProjectsTask.run: " + t.getMessage());
            }
View Full Code Here

        ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());
    description.setLocationURI(projectProject.getProjectUri());
    description.setNatureIds(new String[] { JS_DEBUG_PROJECT_NATURE });
    try {

      project.create(description, null);
      project.open(null);

      return project;
    } catch (CoreException e) {
      ChromiumDebugPlugin.log(e);
View Full Code Here

    if(!(projectName.trim().length() > 0)) return null;
    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

    if(!(projectName.trim().length() > 0)) return null;
    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);
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.