Updated branch as of code-freeze-2010-06-25

git-svn-id: https://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-api/branches/ui-api-1.2@11049 bf327186-88b3-11dd-a302-d386e5130c1c
diff --git a/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationDialog.java b/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationDialog.java
index af8a748..8eeefe6 100644
--- a/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationDialog.java
+++ b/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationDialog.java
@@ -112,7 +112,11 @@
 
 		this.addWindowListener(new WindowAdapter() {
 
-			public void windowClosing(WindowEvent e) {
+			public void windowOpened(WindowEvent e) {
+			    ActivityConfigurationDialog.this.requestFocusInWindow();
+			    ActivityConfigurationDialog.this.panel.whenOpened();
+			}
+			public void windowClosing(WindowEvent e) {			    
 				closeDialog();
 			}
 		});
diff --git a/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationPanel.java b/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationPanel.java
index 5f30cd3..80560e5 100644
--- a/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationPanel.java
+++ b/contextual-views-api/src/main/java/net/sf/taverna/t2/workbench/ui/views/contextualviews/activity/ActivityConfigurationPanel.java
@@ -37,4 +37,6 @@
 	
 	public abstract boolean checkValues();
 
+    public void whenOpened() {
+    }
 }
diff --git a/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpCollator.java b/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpCollator.java
index 60ded65..2de7139 100644
--- a/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpCollator.java
+++ b/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpCollator.java
@@ -82,13 +82,17 @@
 		try {
 			String externalHelpSetURL = prb.getString("externalhelpseturl");
 			hs = new HelpSet(null, new URL(externalHelpSetURL));
+			if (hs.getLocalMap() == null) {
+			    hs = null;
+			    logger.error("Helpset from " + externalHelpSetURL + " local map was null");
+			}
 			logger.info("Read external help set from " + externalHelpSetURL);
 		} catch (MissingResourceException e) {
-			logger.info("No external HelpSet URL specified");
+		    logger.error("No external HelpSet URL specified", e);
 		} catch (MalformedURLException e) {
-			logger.info("External HelpSet URL is malformed");
+		    logger.error("External HelpSet URL is malformed", e);
 		} catch (HelpSetException e) {
-			logger.info("External HelpSet could not be read");
+		    logger.error("External HelpSet could not be read", e);
 		}
 	}
 
@@ -104,7 +108,7 @@
 			hs = new HelpSet(null, backupURL);
 			logger.info("Read backup help set");
 		} catch (HelpSetException e) {
-			logger.info("Backup HelpSet could not be read");
+		    logger.error("Backup HelpSet could not be read", e);
 		}
 
 	}
diff --git a/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpEnabledDialog.java b/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpEnabledDialog.java
index 353cbfa..1da1271 100644
--- a/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpEnabledDialog.java
+++ b/helper-api/src/main/java/net/sf/taverna/t2/workbench/helper/HelpEnabledDialog.java
@@ -82,6 +82,7 @@
 	public HelpEnabledDialog(Frame owner, String title, boolean modal, String id)
 			throws HeadlessException {
 		super(owner == null ? MainWindow.getMainWindow() : owner, title, modal);
+
 		if (id != null) {
 			HelpCollator.registerComponent(this, id);
 		} else if (owner != null) {
@@ -323,4 +324,8 @@
 		return result.get(0);
 	}
 
+    public void setVisible(boolean b) {
+	this.setLocationRelativeTo(this.getParent());
+	super.setVisible(b);
+    }
 }
diff --git a/helper-api/src/main/resources/helpcollator.properties b/helper-api/src/main/resources/helpcollator.properties
index e246286..67a5bfd 100644
--- a/helper-api/src/main/resources/helpcollator.properties
+++ b/helper-api/src/main/resources/helpcollator.properties
@@ -1 +1 @@
-externalhelpseturl: http://www.mygrid.org.uk/taverna2_1/helpset/helpset.hs
+externalhelpseturl: http://www.mygrid.org.uk/taverna/helpset/2.2/helpset.hs
diff --git a/pom.xml b/pom.xml
index c9d15fc..cf7217d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
 		<t2.lang.version>1.1</t2.lang.version>
 		<t2.compatibility.version>1.2</t2.compatibility.version>
 		<t2.translators.version>1.2</t2.translators.version>
-		<taverna.version>1.7.2.0</taverna.version>
+		<taverna.version>1.7.2.2</taverna.version>
 	</properties>
 
 	<modules>
