Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IWorkspace.run()


    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    if (workspace.isTreeLocked()) {
      new BatchOperation(action).run(monitor);
    } else {
      // use IWorkspace.run(...) to ensure that a build will be done in autobuild mode
      workspace.run(new BatchOperation(action), rule, IWorkspace.AVOID_UPDATE, monitor);
    }
  }
  /**
   * Bind a container reference path to some actual containers (<code>IClasspathContainer</code>).
   * This API must be invoked whenever changes in container need to be reflected onto the JavaModel.
View Full Code Here


                @Override
                public void run(IMarker marker) {
                    final IFile file = (IFile) marker.getResource();
                    final IWorkspace workspace = file.getWorkspace();
                    try {
                        workspace.run(new IWorkspaceRunnable() {
                            @Override
                            public void run(IProgressMonitor monitor) throws CoreException {
                                String input = "version " + suggestedVersion;
                                ByteArrayInputStream stream = new ByteArrayInputStream(input.getBytes());
                                file.setContents(stream, false, true, monitor);
View Full Code Here

            result.add(new IMarkerResolution() {
                public void run(IMarker marker) {
                    final IFile file = (IFile) marker.getResource();
                    final IWorkspace workspace = file.getWorkspace();
                    try {
                        workspace.run(new IWorkspaceRunnable() {
                            public void run(IProgressMonitor monitor) throws CoreException {
                                String input = "version " + suggestedVersion;
                                ByteArrayInputStream stream = new ByteArrayInputStream(input.getBytes());
                                file.setContents(stream, false, true, monitor);
                            }
View Full Code Here

            }
        };

        try
        {
            workspace.run(op, Job.getJobManager().createProgressGroup());
        }
        catch (CoreException e)
        {
            SigilCore.error("Failed to complete project wizard", e);
            return false;
View Full Code Here

                }
            };

            try
            {
                workspace.run(op, workspace.getRoot(), IWorkspace.AVOID_UPDATE,
                    Job.getJobManager().createProgressGroup());
                setErrorMessage(null);
                setPageComplete(true);
                created = true;
                updated = true;
View Full Code Here

        IWorkspace workspace = ResourcesPlugin.getWorkspace();

        try
        {
            workspace.run(op, Job.getJobManager().createProgressGroup());
        }
        catch (CoreException e)
        {
            SigilCore.error("Failed to run workspace job", e);
        }
View Full Code Here

        project.create(null);
        project.open(null);
      }
    };
    IWorkspace _workspace = this.getWorkspace();
    _workspace.run(runnable, null);
    return project;
  }
 
  protected void setUpFile(final URL resourceURL, final String path) throws IOException {
    Assert.assertNotNull(resourceURL);
View Full Code Here

 
  public void create(final URI location, final IProgressMonitor monitor) {
    try {
      IHandle _parent = this.getParent();
      final IWorkspace workspace = ((ErlModel) _parent).getWorkspace();
      workspace.run(
        new IWorkspaceRunnable() {
          public void run(final IProgressMonitor monitor0) {
            try {
              IProgressMonitor _elvis = null;
              if (monitor0 != null) {
View Full Code Here

                    Messages.getString("MultiPageEditor.26") //$NON-NLS-1$
                            + getMessagesToRootCause(e), MessageDialog.ERROR);
          }
        }
      };
      workspace.run(runnable, monitor);
      getPrimarySourceFolder().refreshLocal(IResource.DEPTH_INFINITE, null);

      String jcasMsg = jCasGenThrower.getMessage();
      if (null != jcasMsg && jcasMsg.length() > 0) {
        Utility.popMessage(Messages.getString("MultiPageEditor.JCasGenErrorTitle"), //$NON-NLS-1$
View Full Code Here

        try {
            getContainer().run(false, false, new IRunnableWithProgress() {
                public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                    try {
                        IWorkspace ws = ResourcesPlugin.getWorkspace();
                        ws.run(operation, monitor);

                        if (monitor.isCanceled())
                            throw new InterruptedException();
                    } catch (CoreException e) {
                        throw new InvocationTargetException(e);
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.