plugins/transforms/datagrid/src/main/java/org/apache/hop/pipeline/transforms/datagrid/DataGridDialog.java
private void preview() {
    // Create the table input reader transform...
    DataGridMeta oneMeta = new DataGridMeta();
    getInfo(oneMeta);

    PipelineMeta previewMeta =
        PipelinePreviewFactory.generatePreviewPipeline(
            pipelineMeta.getMetadataProvider(), oneMeta, wTransformName.getText());

    EnterNumberDialog numberDialog =
        new EnterNumberDialog(
            shell,
            props.getDefaultPreviewSize(),
            BaseMessages.getString(PKG, "DataGridDialog.EnterPreviewSize.Title"),
            BaseMessages.getString(PKG, "DataGridDialog.EnterPreviewSize.Message"));
    int previewSize = numberDialog.open();
    if (previewSize > 0) {
      PipelinePreviewProgressDialog progressDialog =
          new PipelinePreviewProgressDialog(
              shell,
              variables,
              previewMeta,
              new String[] {wTransformName.getText()},
              new int[] {previewSize});
      progressDialog.open();

      Pipeline pipeline = progressDialog.getPipeline();
      String loggingText = progressDialog.getLoggingText();

      if (!progressDialog.isCancelled()) {
        if (pipeline.getResult() != null && pipeline.getResult().getNrErrors() > 0) {
          EnterTextDialog etd =
              new EnterTextDialog(
                  shell,
                  BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
                  BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"),
                  loggingText,
                  true);
          etd.setReadOnly();
          etd.open();
        }
      }

      PreviewRowsDialog prd =
          new PreviewRowsDialog(
              shell,
              variables,
              SWT.NONE,
              wTransformName.getText(),
              progressDialog.getPreviewRowsMeta(wTransformName.getText()),
              progressDialog.getPreviewRows(wTransformName.getText()),
              loggingText);
      prd.open();
    }
  }
/**
   * Preview the data generated by this transform. This generates a pipeline using this transform &
   * a dummy and previews it.
   */
Preview the data generated by this transform. This generates a pipeline using this transform &
a dummy and previews it.
Preview the data generated by this transform . This generates a pipeline using this transform & a dummy and previews it .
private void preview() {
    DataGridMeta oneMeta = new DataGridMeta();
    getInfo(oneMeta);
    PipelineMeta previewMeta =
        PipelinePreviewFactory.generatePreviewPipeline(
            pipelineMeta.getMetadataProvider(), oneMeta, wTransformName.getText());
    EnterNumberDialog numberDialog =
        new EnterNumberDialog(
            shell,
            props.getDefaultPreviewSize(),
            BaseMessages.getString(PKG, "DataGridDialog.EnterPreviewSize.Title"),
            BaseMessages.getString(PKG, "DataGridDialog.EnterPreviewSize.Message"));
    int previewSize = numberDialog.open();
    if (previewSize > 0) {
      PipelinePreviewProgressDialog progressDialog =
          new PipelinePreviewProgressDialog(
              shell,
              variables,
              previewMeta,
              new String[] {wTransformName.getText()},
              new int[] {previewSize});
      progressDialog.open();
      Pipeline pipeline = progressDialog.getPipeline();
      String loggingText = progressDialog.getLoggingText();
      if (!progressDialog.isCancelled()) {
        if (pipeline.getResult() != null && pipeline.getResult().getNrErrors() > 0) {
          EnterTextDialog etd =
              new EnterTextDialog(
                  shell,
                  BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
                  BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"),
                  loggingText,
                  true);
          etd.setReadOnly();
          etd.open();
        }
      }
      PreviewRowsDialog prd =
          new PreviewRowsDialog(
              shell,
              variables,
              SWT.NONE,
              wTransformName.getText(),
              progressDialog.getPreviewRowsMeta(wTransformName.getText()),
              progressDialog.getPreviewRows(wTransformName.getText()),
              loggingText);
      prd.open();
    }
  }
private void preview ( ) { DataGridMeta oneMeta = new DataGridMeta ( ) ; getInfo ( oneMeta ) ; PipelineMeta previewMeta = PipelinePreviewFactory . generatePreviewPipeline ( pipelineMeta . getMetadataProvider ( ) , oneMeta , wTransformName . getText ( ) ) ; EnterNumberDialog numberDialog = new EnterNumberDialog ( shell , props . getDefaultPreviewSize ( ) , BaseMessages . getString ( PKG , "DataGridDialog.EnterPreviewSize.Title" ) , BaseMessages . getString ( PKG , "DataGridDialog.EnterPreviewSize.Message" ) ) ; int previewSize = numberDialog . open ( ) ; if ( previewSize > 0 ) { PipelinePreviewProgressDialog progressDialog = new PipelinePreviewProgressDialog ( shell , variables , previewMeta , new String [ ] { wTransformName . getText ( ) } , new int [ ] { previewSize } ) ; progressDialog . open ( ) ; Pipeline pipeline = progressDialog . getPipeline ( ) ; String loggingText = progressDialog . getLoggingText ( ) ; if ( ! progressDialog . isCancelled ( ) ) { if ( pipeline . getResult ( ) != null && pipeline . getResult ( ) . getNrErrors ( ) > 0 ) { EnterTextDialog etd = new EnterTextDialog ( shell , BaseMessages . getString ( PKG , "System.Dialog.PreviewError.Title" ) , BaseMessages . getString ( PKG , "System.Dialog.PreviewError.Message" ) , loggingText , true ) ; etd . setReadOnly ( ) ; etd . open ( ) ; } } PreviewRowsDialog prd = new PreviewRowsDialog ( shell , variables , SWT . NONE , wTransformName . getText ( ) , progressDialog . getPreviewRowsMeta ( wTransformName . getText ( ) ) , progressDialog . getPreviewRows ( wTransformName . getText ( ) ) , loggingText ) ; prd . open ( ) ; } }
Preview the data generated by this transform.
Preview the data generated by this transform .
// Create the table input reader transform...