1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

check for user cancellation

This commit is contained in:
Ted Williams 2007-07-21 04:19:37 +00:00
parent ecac8d4eca
commit 91a2802384
2 changed files with 2 additions and 2 deletions

View file

@ -123,7 +123,7 @@ public class ExportMemoryAction implements IViewActionDelegate {
monitor.beginTask("Transferring Data", jobs.intValue()); monitor.beginTask("Transferring Data", jobs.intValue());
BigInteger jobCount = BigInteger.ZERO; BigInteger jobCount = BigInteger.ZERO;
while(transferAddress.compareTo(endAddress) < 0) while(transferAddress.compareTo(endAddress) < 0 && !monitor.isCanceled())
{ {
BigInteger length = DATA_PER_RECORD; BigInteger length = DATA_PER_RECORD;
if(endAddress.subtract(transferAddress).compareTo(length) < 0) if(endAddress.subtract(transferAddress).compareTo(length) < 0)

View file

@ -129,7 +129,7 @@ public class ImportMemoryAction implements IViewActionDelegate {
BigInteger jobCount = BigInteger.ZERO; BigInteger jobCount = BigInteger.ZERO;
String line = reader.readLine(); String line = reader.readLine();
while(line != null) while(line != null && !monitor.isCanceled())
{ {
String recordType = line.substring(0, 2); String recordType = line.substring(0, 2);
int recordCount = Integer.parseInt(line.substring(2, 4), 16); int recordCount = Integer.parseInt(line.substring(2, 4), 16);