From 9e1139a9c72825bf4e2484687d0203a7cc7df806 Mon Sep 17 00:00:00 2001 From: ashitsalesforce Date: Fri, 19 Jan 2024 17:37:20 -0800 Subject: [PATCH] minor improvement in showing results progress in UI Set the progress monitor subtask at the start to show progress to the user. --- .../dataloader/action/visitor/AbstractQueryVisitor.java | 1 + .../com/salesforce/dataloader/action/visitor/DAOLoadVisitor.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/com/salesforce/dataloader/action/visitor/AbstractQueryVisitor.java b/src/main/java/com/salesforce/dataloader/action/visitor/AbstractQueryVisitor.java index 7292c02d..07a27420 100644 --- a/src/main/java/com/salesforce/dataloader/action/visitor/AbstractQueryVisitor.java +++ b/src/main/java/com/salesforce/dataloader/action/visitor/AbstractQueryVisitor.java @@ -184,6 +184,7 @@ protected void startWriteExtraction(int size) { getRateCalculator().start(size); // start the Progress Monitor getProgressMonitor().beginTask(Messages.getMessage(getClass(), "extracting"), size); //$NON-NLS-1$ + getProgressMonitor().setSubTask(getRateCalculator().calculateSubTask(getNumberOfRows(), getNumberErrors())); } @Override diff --git a/src/main/java/com/salesforce/dataloader/action/visitor/DAOLoadVisitor.java b/src/main/java/com/salesforce/dataloader/action/visitor/DAOLoadVisitor.java index 848a6d6c..df82d863 100644 --- a/src/main/java/com/salesforce/dataloader/action/visitor/DAOLoadVisitor.java +++ b/src/main/java/com/salesforce/dataloader/action/visitor/DAOLoadVisitor.java @@ -228,6 +228,7 @@ private void initLoadRateCalculator() { try { DataReader dao = (DataReader)getController().getDao(); getRateCalculator().start(dao.getTotalRows()); + getProgressMonitor().setSubTask(getRateCalculator().calculateSubTask(getNumberOfRows(), getNumberErrors())); } catch (Exception e) { logger.error("Unable to get total rows to upload from CSV or database"); getRateCalculator().start(0);