Search in sources :

Example 1 with EnterPreviewRowsDialog

use of org.pentaho.di.ui.spoon.dialog.EnterPreviewRowsDialog in project pentaho-kettle by pentaho.

the class TransGraph method showLastPreviewResults.

public synchronized void showLastPreviewResults() {
    if (lastTransDebugMeta == null || lastTransDebugMeta.getStepDebugMetaMap().isEmpty()) {
        return;
    }
    final List<String> stepnames = new ArrayList<>();
    final List<RowMetaInterface> rowMetas = new ArrayList<>();
    final List<List<Object[]>> rowBuffers = new ArrayList<>();
    // 
    for (StepMeta stepMeta : lastTransDebugMeta.getStepDebugMetaMap().keySet()) {
        StepDebugMeta stepDebugMeta = lastTransDebugMeta.getStepDebugMetaMap().get(stepMeta);
        stepnames.add(stepMeta.getName());
        rowMetas.add(stepDebugMeta.getRowBufferMeta());
        rowBuffers.add(stepDebugMeta.getRowBuffer());
    }
    getDisplay().asyncExec(new Runnable() {

        @Override
        public void run() {
            EnterPreviewRowsDialog dialog = new EnterPreviewRowsDialog(shell, SWT.NONE, stepnames, rowMetas, rowBuffers);
            dialog.open();
        }
    });
}
Also used : ArrayList(java.util.ArrayList) RowMetaInterface(org.pentaho.di.core.row.RowMetaInterface) StepMeta(org.pentaho.di.trans.step.StepMeta) ArrayList(java.util.ArrayList) List(java.util.List) SimpleLoggingObject(org.pentaho.di.core.logging.SimpleLoggingObject) EnterPreviewRowsDialog(org.pentaho.di.ui.spoon.dialog.EnterPreviewRowsDialog) StepDebugMeta(org.pentaho.di.trans.debug.StepDebugMeta)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 SimpleLoggingObject (org.pentaho.di.core.logging.SimpleLoggingObject)1 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)1 StepDebugMeta (org.pentaho.di.trans.debug.StepDebugMeta)1 StepMeta (org.pentaho.di.trans.step.StepMeta)1 EnterPreviewRowsDialog (org.pentaho.di.ui.spoon.dialog.EnterPreviewRowsDialog)1