Examples of IWorkspace


Examples of org.eclipse.core.resources.IWorkspace

    }

    @Override
    public final IErlProject newProject(final String name, final String path)
            throws ErlModelException {
        final IWorkspace ws = ResourcesPlugin.getWorkspace();
        final IProject project = ws.getRoot().getProject(name);
        try {
            if (!project.exists()) {
                IProjectDescription description = ws.newProjectDescription(name);
                description.setLocation(new Path(path));
                project.create(description, null);
                project.open(null);

                description = project.getDescription();
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

                if (selection instanceof ITextSelection) {
                    String text = ((ITextSelection) selection).getText();
                    if (text != null) {
                        text = text.trim();
                        if (text.length() > 0) {
                            final IWorkspace workspace = ResourcesPlugin.getWorkspace();
                            final IStatus result = workspace.validateName(text,
                                    IResource.FILE);
                            if (result.isOK()) {
                                setInitialPattern(text);
                            }
                        }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

      }
    }
  }
 
  private static IResource getResource(final IPath fullPath, final int resourceType) {
    IWorkspace _workspace = ResourcesPlugin.getWorkspace();
    final IWorkspaceRoot root = _workspace.getRoot();
    switch (resourceType) {
      case IResource.ROOT:
        return root;
      case IResource.PROJECT:
        String _lastSegment = fullPath.lastSegment();
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

        }
    }

    @After
    public void teardown() throws CoreException {
        final IWorkspace w = ResourcesPlugin.getWorkspace();
        final IProject p = w.getRoot().getProject(name);
        if (p.exists()) {
            p.delete(true, null);
        }
    }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

 
  /**
   * Shortcut to <code>workspace.root</code>
   */
  protected IWorkspaceRoot getWorkspaceRoot() {
    IWorkspace _workspace = this.getWorkspace();
    return _workspace.getRoot();
  }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

      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

Examples of org.eclipse.core.resources.IWorkspace

   * @param value
   *            boolean
   * @throws CoreException
   */
  protected void setAutoBuilding(final boolean value) throws CoreException {
    IWorkspace _workspace = this.getWorkspace();
    final IWorkspaceDescription description = _workspace.getDescription();
    boolean _isAutoBuilding = description.isAutoBuilding();
    boolean _notEquals = (value != _isAutoBuilding);
    if (_notEquals) {
      description.setAutoBuilding(value);
      IWorkspace _workspace_1 = this.getWorkspace();
      _workspace_1.setDescription(description);
    }
  }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

   * Builds the workspace, waiting for build completion.
   *
   * @throws CoreException
   */
  protected void buildWorkspace() throws CoreException {
    IWorkspace _workspace = this.getWorkspace();
    _workspace.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
    this.waitForBuildCompletion();
  }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

    {
      final List<IErlFolder> result = CollectionLiterals.<IErlFolder>newArrayList();
      Collection<IPath> _sourceDirs = this.properties.getSourceDirs();
      for (final IPath path : _sourceDirs) {
        {
          IWorkspace _workspace = ResourcesPlugin.getWorkspace();
          IWorkspaceRoot _root = _workspace.getRoot();
          IPath _baseDir = this.properties.getBaseDir();
          IPath _append = _baseDir.append(path);
          IResource _findMember = _root.findMember(_append);
          final IErlElement element = ErlModelCore.create(_findMember);
          if ((element instanceof IErlFolder)) {
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace

        } catch (final CoreException e) {
            ErlLogger.warn(e);
            pathsMap = Maps.newHashMap();
        }

        final IWorkspace workspace = ResourcesPlugin.getWorkspace();
        workspace.addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
    }
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.