diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 7de413f..954b304 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -17,6 +17,7 @@ import ch.psi.wsaf.Task; import ch.psi.wsaf.TaskRunMode; import ch.psi.wsaf.TaskRunningException; import java.awt.Color; +import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.DateFormat; @@ -38,6 +39,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Properties; +import javax.swing.JFileChooser; public class TestingList extends Panel { NetbeansPluginPanel testingList; @@ -335,11 +337,17 @@ public class TestingList extends Panel { public void loadTests() throws FileNotFoundException, IOException{ Properties prop = new Properties(); - String fileName = "/../script/tests/devces/LS/.config"; - InputStream is = new FileInputStream(fileName); - this.jTextField1.setText(is.toString()); - prop.load(is); + String fileName = "../script/tests/devces/LS/.config"; + //InputStream is = new FileInputStream(fileName); + //this.jTextField1.setText(is.toString()); + //prop.load(is); +//Create a file chooser +final JFileChooser fc = new JFileChooser(); + +//In response to a button click: +int returnVal = fc.showOpenDialog(NetbeansPluginPanel.this); +this.jTextField1.setText(fc.toString()); //addToTable(prop.getProperty("name"), prop.getProperty("description")); addToTable(("name"), ("description")); //System.out.println(prop.getProperty("tests"));