airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hes...@apache.org
Subject svn commit: r1355186 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/graph/GraphCanvas.java
Date Thu, 28 Jun 2012 22:29:07 GMT
Author: heshan
Date: Thu Jun 28 22:29:06 2012
New Revision: 1355186

URL: http://svn.apache.org/viewvc?rev=1355186&view=rev
Log:
Fix for IRAVATA-502

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/graph/GraphCanvas.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/graph/GraphCanvas.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/graph/GraphCanvas.java?rev=1355186&r1=1355185&r2=1355186&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/graph/GraphCanvas.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/graph/GraphCanvas.java
Thu Jun 28 22:29:06 2012
@@ -173,11 +173,13 @@ public class GraphCanvas implements XBay
 
 	private String generateNewWorkflowName() {
 		String baseName="Workflow";
-        List<GraphCanvas> graphCanvases = this.engine.getGUI().getGraphCanvases();
         List<String> existingNames=new ArrayList<String>();
-        for (GraphCanvas graphCanvas : graphCanvases) {
-        	existingNames.add(graphCanvas.getWorkflow().getName());
-		}
+        if (this.engine.getGUI() != null) {
+            List<GraphCanvas> graphCanvases = this.engine.getGUI().getGraphCanvases();
+            for (GraphCanvas graphCanvas : graphCanvases) {
+                existingNames.add(graphCanvas.getWorkflow().getName());
+            }
+        }
         int i=1;
         String newName=baseName+i;
         while(existingNames.contains(newName)){



Mime
View raw message