diff options
author | 2018-09-14 16:49:11 +0200 | |
---|---|---|
committer | 2018-09-14 16:49:11 +0200 | |
commit | 12f540b293fec104db29fe78a4b50ca60a49e417 (patch) | |
tree | 25fad118952232204aff027c39b01aca8de46b9b /Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/EclipseBasedProgressMonitor.xtend | |
parent | Merge branch 'master' into hypergraphs (diff) | |
parent | Updated progress monitor for huge amount instance generation processes (diff) | |
download | VIATRA-Generator-12f540b293fec104db29fe78a4b50ca60a49e417.tar.gz VIATRA-Generator-12f540b293fec104db29fe78a4b50ca60a49e417.tar.zst VIATRA-Generator-12f540b293fec104db29fe78a4b50ca60a49e417.zip |
Merge branch 'master' into hypergraphs
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/EclipseBasedProgressMonitor.xtend')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/EclipseBasedProgressMonitor.xtend | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/EclipseBasedProgressMonitor.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/EclipseBasedProgressMonitor.xtend index 624e75a5..be35b64a 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/EclipseBasedProgressMonitor.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/EclipseBasedProgressMonitor.xtend | |||
@@ -9,9 +9,15 @@ class EclipseBasedProgressMonitor extends SolverProgressMonitor{ | |||
9 | public new(IProgressMonitor internalMonitor) { | 9 | public new(IProgressMonitor internalMonitor) { |
10 | this.internalMonitor = internalMonitor | 10 | this.internalMonitor = internalMonitor |
11 | } | 11 | } |
12 | var double currentDouble = 0.0 | ||
13 | var int currentInt = 0 | ||
12 | 14 | ||
13 | override protected processWorked(double amount) { | 15 | override protected processWorked(double amount) { |
14 | internalMonitor.worked((amount*1000).intValue) | 16 | val newDouble = currentDouble+amount |
17 | val newInt = (newDouble*1000).intValue | ||
18 | internalMonitor.worked(newInt-currentInt) | ||
19 | currentDouble = newDouble | ||
20 | currentInt = newInt | ||
15 | } | 21 | } |
16 | 22 | ||
17 | override isCancelled() { | 23 | override isCancelled() { |