From 25b50e6b16a58556cf041e1aff3ba4226be298cd Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Tue, 9 Jun 2015 09:10:54 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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"));