svn commit: r14919 - trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2008-06-13 03:54:46-0700
New Revision: 14919

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java

Log:
issue 5129: applied patch for multiple classpath selections from Stefan Ackermann

Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java?view=diff&rev=14919&p1=trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java&p2=trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java&r1=14918&r2=14919
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java	2008-06-13 03:54:46-0700
@@ -203,14 +203,16 @@
             final JFileChooser chooser = ch;
 
             chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
-
+            chooser.setMultiSelectionEnabled(true);
             chooser.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent e1) {
                     if (e1.getActionCommand().equals(
                             JFileChooser.APPROVE_SELECTION)) {
-                        File theFile = chooser.getSelectedFile();
-                        if (theFile != null) {
-                            pathsModel.addElement(theFile.toString());
+                        File[] files = chooser.getSelectedFiles();
+                        for(File theFile : files) {
+                            if (theFile != null) {
+                                pathsModel.addElement(theFile.toString());
+                            }
                         }
                     } else if (e1.getActionCommand().equals(
                             JFileChooser.CANCEL_SELECTION)) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.