Startup
This commit is contained in:
@@ -4,15 +4,25 @@
|
||||
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
@@ -45,15 +55,7 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
public static String TESTS_CONFIG_FILENAME = ".config";
|
||||
public static Path TESTS_TESTS_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "tests");
|
||||
public static Path TESTS_DEVICES_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "devices");
|
||||
public static String VALUE_SEPARATOR = "&";
|
||||
public static String PARAM_SEPARATOR = ";";
|
||||
|
||||
private String testName;
|
||||
private String testDescription;
|
||||
private String testPath;
|
||||
private String deviceName;
|
||||
private String deviceDescription;
|
||||
private String devicePath;
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
@@ -63,7 +65,7 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jLabelDeviceName = new javax.swing.JLabel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
txtDeviceName = new javax.swing.JTextField();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
txtDeviceDescription = new javax.swing.JTextField();
|
||||
@@ -87,18 +89,17 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jButtonMoreResult = new javax.swing.JButton();
|
||||
jButtonMoreTest = new javax.swing.JButton();
|
||||
jLabel9 = new javax.swing.JLabel();
|
||||
jLabel10 = new javax.swing.JLabel();
|
||||
jButtonOk1 = new javax.swing.JButton();
|
||||
|
||||
jLabelDeviceName.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabelDeviceName.setText("Device name");
|
||||
jLabelDeviceName.setVisible(true);
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel1.setText("Device name");
|
||||
jLabel1.setVisible(false);
|
||||
|
||||
txtDeviceName.setEditable(false);
|
||||
txtDeviceName.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtDeviceName.setText("jTextField1");
|
||||
txtDeviceName.setMinimumSize(new java.awt.Dimension(6, 26));
|
||||
txtDeviceName.setPreferredSize(new java.awt.Dimension(72, 26));
|
||||
txtDeviceName.setVisible(true);
|
||||
txtDeviceName.setVisible(false);
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel2.setText("Device Description");
|
||||
@@ -124,8 +125,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
txtTestName.setEditable(false);
|
||||
txtTestName.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtTestName.setText("jTextField2");
|
||||
txtTestName.setMinimumSize(new java.awt.Dimension(6, 26));
|
||||
txtTestName.setPreferredSize(new java.awt.Dimension(72, 26));
|
||||
|
||||
jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
|
||||
jLabel6.setText("Last Test Result");
|
||||
@@ -155,10 +154,10 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jScrollPaneParam.setViewportView(jTableParams);
|
||||
if (jTableParams.getColumnModel().getColumnCount() > 0) {
|
||||
jTableParams.getColumnModel().getColumn(0).setMinWidth(150);
|
||||
jTableParams.getColumnModel().getColumn(0).setPreferredWidth(120);
|
||||
jTableParams.getColumnModel().getColumn(0).setPreferredWidth(150);
|
||||
jTableParams.getColumnModel().getColumn(0).setMaxWidth(150);
|
||||
jTableParams.getColumnModel().getColumn(1).setPreferredWidth(120);
|
||||
jTableParams.getColumnModel().getColumn(1).setMaxWidth(200);
|
||||
jTableParams.getColumnModel().getColumn(1).setPreferredWidth(80);
|
||||
jTableParams.getColumnModel().getColumn(1).setMaxWidth(100);
|
||||
}
|
||||
|
||||
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
|
||||
@@ -190,7 +189,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
txtTestDescription.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtTestDescription.setLineWrap(true);
|
||||
txtTestDescription.setRows(5);
|
||||
txtTestDescription.setWrapStyleWord(true);
|
||||
jScrollPaneTestDesc.setViewportView(txtTestDescription);
|
||||
|
||||
jEditorPaneHelp.setContentType("text/html"); // NOI18N
|
||||
@@ -211,8 +209,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
txtTestResultSummary.setEditable(false);
|
||||
txtTestResultSummary.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtTestResultSummary.setText("jTextField1");
|
||||
txtTestResultSummary.setMinimumSize(new java.awt.Dimension(6, 26));
|
||||
txtTestResultSummary.setPreferredSize(new java.awt.Dimension(72, 26));
|
||||
|
||||
jButtonMoreResult.setText("More");
|
||||
jButtonMoreResult.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -232,6 +228,9 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jLabel9.setText("Last Result Details");
|
||||
jLabel9.setVisible(false);
|
||||
|
||||
jLabel10.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel10.setText("(Value valid for all devices)");
|
||||
|
||||
jButtonOk1.setText("Save for this device");
|
||||
jButtonOk1.setToolTipText("Save parameters values for this specific device");
|
||||
jButtonOk1.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -248,36 +247,34 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel5)
|
||||
.addComponent(jLabel8)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(jLabel9)
|
||||
.addComponent(jLabelDeviceName))
|
||||
.addGap(18, 18, 18))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel5)
|
||||
.addComponent(jLabel8)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(jLabel9)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(jLabel10))
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING))
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel7)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
|
||||
.addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(txtDeviceName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(txtDeviceName)
|
||||
.addComponent(txtDeviceDescription)
|
||||
.addComponent(jScrollPaneTestDesc)
|
||||
.addComponent(jScrollPaneRes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPaneParam, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(txtTestResultSummary, javax.swing.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)
|
||||
.addComponent(txtTestResultSummary, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jButtonMoreResult))
|
||||
.addComponent(txtTestSuite)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.PREFERRED_SIZE, 441, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jButtonMoreTest))))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jButtonOk1)
|
||||
@@ -294,12 +291,12 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jButtonMoreTest)
|
||||
.addComponent(jLabel5))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtTestSuite, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtTestSuite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -310,24 +307,26 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButtonMoreResult)
|
||||
.addComponent(jLabel6))
|
||||
.addComponent(txtTestResultSummary, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(txtTestResultSummary, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel9)
|
||||
.addComponent(jScrollPaneRes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabelDeviceName)
|
||||
.addComponent(txtDeviceName, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(txtDeviceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtDeviceDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtDeviceDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel2))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPaneParam, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel7)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel10)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
@@ -338,41 +337,21 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private class Details{
|
||||
private HashMap hDetails;
|
||||
public Details(HashMap details) {
|
||||
hDetails = details;
|
||||
}
|
||||
public String get(String detailName){
|
||||
return hDetails.get(detailName).toString().replace("\"", "");
|
||||
}
|
||||
}
|
||||
|
||||
private void fillComponents(HashMap hDetails) {
|
||||
|
||||
Details details = new Details(hDetails);
|
||||
testName = details.get("testName");
|
||||
testDescription = details.get("testDescription");
|
||||
testPath = details.get("testPath");
|
||||
deviceName = details.get("deviceName");
|
||||
deviceDescription = details.get("deviceDescription");
|
||||
devicePath = details.get("devicePath");
|
||||
//add values to each text box
|
||||
this.txtDeviceName.setText(deviceName);
|
||||
this.txtDeviceDescription.setText(deviceDescription);
|
||||
this.txtTestDescription.setText(testDescription);
|
||||
this.txtTestName.setText(testName);
|
||||
this.txtTestSuite.setText(details.get("testSuite"));
|
||||
this.txtTestResult.setText(details.get("time") + "\n" +
|
||||
details.get("deviceName") + " - " +
|
||||
details.get("testName") + "\n" +
|
||||
details.get("testResult"));
|
||||
this.txtTestResultSummary.setText( details.get("testResult"));
|
||||
this.txtDeviceName.setText(hDetails.get("deviceName").toString());
|
||||
this.txtDeviceDescription.setText(hDetails.get("deviceDescription").toString());
|
||||
this.txtTestDescription.setText(hDetails.get("testDescription").toString());
|
||||
this.txtTestSuite.setText(hDetails.get("testSuite").toString());
|
||||
this.txtTestName.setText(hDetails.get("testName").toString());
|
||||
this.txtTestResult.setText(hDetails.get("time").toString() + "\n" +
|
||||
hDetails.get("deviceName").toString() + " - " +
|
||||
hDetails.get("testName").toString() + "\n" +
|
||||
hDetails.get("testResult").toString());
|
||||
this.txtTestResultSummary.setText( hDetails.get("testResult").toString());
|
||||
this.txtTestResultSummary.setCaretPosition(0);
|
||||
System.out.println("detail testPath: "+testPath);
|
||||
System.out.println("detail devicePath: "+devicePath);
|
||||
//help text
|
||||
showHelp(details.get("testPath"), details.get("testHelp"));
|
||||
showHelp(String.valueOf(hDetails.get("testPath")), String.valueOf(hDetails.get("testHelp")));
|
||||
//parameters table
|
||||
HashMap hParams = (HashMap) hDetails.get("parameters");
|
||||
String name="", value="", description="";
|
||||
@@ -382,9 +361,9 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
Object param = entry;
|
||||
if(param instanceof String){
|
||||
name = (String) param;
|
||||
Details attributes = new Details((HashMap) hParams.get(param));
|
||||
value = attributes.get("value");
|
||||
description = attributes.get("description");
|
||||
HashMap attributes = (HashMap) hParams.get(param);
|
||||
value = (String) attributes.get("value");
|
||||
description = (String) attributes.get("description");
|
||||
model.addRow(new Object[]{name, value, description});
|
||||
}
|
||||
jTableParams.setModel(model);
|
||||
@@ -432,13 +411,40 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a map with optional parameters to be passed to the testing script.
|
||||
* The map is like this: parameters \_ name | \_ value | \_ description \_
|
||||
* name | \_ value | \_ description ... the name 'name' is the mapping key.
|
||||
* 'value' and 'description' are constant mapping keys of a nested map.
|
||||
*
|
||||
* @param parametersString string containing the parameters. Syntax:
|
||||
* name:value:description[;name:value:description;...]
|
||||
*/
|
||||
private HashMap buildParametersMap(String parametersString) {
|
||||
HashMap mParameters = new HashMap(); // contains name and attributes
|
||||
HashMap mParameterAttributes = new HashMap(); //contians value and description
|
||||
String[] dsParameterAttributes = null;
|
||||
String[] dsParameters = parametersString.split(";");
|
||||
for (String sParameter : dsParameters) {
|
||||
dsParameterAttributes = sParameter.split(":");
|
||||
if (dsParameterAttributes.length > 2) {
|
||||
mParameterAttributes = new HashMap();
|
||||
mParameterAttributes.put("value", (Object) dsParameterAttributes[1]);
|
||||
mParameterAttributes.put("description", dsParameterAttributes[2]);
|
||||
//add parameter name and attributes (value + description)
|
||||
mParameters.put(dsParameterAttributes[0], mParameterAttributes);
|
||||
}
|
||||
}
|
||||
return mParameters;
|
||||
}
|
||||
|
||||
private HashMap getParametersFromTable(){
|
||||
HashMap mParameters = new HashMap(); // contains name and attributes
|
||||
HashMap mParameterAttributes = new HashMap(); //contians value and description
|
||||
for(int row=0 ; row<jTableParams.getRowCount() ; row++){
|
||||
String sParam = jTableParams.getValueAt(row, 0).toString();
|
||||
String sVal = "\"" + jTableParams.getValueAt(row, 1).toString().replace("\"", "").replace("&","").replace(";","") + "\"";
|
||||
String sDescr = "\"" +jTableParams.getValueAt(row, 2).toString() + "\"";
|
||||
String sVal = jTableParams.getValueAt(row, 1).toString();
|
||||
String sDescr = jTableParams.getValueAt(row, 2).toString();
|
||||
mParameterAttributes = new HashMap();
|
||||
mParameterAttributes.put("value", (Object) sVal);
|
||||
mParameterAttributes.put("description", sDescr);
|
||||
@@ -456,7 +462,7 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
boolean success = false;
|
||||
try {
|
||||
Path path = Paths.get(testDir + FilenameUtils.separatorsToSystem("/"+TESTS_CONFIG_FILENAME));
|
||||
System.out.println("Test path: "+path);
|
||||
File configFile = path.toFile();
|
||||
//Loop among the test parameters and generate variable assignement syntax for python
|
||||
String sTestParameters = "";
|
||||
String name="", value="", description="";
|
||||
@@ -464,12 +470,11 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
Object param = entry;
|
||||
if(param instanceof String){
|
||||
name = (String) param;
|
||||
Details attributes = new Details((HashMap) hmTestParams.get(param));
|
||||
value = "\""+attributes.get("value")+"\"";
|
||||
description = "\""+attributes.get("description")+"\"";
|
||||
HashMap attributes = (HashMap) hmTestParams.get(param);
|
||||
value = (String) attributes.get("value");
|
||||
description = (String) attributes.get("description");
|
||||
//build the python code for getting the test parameter
|
||||
sTestParameters = sTestParameters + name + VALUE_SEPARATOR + value + VALUE_SEPARATOR + description + PARAM_SEPARATOR ;
|
||||
//System.out.println("sTestParameters: "+sTestParameters);
|
||||
sTestParameters = sTestParameters + name + ":" + value + ":" + description + ";" ;
|
||||
}
|
||||
}
|
||||
FileInputStream in = new FileInputStream(path.toFile());
|
||||
@@ -511,8 +516,8 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
|
||||
private void jButtonMoreTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMoreTestActionPerformed
|
||||
if(this.jButtonMoreTest.getText()=="More"){
|
||||
//this.txtDeviceName.setVisible(true);
|
||||
//this.jLabelDeviceName.setVisible(true);
|
||||
this.txtDeviceName.setVisible(true);
|
||||
this.jLabel1.setVisible(true);
|
||||
this.jLabel2.setVisible(true);
|
||||
this.txtDeviceDescription.setVisible(true);
|
||||
this.jButtonMoreTest.setText("Less");
|
||||
@@ -521,8 +526,8 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
this.txtTestSuite.setVisible(true);
|
||||
this.jLabel8.setVisible(true);
|
||||
}else{
|
||||
//this.txtDeviceName.setVisible(false);
|
||||
//this.jLabelDeviceName.setVisible(false);
|
||||
this.txtDeviceName.setVisible(false);
|
||||
this.jLabel1.setVisible(false);
|
||||
this.jLabel2.setVisible(false);
|
||||
this.txtDeviceDescription.setVisible(false);
|
||||
this.jScrollPaneTestDesc.setVisible(false);
|
||||
@@ -545,6 +550,8 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
private javax.swing.JButton jButtonOk;
|
||||
private javax.swing.JButton jButtonOk1;
|
||||
private javax.swing.JEditorPane jEditorPaneHelp;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel10;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
@@ -552,7 +559,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
private javax.swing.JLabel jLabel7;
|
||||
private javax.swing.JLabel jLabel8;
|
||||
private javax.swing.JLabel jLabel9;
|
||||
private javax.swing.JLabel jLabelDeviceName;
|
||||
private javax.swing.JScrollPane jScrollPaneHtml;
|
||||
private javax.swing.JScrollPane jScrollPaneParam;
|
||||
private javax.swing.JScrollPane jScrollPaneRes;
|
||||
|
||||
Reference in New Issue
Block a user