Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IWorkspace


            return element.exists();
        }
    }

    protected boolean resourceExists() {
        final IWorkspace workspace = ResourcesPlugin.getWorkspace();
        if (workspace == null) {
            return false;
        }
        return ErlangEngine
                .getInstance()
                .getModelUtilService()
                .getTarget(workspace.getRoot(),
                        getResource().getFullPath().makeRelative(), true) != null;
    }
View Full Code Here


        if (IS_CASE_SENSITIVE) {
            return externalPath;
        }

        // if not external path, return original path
        final IWorkspace workspace = ResourcesPlugin.getWorkspace();
        if (workspace == null) {
            return externalPath; // protection during shutdown (30487)
        }
        if (workspace.getRoot().findMember(externalPath) != null) {
            return externalPath;
        }

        IPath canonicalPath = null;
        try {
View Full Code Here

    ErlModelCache _erlModelCache = new ErlModelCache();
    HandleManager _handleManager = new HandleManager(_erlModelCache);
    this.handleManager = _handleManager;
    ListenerList _listenerList = new ListenerList();
    this.listenerList = _listenerList;
    IWorkspace _workspace = this.erlModel.getWorkspace();
    _workspace.addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
  }
View Full Code Here

  }
 
  public void shutdown() {
    boolean _tripleNotEquals = (this.erlModel != null);
    if (_tripleNotEquals) {
      IWorkspace _workspace = this.erlModel.getWorkspace();
      _workspace.removeResourceChangeListener(this);
    }
    this.listenerList = null;
    this.handleManager = null;
    this.erlModel = null;
  }
View Full Code Here

public class ErlModel extends ErlElement implements IErlModel {
  private final IWorkspace workspace;
 
  public ErlModel() {
    super(null, null);
    IWorkspace _workspace = ResourcesPlugin.getWorkspace();
    this.workspace = _workspace;
  }
View Full Code Here

        this.notifier = notifier;
        this.context = context;
    }

    public IProject createProject() throws CoreException {
        final IWorkspace workspace = ResourcesPlugin.getWorkspace();
        final IProject newProjectHandle = workspace.getRoot().getProject(name);

        if (newProjectHandle.exists()) {
            throw new CoreException(Status.OK_STATUS);
        }

        final IProjectDescription description = workspace.newProjectDescription(name);
        description.setLocationURI(location);

        // // update the referenced project if provided
        if (referencedProjects != null) {
            description.setReferencedProjects(referencedProjects);
View Full Code Here

        elementChangedListeners = Lists.newArrayList();
        deltaManager = new ErlModelDeltaManager(this);
    }

    public final void setupWorkspaceListeners() {
        final IWorkspace workspace = ResourcesPlugin.getWorkspace();
        final IPathVariableManager pvm = workspace.getPathVariableManager();
        pvm.addChangeListener(fPathVariableChangeListener);
        final IResourceChangeListener listener = new ResourceChangeListener();
        workspace.addResourceChangeListener(listener);
    }
View Full Code Here

    }

    @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

                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

      }
    }
  }
 
  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

TOP

Related Classes of org.eclipse.core.resources.IWorkspace

Copyright © 2018 www.massapicom. 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.