Revision: 18029
http://sourceforge.net/p/gate/code/18029
Author: markagreenwood
Date: 2014-05-23 10:23:33 +0000 (Fri, 23 May 2014)
Log Message:
-----------
clean up the file chooser properly before using it
Modified Paths:
--------------
gate/trunk/plugins/Developer_Tools/src/gate/creole/HeapDumper.java
Modified: gate/trunk/plugins/Developer_Tools/src/gate/creole/HeapDumper.java
===================================================================
--- gate/trunk/plugins/Developer_Tools/src/gate/creole/HeapDumper.java
2014-05-23 09:32:30 UTC (rev 18028)
+++ gate/trunk/plugins/Developer_Tools/src/gate/creole/HeapDumper.java
2014-05-23 10:23:33 UTC (rev 18029)
@@ -35,6 +35,7 @@
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
+import javax.swing.filechooser.FileFilter;
@SuppressWarnings("serial")
@CreoleResource(tool = true, isPrivate = true, autoinstances = @AutoInstance,
name = "Java Heap Dumper", helpURL =
"http://gate.ac.uk/userguide/sec:misc-creole:dev-tools", comment = "Dumps the
Java heap to the specified file")
@@ -99,7 +100,11 @@
XJFileChooser fileChooser = MainFrame.getFileChooser();
ExtensionFileFilter filter =
new ExtensionFileFilter("Java Heap Dump (*.hprof)", "hprof");
+
+ fileChooser.resetChoosableFileFilters();
+ fileChooser.setAcceptAllFileFilterUsed(true);
fileChooser.addChoosableFileFilter(filter);
+ fileChooser.setFileFilter(filter);
fileChooser.setMultiSelectionEnabled(false);
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.setDialogTitle("Java Heap Dump Generator");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs