Package org.eclipse.core.resources

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


    if (project.exists()) {
      throwCoreException("A project with name '" + runtimeName + "' already exists in the workspace.");
    } else {
      // create project     
      project.create(new SubProgressMonitor(monitor, 1));     
      project.open(new SubProgressMonitor(monitor, 1));
     
      JDTUtils.addNature(project, WGADesignerPlugin.NATURE_WGA_RUNTIME);     
     
      _wgaRuntime = (WGARuntime) project.getNature(WGADesignerPlugin.NATURE_WGA_RUNTIME);
      _wgaRuntime.getConfiguration().setWgaDistribution(deployment.getName());
View Full Code Here


        IWorkspaceRunnable create = new IWorkspaceRunnable() {

            public void run(IProgressMonitor monitor) throws CoreException {
                project1.create(null);
                project1.open(null);
            }
        };
        workspace.run(create, null);
        return project1;
    }
View Full Code Here

        }
    }

    private static void openProject(IProgressMonitor monitor) throws CoreException {
        IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(Workspace.CNFDIR);
        project.open(monitor);
    }

    protected void importCnf(IProgressMonitor monitor) throws CoreException {
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IPath location = operation.getLocation();
View Full Code Here

        IContainer container = workspace.getRoot().getContainerForLocation(location);
        if (container == null) {
            IProjectDescription projDesc = workspace.loadProjectDescription(location.append(IProjectDescription.DESCRIPTION_FILE_NAME));
            IProject project = workspace.getRoot().getProject(Workspace.CNFDIR);
            project.create(projDesc, monitor);
            project.open(monitor);
        } else if (container.getType() == IResource.PROJECT) {
            IProject project = (IProject) container;
            if (project.exists()) {
                project.open(monitor);
            } else {
View Full Code Here

            project.create(projDesc, monitor);
            project.open(monitor);
        } else if (container.getType() == IResource.PROJECT) {
            IProject project = (IProject) container;
            if (project.exists()) {
                project.open(monitor);
            } else {
                project.create(monitor);
            }
        } else {
            throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Incorrect path (not a project): " + location, null));
View Full Code Here

        if (!cnfProject.exists())
            cnfProject = eclipseWorkspace.getProject("cnf");

        if (cnfProject.exists()) {
            if (!cnfProject.isOpen())
                cnfProject.open(null);
            return cnfProject.getLocation().toFile().getParentFile();
        }

        // Have to assume that the eclipse workspace == the bnd workspace,
        // and cnf hasn't been imported yet.
View Full Code Here

        if (!cnfProject.exists())
            cnfProject = eclipseWorkspace.getProject("cnf");

        if (cnfProject.exists()) {
            if (!cnfProject.isOpen())
                cnfProject.open(null);
            return cnfProject.getLocation().toFile().getParentFile();
        }

        // Have to assume that the eclipse workspace == the bnd workspace,
        // and cnf hasn't been imported yet.
View Full Code Here

    final IProject project = getWorkspaceRoot().getProject(projectName);
    IWorkspaceRunnable populate = new IWorkspaceRunnable() {
      public void run(IProgressMonitor monitor) throws CoreException {
        project.create(null);
        try {
          project.open(null);
        }
        catch (ConcurrentModificationException e) {
          // wait and try again to work-around
          // ConcurrentModificationException (bug 280488)
          try {
View Full Code Here

        catch (ConcurrentModificationException e) {
          // wait and try again to work-around
          // ConcurrentModificationException (bug 280488)
          try {
            Thread.sleep(500);
            project.open(null);
            project.refreshLocal(IResource.DEPTH_INFINITE, null);
          }
          catch (InterruptedException e1) {
            Thread.currentThread().interrupt();
          }
View Full Code Here

    IProject project = workspaceRoot.getProject("test-java-project");
    if (project.exists()) {
      project.delete(true, true, null);
    }
    project.create(null);
    project.open(null);
   
    return project;
  }

  @Before
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.