|
From: <bh...@us...> - 2008-03-27 19:06:44
|
Revision: 732
http://cishell.svn.sourceforge.net/cishell/?rev=732&view=rev
Author: bh2
Date: 2008-03-27 12:06:37 -0700 (Thu, 27 Mar 2008)
Log Message:
-----------
stopped using guibuilder in Static Executable Runner. now using just the logger and throwing AEEs.
Modified Paths:
--------------
trunk/templates/org.cishell.templates/META-INF/MANIFEST.MF
trunk/templates/org.cishell.templates/src/org/cishell/templates/dataset/DatasetFactory.java
trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java
Modified: trunk/templates/org.cishell.templates/META-INF/MANIFEST.MF
===================================================================
--- trunk/templates/org.cishell.templates/META-INF/MANIFEST.MF 2008-03-27 18:59:44 UTC (rev 731)
+++ trunk/templates/org.cishell.templates/META-INF/MANIFEST.MF 2008-03-27 19:06:37 UTC (rev 732)
@@ -7,7 +7,6 @@
Import-Package: org.cishell.framework;version="1.0.0",
org.cishell.framework.algorithm;version="1.0.0",
org.cishell.framework.data;version="1.0.0",
- org.cishell.service.guibuilder;version="1.0.0",
org.osgi.framework;version="1.3.0",
org.osgi.service.component;version="1.0.0",
org.osgi.service.log;version="1.3.0",
Modified: trunk/templates/org.cishell.templates/src/org/cishell/templates/dataset/DatasetFactory.java
===================================================================
--- trunk/templates/org.cishell.templates/src/org/cishell/templates/dataset/DatasetFactory.java 2008-03-27 18:59:44 UTC (rev 731)
+++ trunk/templates/org.cishell.templates/src/org/cishell/templates/dataset/DatasetFactory.java 2008-03-27 19:06:37 UTC (rev 732)
@@ -24,6 +24,7 @@
import org.cishell.framework.CIShellContext;
import org.cishell.framework.algorithm.Algorithm;
+import org.cishell.framework.algorithm.AlgorithmExecutionException;
import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
@@ -84,15 +85,14 @@
this.ciContext = ciContext;
}
- public Data[] execute() {
+ public Data[] execute() throws AlgorithmExecutionException {
try {
Data data = new BasicData(getDataset(),format);
data.getMetadata().put(DataProperty.LABEL, label);
return new Data[]{data};
} catch (IOException e) {
- e.printStackTrace();
- throw new RuntimeException(e);
+ throw new AlgorithmExecutionException(e);
}
}
}
Modified: trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java
===================================================================
--- trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java 2008-03-27 18:59:44 UTC (rev 731)
+++ trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java 2008-03-27 19:06:37 UTC (rev 732)
@@ -36,7 +36,6 @@
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
import org.cishell.framework.data.DataProperty;
-import org.cishell.service.guibuilder.GUIBuilderService;
import org.cishell.templates.Activator;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
@@ -47,7 +46,6 @@
*/
public class StaticExecutableRunner implements Algorithm {
protected final String tempDir;
- protected final GUIBuilderService guiBuilder;
protected final Data[] data;
protected Dictionary parameters;
protected Properties props;
@@ -69,8 +67,6 @@
if (parameters == null)
parameters = new Hashtable();
- guiBuilder = (GUIBuilderService) ciContext
- .getService(GUIBuilderService.class.getName());
tempDir = makeTempDirectory();
}
@@ -227,12 +223,9 @@
// if the process failed unexpectedly...
if (process.exitValue() != 0 && !killedOnPurpose) {
- // display the error message using gui builder
- guiBuilder.showError(
- "Algorithm Could Not Finish Execution",
- "Sorry, the algorithm could not finish execution.",
- "Please check the console window for the error log messages and report the bug.\n"
- + "Thank you.");
+ throw new AlgorithmExecutionException(
+ "Algorithm exited unexpectedly (exit value: "+process.exitValue()+
+ "). Please check the console window for any error messages.");
}
// get the files output from the process
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|