package com.netcetera.trema.eclipse.exporting;

import java.io.Writer;
import org.eclipse.core.runtime.IProgressMonitor;

import com.netcetera.trema.core.exporting.TremaCSVPrinter;



/**
 * Subclass of <code>CSVPrinter</code> to support progress monitors,
 * since a CSV export has turned out to be rather a time consuming
 * operation.
 */
public class MonitoringTremaCSVPrinter extends TremaCSVPrinter {
  
  private final IProgressMonitor monitor;
  
  /**
   * Create a printer that will print values to the given
   * stream. Comments will be
   * written using the default comment character '#'.
   * @param out the output writer to use
   * @param separator the csv separator to use
   * @param monitor the monitor to use while writing
   */
  public MonitoringTremaCSVPrinter(Writer out, char separator, IProgressMonitor monitor) {
    super(out, separator);
    this.monitor = monitor;
  }
  
  /** {@inheritDoc} */
  public void monitorBeginTask(int totalwork) {
    if (monitor != null) {
      monitor.beginTask("Exporting...", totalwork);
    }
  }
  
  /** {@inheritDoc} */
  public void monitorWorked(int work) {
    if (monitor != null) {
      monitor.worked(work);
    } 
  }
}

@@ -896,39 +896,16 @@
 %0A  %7D%0A  %0A
-  /** %7B@inheritDoc%7D */%0A
   public
@@ -1040,31 +1040,8 @@
 %0A  %0A
-  /** %7B@inheritDoc%7D */%0A
   pu

Remove useless javadoc that produces warning.