public void beginTask( String message, int nrWorks ) { monitor.beginTask( message, nrWorks ); }
public void setTaskName( String taskName ) { monitor.setTaskName( taskName ); }
public boolean isCanceled() { return monitor.isCanceled(); }
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 ); } } } }
public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException { int size = transMeta.findNrPrevSteps( stepInfo ); try { if ( before ) { monitor.beginTask( BaseMessages.getString( PKG, "SearchFieldsProgressDialog.Dialog.SearchInputFields.Message" ), size ); // Searching // for // input // fields... fields = transMeta.getPrevStepFields( stepInfo, new ProgressMonitorAdapter( monitor ) ); } else { monitor.beginTask( BaseMessages.getString( PKG, "SearchFieldsProgressDialog.Dialog.SearchOutputFields.Message" ), size ); // Searching // for // output // fields... fields = transMeta.getStepFields( stepInfo, new ProgressMonitorAdapter( monitor ) ); } } catch ( KettleStepException kse ) { throw new InvocationTargetException( kse, BaseMessages.getString( PKG, "SearchFieldsProgressDialog.Log.UnableToGetFields", stepInfo.toString(), kse.getMessage() ) ); } monitor.done(); }
public void done() { monitor.done(); }
public void subTask( String message ) { monitor.subTask( message ); }
public void worked( int nrWorks ) { monitor.worked( nrWorks ); }
IProgressMonitor progressMonitor = new NullProgressMonitor(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IProject project = root.getProject("DesiredProjectName"); project.create(progressMonitor); project.open(progressMonitor);
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(); } } };
public void breakPointHit( TransDebugMeta transDebugMeta, StepDebugMeta stepDebugMeta, RowMetaInterface rowBufferMeta, List<Object[]> rowBuffer ) { String stepName = stepDebugMeta.getStepMeta().getName(); previewComplete.add( stepName ); progressMonitor.subTask( BaseMessages.getString( PKG, "TransPreviewProgressDialog.SubTask.StepPreviewFinished", stepName ) ); } } );
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 */ } } } };
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 } } } };
if ( !Utils.isEmpty( attributnametxt ) && !list.contains( attribute.getPath() ) ) { nr++; monitor.subTask( BaseMessages.getString( PKG, "GetXMLDataXMLInputFieldsImportProgressDialog.Task.FetchFields", String.valueOf( nr ) ) ); monitor.subTask( BaseMessages.getString( PKG, "GetXMLDataXMLInputFieldsImportProgressDialog.Task.AddingField", attributname ) );
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 } } } };
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 } } } };
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 } } } };
@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 } } } };
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(); } } };