Tabnine Logo
IProgressMonitor.isCanceled
Code IndexAdd Tabnine to your IDE (free)

How to use
isCanceled
method
in
org.eclipse.core.runtime.IProgressMonitor

Best Java code snippets using org.eclipse.core.runtime.IProgressMonitor.isCanceled (Showing top 20 results out of 1,665)

origin: pentaho/pentaho-kettle

public boolean isCanceled() {
 return monitor.isCanceled();
}
origin: pentaho/pentaho-kettle

 public void run() {
  IProgressMonitor monitor = pmd.getProgressMonitor();
  while ( pmd.getShell() == null || ( !pmd.getShell().isDisposed() && !monitor.isCanceled() ) ) {
   try {
    Thread.sleep( 100 );
   } catch ( InterruptedException e ) {
    // Ignore
   }
  }
  if ( monitor.isCanceled() ) { // Disconnect and see what happens!
   try {
    trans.stopAll();
   } catch ( Exception e ) { /* Ignore */
   }
  }
 }
};
origin: pentaho/pentaho-kettle

 public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException {
  db = new Database( Spoon.loggingObject, dbMeta );
  try {
   db.connect();
   result = db.getQueryFields( sql, false );
   if ( monitor.isCanceled() ) {
    throw new InvocationTargetException( new Exception( "This operation was cancelled!" ) );
   }
  } catch ( Exception e ) {
   throw new InvocationTargetException( e, "Problem encountered determining query fields: " + e.toString() );
  } finally {
   db.disconnect();
  }
 }
};
origin: pentaho/pentaho-kettle

 public void run() {
  IProgressMonitor monitor = pmd.getProgressMonitor();
  while ( pmd.getShell() == null || ( !pmd.getShell().isDisposed() && !monitor.isCanceled() ) ) {
   try {
    Thread.sleep( 250 );
   } catch ( InterruptedException e ) {
    // Ignore sleep interruption exception
   }
  }
  if ( monitor.isCanceled() ) { // Disconnect and see what happens!
   try {
    transMeta.cancelQueries();
   } catch ( Exception e ) {
    // Ignore cancel errors
   }
  }
 }
};
origin: pentaho/pentaho-kettle

 public void run() {
  IProgressMonitor monitor = pmd.getProgressMonitor();
  while ( pmd.getShell() == null || ( !pmd.getShell().isDisposed() && !monitor.isCanceled() ) ) {
   try {
    Thread.sleep( 100 );
   } catch ( InterruptedException e ) {
    // Ignore
   }
  }
  if ( monitor.isCanceled() ) { // Disconnect and see what happens!
   try {
    db.cancelQuery();
   } catch ( Exception e ) {
    // Ignore
   }
  }
 }
};
origin: pentaho/pentaho-kettle

 public void run() {
  IProgressMonitor monitor = pmd.getProgressMonitor();
  while ( pmd.getShell() == null || ( !pmd.getShell().isDisposed() && !monitor.isCanceled() ) ) {
   try {
    Thread.sleep( 250 );
   } catch ( InterruptedException e ) {
    // Ignore
   }
  }
  if ( monitor.isCanceled() ) { // Disconnect and see what happens!
   try {
    db.cancelQuery();
   } catch ( Exception e ) {
    // Ignore
   }
  }
 }
};
origin: pentaho/pentaho-kettle

 public void run() {
  IProgressMonitor monitor = pmd.getProgressMonitor();
  while ( pmd.getShell() == null || ( !pmd.getShell().isDisposed() && !monitor.isCanceled() ) ) {
   try {
    Thread.sleep( 100 );
   } catch ( InterruptedException e ) {
    // Ignore
   }
  }
  if ( monitor.isCanceled() ) { // Disconnect and see what happens!
   try {
    db.cancelQuery();
   } catch ( Exception e ) {
    // Ignore
   }
  }
 }
};
origin: pentaho/pentaho-kettle

 @Override
 public void run() {
  IProgressMonitor monitor = pmd.getProgressMonitor();
  while ( pmd.getShell() == null || ( !pmd.getShell().isDisposed() && !monitor.isCanceled() ) ) {
   try {
    Thread.sleep( 250 );
   } catch ( InterruptedException e ) {
    // Ignore
   }
  }
  if ( monitor.isCanceled() ) { // Disconnect and see what happens!
   try {
    transMeta.cancelQueries();
   } catch ( Exception e ) {
    // Ignore
   }
  }
 }
};
origin: pentaho/pentaho-kettle

 public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException {
  db = new Database( Spoon.loggingObject, dbMeta );
  try {
   db.connect();
   String sql = dbMeta.getDatabaseInterface().getSelectCountStatement( tableName );
   RowMetaAndData row = db.getOneRow( sql );
   size = row.getRowMeta().getInteger( row.getData(), 0 );
   if ( monitor.isCanceled() ) {
    throw new InvocationTargetException( new Exception( "This operation was cancelled!" ) );
   }
  } catch ( KettleException e ) {
   throw new InvocationTargetException( e, "Couldn't get a result because of an error :" + e.toString() );
  } finally {
   db.disconnect();
  }
 }
};
origin: pentaho/pentaho-kettle