diff --git a/report-api/src/main/java/net/sf/taverna/t2/visit/fragility/ProcessorFragilityChecker.java b/report-api/src/main/java/net/sf/taverna/t2/visit/fragility/ProcessorFragilityChecker.java
index 87b6bac..42f0d12 100644
--- a/report-api/src/main/java/net/sf/taverna/t2/visit/fragility/ProcessorFragilityChecker.java
+++ b/report-api/src/main/java/net/sf/taverna/t2/visit/fragility/ProcessorFragilityChecker.java
@@ -45,7 +45,7 @@
 		Dataflow d = (Dataflow) ancestry.get(0);
 		for (ProcessorInputPort pip : o.getInputPorts()) {
 		if (pip.getDepth() == -1) {
-		    result = new VisitReport(FragilityCheck.getInstance(), o, "Invalid depth", FragilityCheck.INVALID_DEPTH, VisitReport.Status.SEVERE);
+		    result = new VisitReport(FragilityCheck.getInstance(), o, "Invalid depth of list", FragilityCheck.INVALID_DEPTH, VisitReport.Status.SEVERE);
 		}
 		else {
 		    int viaMerge = 0;
@@ -77,7 +77,7 @@
 
 			
 			if ((sourceIterates || (viaMerge != 0)) && listCreation && !sourceRetries) {
-			    VisitReport report = new VisitReport(FragilityCheck.getInstance(), o, "Single error fragile", FragilityCheck.SOURCE_FRAGILE, VisitReport.Status.WARNING);
+			    VisitReport report = new VisitReport(FragilityCheck.getInstance(), o, "Breaks on single error", FragilityCheck.SOURCE_FRAGILE, VisitReport.Status.WARNING);
 			    report.setProperty("sinkPort", pip);
 			    report.setProperty("sourceProcessor", sourceProcessor);
 			    reports.add(report);
@@ -90,7 +90,7 @@
 		} else if (reports.size() == 1) {
 		    return (reports.iterator().next());
 		} else {
-		    return new VisitReport(FragilityCheck.getInstance(), o, "Single error fragile", FragilityCheck.SOURCE_FRAGILE, VisitReport.Status.WARNING, reports);
+		    return new VisitReport(FragilityCheck.getInstance(), o, "Breaks on single error", FragilityCheck.SOURCE_FRAGILE, VisitReport.Status.WARNING, reports);
 		}
 	}
 
diff --git a/report-api/src/main/java/net/sf/taverna/t2/workbench/report/ReportManager.java b/report-api/src/main/java/net/sf/taverna/t2/workbench/report/ReportManager.java
index 0cd61b9..cdccd96 100644
--- a/report-api/src/main/java/net/sf/taverna/t2/workbench/report/ReportManager.java
+++ b/report-api/src/main/java/net/sf/taverna/t2/workbench/report/ReportManager.java
@@ -126,11 +126,18 @@
 		Map<Object, String> summaryEntry = summaryMap.get(d);
 		if (reportsEntry == null) {
 		    logger.error("Attempt to update reports on an object in a dataflow that has not been checked");
+		    reportsEntry = new HashMap<Object, Set<VisitReport>>();
+		    statusEntry = new HashMap<Object, Status>();
+		    summaryEntry = new HashMap<Object, String>();
+		    reportMap.put(d, reportsEntry);
+		    statusMap.put(d, statusEntry);
+		    summaryMap.put(d, summaryEntry);
 		}
-		reportsEntry.remove(o);
-		statusEntry.remove(o);
-		summaryEntry.remove(o);
-
+		else {
+		    reportsEntry.remove(o);
+		    statusEntry.remove(o);
+		    summaryEntry.remove(o);
+		}
 		// Assume o is directly inside d
 		List<Object> ancestry = new ArrayList<Object>();
 		ancestry.add(d);
@@ -206,7 +213,7 @@
 	private synchronized void validateDataflow(Dataflow d, Map<Object, Set<VisitReport>> reportsEntry, Map<Object, Status> statusEntry, Map<Object, String> summaryEntry) {
 		DataflowValidationReport validationReport = d.checkValidity();
 		if (validationReport.isWorkflowIncomplete()) {
-			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(IncompleteDataflowKind.getInstance(), d, "Incomplete dataflow", IncompleteDataflowKind.INCOMPLETE_DATAFLOW, VisitReport.Status.SEVERE));
+			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(IncompleteDataflowKind.getInstance(), d, "Incomplete workflow", IncompleteDataflowKind.INCOMPLETE_DATAFLOW, VisitReport.Status.SEVERE));
 		}
 		else if (!validationReport.isValid()) {
 			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(InvalidDataflowKind.getInstance(), d, "Invalid workflow", InvalidDataflowKind.INVALID_DATAFLOW, VisitReport.Status.SEVERE));
@@ -219,13 +226,13 @@
 			Map<Object, Status> statusEntry,
 			Map<Object, String> summaryEntry, DataflowValidationReport report) {
 		for (Object o : report.getUnresolvedOutputs()) {
-			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(UnresolvedOutputKind.getInstance(), o, "Unresolved output", UnresolvedOutputKind.OUTPUT, VisitReport.Status.SEVERE));
+			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(UnresolvedOutputKind.getInstance(), o, "Invalid workflow output", UnresolvedOutputKind.OUTPUT, VisitReport.Status.SEVERE));
 		}
 		for (Object o : report.getFailedEntities()) {
-			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(FailedEntityKind.getInstance(), o, "Failed entity", FailedEntityKind.FAILED_ENTITY, VisitReport.Status.SEVERE));
+			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(FailedEntityKind.getInstance(), o, "Mismatch of input list depths", FailedEntityKind.FAILED_ENTITY, VisitReport.Status.SEVERE));
 		}
 		for (Object o : report.getUnsatisfiedEntities()) {
-			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(UnsatisfiedEntityKind.getInstance(), o, "Unsatisfied", UnsatisfiedEntityKind.UNSATISFIED_ENTITY, VisitReport.Status.SEVERE));
+			addReport(reportsEntry, statusEntry, summaryEntry, new VisitReport(UnsatisfiedEntityKind.getInstance(), o, "Unknown prior list depth", UnsatisfiedEntityKind.UNSATISFIED_ENTITY, VisitReport.Status.SEVERE));
 		}
 //		for (DataflowValidationReport subReport : report.getInvalidDataflows().values()) {
 //			fillInReport(descriptionMap, subReport);