From 18184c33cff3e9a204788571fce084520f064678 Mon Sep 17 00:00:00 2001 From: metasim Date: Wed, 24 Jan 2001 19:50:50 +0000 Subject: [PATCH] Fixed bug where currently selected files were not showing up in the displayed diallog. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268518 13f79535-47bb-0310-9956-ffa450edef68 --- .../tools/ant/gui/customizer/FilePropertyEditor.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/antidote/org/apache/tools/ant/gui/customizer/FilePropertyEditor.java b/src/antidote/org/apache/tools/ant/gui/customizer/FilePropertyEditor.java index c6bb769c7..1b6758a96 100644 --- a/src/antidote/org/apache/tools/ant/gui/customizer/FilePropertyEditor.java +++ b/src/antidote/org/apache/tools/ant/gui/customizer/FilePropertyEditor.java @@ -83,7 +83,6 @@ public class FilePropertyEditor extends AbstractPropertyEditor { */ public FilePropertyEditor() { _container = new JPanel(new BorderLayout()); - _widget = new JTextField(); @@ -192,12 +191,10 @@ public class FilePropertyEditor extends AbstractPropertyEditor { private class ActionHandler implements ActionListener { public void actionPerformed(ActionEvent e) { JFileChooser chooser = null; - if(_widget.getText().length() > 0) { - chooser = new JFileChooser(_widget.getText()); - } - else { - chooser = new JFileChooser(); - } + chooser = new JFileChooser(); + chooser.setSelectedFile((File) getValue()); + + _filter = (_filter == null ? chooser.getAcceptAllFileFilter() : _filter); chooser.setFileFilter(_filter);