if ( monitor.isCanceled() ) {
 return null;
monitor
  .beginTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.ReadingDocument" ), 1 );
if ( monitor.isCanceled() ) {
 return null;
 monitor.beginTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.ReadingNode" ), 1 );
 if ( monitor.isCanceled() ) {
  return null;
 monitor.subTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.FetchNodes" ) );
 if ( monitor.isCanceled() ) {
  return null;
  if ( monitor.isCanceled() ) {
   return null;
origin: pentaho/pentaho-kettle

if ( monitor.isCanceled() ) {
 return null;
monitor
  .beginTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.ReadingDocument" ), 1 );
if ( monitor.isCanceled() ) {
 return null;
 monitor.beginTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.ReadingNode" ), 1 );
 if ( monitor.isCanceled() ) {
  return null;
 monitor.subTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.FetchNodes" ) );
 if ( monitor.isCanceled() ) {
  return null;
  if ( monitor.isCanceled() ) {
   return null;
origin: pentaho/pentaho-kettle

private void addLoopXPath( Node node, IProgressMonitor monitor ) {
 Element ce = (Element) node;
 monitor.worked( 1 );
 // List child
 for ( int j = 0; j < ce.nodeCount(); j++ ) {
  if ( monitor.isCanceled() ) {
   return;
  }
  Node cnode = ce.node( j );
  if ( !Utils.isEmpty( cnode.getName() ) ) {
   Element cce = (Element) cnode;
   if ( !listpath.contains( cnode.getPath() ) ) {
    nr++;
    monitor.subTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.FetchNodes",
      String.valueOf( nr ) ) );
    monitor.subTask( BaseMessages.getString( PKG, "GetXMLDateLoopNodesImportProgressDialog.Task.AddingNode",
      cnode.getPath() ) );
    listpath.add( cnode.getPath() );
   }
   // let's get child nodes
   if ( cce.nodeCount() > 1 ) {
    addLoopXPath( cnode, monitor );
   }
  }
 }
}
origin: pentaho/pentaho-kettle

&& !trans.isFinished() && !progressMonitor.isCanceled() ) {
if ( progressMonitor.isCanceled() ) {
 cancelled = true;
 trans.stopAll();
origin: pentaho/pentaho-kettle

pmd.run( true, true, op );
if ( !pmd.getProgressMonitor().isCanceled() && isFeedback ) {
origin: pentaho/pentaho-kettle

while ( !errorFound && line != null && ( linenr <= samples || samples == 0 ) && !monitor.isCanceled() ) {
 monitor.subTask( BaseMessages.getString( PKG, "TextFileCSVImportProgressDialog.Task.ScanningLine", ""
   + linenr ) );
origin: pentaho/pentaho-kettle

while ( !errorFound && line != null && ( linenr <= samples || samples == 0 ) && !monitor.isCanceled() ) {
 monitor.subTask( BaseMessages.getString( PKG, "TextFileCSVImportProgressDialog.Task.ScanningLine", ""
  + linenr ) );
origin: pentaho/pentaho-kettle

for ( int i = 0; i < tables.length && !monitor.isCanceled(); i++ ) {
 monitor.setTaskName( BaseMessages.getString( PKG, "Spoon.RipDB.Monitor.ProcessingTable" )
  + tables[i] + "]..." );
origin: eclipse/buildship

  private void forwardCancellation() {
    if (!this.cancelRequested && this.monitor.isCanceled()) {
      this.tokenSource.cancel();
      this.cancelRequested = true;
    }
  }
}
origin: eclipse/eclipse.jdt.ls

public Hover hover(TextDocumentPositionParams position, IProgressMonitor monitor) {
  ITypeRoot unit = JDTUtils.resolveTypeRoot(position.getTextDocument().getUri());
  List<Either<String, MarkedString>> content = null;
  if (unit != null && !monitor.isCanceled()) {
    content = computeHover(unit, position.getPosition().getLine(), position.getPosition().getCharacter(), monitor);
  } else {
    content = Collections.singletonList(Either.forLeft(""));
  }
  Hover $ = new Hover();
  $.setContents(content);
  return $;
}
origin: eclipse/buildship

@Override
public void runInToolingApi(CancellationTokenSource tokenSource, IProgressMonitor monitor) throws Exception {
  SubMonitor progress = SubMonitor.convert(monitor);
  progress.setWorkRemaining(2);
  CancellationToken token = tokenSource.token();
  op1.runInToolingApi(tokenSource, progress.newChild(1));
  if (monitor.isCanceled() && token.isCancellationRequested()) {
    throw new OperationCanceledException();
  }
  op2.runInToolingApi(tokenSource, progress.newChild(1));
}
org.eclipse.core.runtimeIProgressMonitorisCanceled

Javadoc

Returns whether cancelation of current operation has been requested. Long-running operations should poll to see if cancelation has been requested.

Popular methods of IProgressMonitor

  • done
    Notifies that the work is done; that is, either the main task is completed or the user canceled it.
  • beginTask
    Notifies that the main task is beginning. This must only be called once on a given progress monitor
  • worked
    Notifies that a given number of work unit of the main task has been completed. Note that this amount
  • subTask
    Notifies that a subtask of the main task is beginning. Subtasks are optional; the main task might no
  • setTaskName
    Sets the task name to the given value. This method is used to restore the task label after a nested
  • setCanceled
    Sets the cancel state to the given value.
  • internalWorked
    Internal method to handle scaling correctly. This method must not be called by a client. Clients sho

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now