Package org.eclipse.core.resources

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


  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


    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
        PROJECT);
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    CompilationUnit node;

    project.open(null);

    IJavaProject javaProject = JavaCore.create(project);
    ICompilationUnit source = javaProject.findType(qualifiedCompUnitName)
        .getCompilationUnit();
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

       
        WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
            protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
                monitor.beginTask("", 2500);
                project.create(description, monitor);
                project.open(monitor);
               
                IPluginModelBase model = new BundlePluginModelBase(){
                    private static final long serialVersionUID = 1L;

                    public IPluginBase createPluginBase() {
View Full Code Here

       
        WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
            protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
                monitor.beginTask("", 2500);
                project.create(description, monitor);
                project.open(monitor);
               
                IPluginModelBase model = new BundlePluginModelBase(){
                    private static final long serialVersionUID = 1L;

                    public IPluginBase createPluginBase() {
View Full Code Here

                throws CoreException,
                     InvocationTargetException,
                     InterruptedException {
                monitor.beginTask("", 2500);
                project.create(description, monitor);
                project.open(monitor);
               
                IPluginModelBase model = new BundlePluginModelBase(){
                    private static final long serialVersionUID = 1L;

                    public IPluginBase createPluginBase() {
View Full Code Here

    IProject project = EclipseUtils.getWorkspaceRoot().getProject(name);
    if(overwrite && project.exists()) {
      project.delete(true, pm);
    }
    project.create(pm);
    project.open(pm);
    return project;
  }
 
  public static void deleteProject_unchecked(String projectName) {
    IProject project = EclipseUtils.getWorkspaceRoot().getProject(projectName);
View Full Code Here

            pid.setLocation(null);

            proj.create(pid, monitor);
            final IJavaProject javaProj = JavaCore.create(proj);
            if (!proj.isOpen()) {
                proj.open(monitor);
            }

            monitor.worked(1);
            updateClasspath(javaProj, locationAsFile, _projectName, monitor);
            monitor.worked(1);
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.