airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1361888 - in /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui: dialogs/graph/dynamic/DynamicWorkflowRunnerWindow.java experiment/WorkflowInterpreterLaunchWindow.java
Date Mon, 16 Jul 2012 02:24:33 GMT
Author: samindaw
Date: Mon Jul 16 02:24:32 2012
New Revision: 1361888

URL: http://svn.apache.org/viewvc?rev=1361888&view=rev
Log:
make experiment name blank initially & make it compulsory

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/graph/dynamic/DynamicWorkflowRunnerWindow.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/graph/dynamic/DynamicWorkflowRunnerWindow.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/graph/dynamic/DynamicWorkflowRunnerWindow.java?rev=1361888&r1=1361887&r2=1361888&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/graph/dynamic/DynamicWorkflowRunnerWindow.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/graph/dynamic/DynamicWorkflowRunnerWindow.java
Mon Jul 16 02:24:32 2012
@@ -25,7 +25,6 @@ import java.awt.event.ActionEvent;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
-import java.util.Calendar;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -37,6 +36,7 @@ import javax.swing.JButton;
 import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
 import javax.swing.JLabel;
+import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.xml.namespace.QName;
 
@@ -188,7 +188,7 @@ public class DynamicWorkflowRunnerWindow
         }
         this.parameterPanel.layout(inputNodes.size(), 3, GridPanel.WEIGHT_NONE, 2);
 
-        this.instanceNameTextField.setText(workflow.getName()+"_"+Calendar.getInstance().getTime().toString());
+//        this.instanceNameTextField.setText(workflow.getName()+"_"+Calendar.getInstance().getTime().toString());
 
         this.topicTextField.setText(UUID.randomUUID().toString());
 
@@ -307,9 +307,16 @@ public class DynamicWorkflowRunnerWindow
     private void execute() {
         final List<String> arguments = new ArrayList<String>();
         String instanceName = this.instanceNameTextField.getText();
-        if (instanceName.equals("")){
-        	instanceName=workflow.getName();
+        if (instanceName.trim().equals("")){
+        	JOptionPane.showMessageDialog(engine.getGUI().getFrame(),
+        		    "Experiment name cannot be empty",
+        		    "Experiment Name",
+        		    JOptionPane.ERROR_MESSAGE);
+        	return;
         }
+//        if (instanceName.equals("")){
+//        	instanceName=workflow.getName();
+//        }
         final String instanceNameFinal=instanceName;
         String topic = this.topicTextField.getText();
         if (topic.length() == 0) {

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java?rev=1361888&r1=1361887&r2=1361888&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
Mon Jul 16 02:24:32 2012
@@ -25,7 +25,6 @@ import java.awt.event.ActionEvent;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
-import java.util.Calendar;
 import java.util.Collection;
 import java.util.List;
 import java.util.UUID;
@@ -33,6 +32,7 @@ import java.util.UUID;
 import javax.swing.AbstractAction;
 import javax.swing.JButton;
 import javax.swing.JLabel;
+import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.xml.namespace.QName;
 
@@ -149,7 +149,7 @@ public class WorkflowInterpreterLaunchWi
             this.parameterTextFields.add(paramField);
         }
         this.parameterPanel.layout(inputNodes.size(), 3, GridPanel.WEIGHT_NONE, 2);
-        this.instanceNameTextField.setText(workflow.getName()+"_"+Calendar.getInstance().getTime().toString());
+//        this.instanceNameTextField.setText(workflow.getName()+"_"+Calendar.getInstance().getTime().toString());
         this.topicTextField.setText(UUID.randomUUID().toString());
 
         XBayaConfiguration config = this.engine.getConfiguration();
@@ -243,9 +243,16 @@ public class WorkflowInterpreterLaunchWi
 
         String topic = this.topicTextField.getText();
         String instanceName = this.instanceNameTextField.getText();
-        if (instanceName.equals("")){
-        	instanceName=workflow.getName();
-        }
+        if (instanceName.trim().equals("")){
+        	JOptionPane.showMessageDialog(engine.getGUI().getFrame(),
+        		    "Experiment name cannot be empty",
+        		    "Experiment Name",
+        		    JOptionPane.ERROR_MESSAGE);
+        	return;
+        }
+//        if (instanceName.equals("")){
+//        	instanceName=workflow.getName();
+//        }
         final String instanceNameFinal=instanceName;
         if (topic.length() == 0) {
             this.engine.getGUI().getErrorWindow().error(ErrorMessages.TOPIC_EMPTY_ERROR);



Mime
View raw message