/**
* Binds the content of the csv file to the tableViewer.
*/
public void initWidgets() {
final ICsvMarshaller marshaller = MarshallerFactory.getMarshaller(MARSHALLERTYPE);
try {
//Running in progress bar for large CSV files
new ProgressMonitorDialog(getShell()).run(false, false,
new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
@Override
public void run() {
try {
monitor.beginTask("Create Table view...", 4);
monitor.worked(1);
monitor.subTask("Marshall data...");
Thread.sleep(DUMMY_PROGESS_TIME);
csvTable = marshaller.unmarshal(getCsvContent(), true);
csvTable.addEmptyRow();
monitor.worked(1);
monitor.subTask("Setting input...");
Thread.sleep(DUMMY_PROGESS_TIME);
tableViewer.setInput(csvTable);