Revision: 1069
http://cishell.svn.sourceforge.net/cishell/?rev=1069&view=rev
Author: pataphil
Date: 2010-05-28 19:40:20 +0000 (Fri, 28 May 2010)
Log Message:
-----------
* Altered AlgorithmUtilities.executeAlgorithm() to consider ProgressMonitor business.
Modified Paths:
--------------
trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java
Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java
===================================================================
--- trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java 2010-05-28 18:53:00 UTC (rev 1068)
+++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java 2010-05-28 19:40:20 UTC (rev 1069)
@@ -7,6 +7,8 @@
import org.cishell.framework.algorithm.Algorithm;
import org.cishell.framework.algorithm.AlgorithmExecutionException;
import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.algorithm.ProgressMonitor;
+import org.cishell.framework.algorithm.ProgressTrackable;
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
import org.cishell.framework.data.DataProperty;
@@ -123,12 +125,19 @@
@SuppressWarnings("unchecked") // Dictionary<String, Object>
public static Data[] executeAlgorithm(
AlgorithmFactory algorithmFactory,
+ ProgressMonitor progressMonitor,
+ Data[] data,
Dictionary parameters,
- CIShellContext ciShellContext,
- Data[] data)
+ CIShellContext ciShellContext)
throws AlgorithmExecutionException {
Algorithm algorithm =
algorithmFactory.createAlgorithm(data, parameters, ciShellContext);
+
+ if ((progressMonitor != null) && (algorithm instanceof ProgressTrackable)) {
+ ProgressTrackable progressTrackable = (ProgressTrackable)algorithm;
+ progressTrackable.setProgressMonitor(progressMonitor);
+ }
+
Data[] result = algorithm.execute();
return result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|