Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.OperationCanceledException


      public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
        try {
          finishPage(monitor);
        } catch (InterruptedException e) {
          VisualSwingPlugin.getLogger().error(e);
          throw new OperationCanceledException(e.getMessage());
        }
      }
    };
    try {
      ISchedulingRule rule = null;
View Full Code Here


  protected SubMonitor getSubMonitor(int workDoneInTicks, SubMonitor monitor) {
    if (!monitor.isCanceled()) {
      return monitor.newChild(workDoneInTicks);
    }
    else {
      throw new OperationCanceledException();
    }
  }
View Full Code Here

    @Override
    protected void createProject(IProject project, URI locationURI, IProgressMonitor monitor)
        throws CoreException {
      super.createProject(project, locationURI, monitor);
      if (monitor.isCanceled()) {
        throw new OperationCanceledException();
      }
      configureCreatedProject(new SubProgressMonitor(monitor, 0));
    }
View Full Code Here

        try {
            monitor.beginTask("", 2000);
            projectHandle.create(description, new SubProgressMonitor(monitor,
                    1000));
            if (monitor.isCanceled()) {
                throw new OperationCanceledException();
            }
            projectHandle.open(IResource.BACKGROUND_REFRESH,
                new SubProgressMonitor(monitor, 1000));
        } finally {
            monitor.done();
View Full Code Here

    List<Delta> deltas = context.getDeltas();
    if (deltas.isEmpty()) {
      return;
    }
    if (monitor.isCanceled()) {
      throw new OperationCanceledException();
    }
    SubMonitor subMonitor = SubMonitor.convert(monitor, deltas.size() * 2 + 2);
    IProject project = context.getBuiltProject();
    CompilerPreferences compilerPreferences = compilerPreferences(storeAccess, project);
    if (!compilerPreferences.shouldCompileProtoFiles()) {
      return;
    }
    PathsPreferences pathsPreferences = new PathsPreferences(storeAccess, project);
    ProtocCommandBuilder commandBuilder = new ProtocCommandBuilder(compilerPreferences, pathsPreferences);
    for (Delta delta : deltas) {
      if (subMonitor.isCanceled()) {
        throw new OperationCanceledException();
      }
      IFile protoFile = protoFile(delta.getUri(), project);
      subMonitor.worked(1);
      if (protoFile != null) {
        subMonitor.subTask("Compiling " + protoFile.getName() + " with protoc");
View Full Code Here

  @Override
  public void afterClose(FileHandle file) {
    try {
      // early bail?
      if (monitor != null && monitor.isCanceled())
        throw new OperationCanceledException();
     
      // make backup?
      if (makeBackup()) {
        File backup = new File( file.getTargetFile().getAbsolutePath() + ".old" );
        FileWriter fw = new FileWriter( backup );
View Full Code Here

   */
  public void afterClose(FileHandle file) {
    try {
      // early bail?
      if (monitor != null && monitor.isCanceled())
        throw new OperationCanceledException();
     
      // make backup?
      if (makeBackup()) {
        File backup = new File( file.getTargetFile().getAbsolutePath() + ".old" );
        FileWriter fw = new FileWriter( backup );
View Full Code Here

   */
  public void afterClose(FileHandle file) {
    try {
      // early bail?
      if (monitor != null && monitor.isCanceled())
        throw new OperationCanceledException();
     
      // make backup?
      if (makeBackup()) {
        File backup = new File( file.getTargetFile().getAbsolutePath() + ".old" );
        FileWriter fw = new FileWriter( backup );
View Full Code Here

      while (fDocumentLocked) {
        try {
          fDocumentAccessorLock.wait();
        } catch (InterruptedException e) {
          // nobody interrupts us!
          throw new OperationCanceledException();
        }
      }
      fDocumentLocked= true;
    }
  }
View Full Code Here

      if (page4.isExample1Included()) {
        generator.build("resources/config/deploy-example1.xml");
      }

      if (monitor.isCanceled()) {
        throw new OperationCanceledException();
      }
      projectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);

      monitor.worked(1000);
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.OperationCanceledException

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.