You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by se...@apache.org on 2017/08/02 14:05:07 UTC

svn commit: r1803821 - in /ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component: FileChooserPanel.java FileTableCellEditor.java

Author: seanfinan
Date: Wed Aug  2 14:05:07 2017
New Revision: 1803821

URL: http://svn.apache.org/viewvc?rev=1803821&view=rev
Log:
Set initial directory to user's current working

Modified:
    ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileChooserPanel.java
    ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileTableCellEditor.java

Modified: ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileChooserPanel.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileChooserPanel.java?rev=1803821&r1=1803820&r2=1803821&view=diff
==============================================================================
--- ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileChooserPanel.java (original)
+++ ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileChooserPanel.java Wed Aug  2 14:05:07 2017
@@ -63,6 +63,10 @@ final public class FileChooserPanel exte
          super( "Select " + (selectDir ? "Directory" : "File") );
          __textComponent = textComponent;
          __chooser = new JFileChooser();
+         final String cwdPath = System.getProperty( "user.dir" );
+         if ( cwdPath != null && !cwdPath.isEmpty() ) {
+            __chooser.setCurrentDirectory( new File( cwdPath ) );
+         }
          __chooser.setFileSelectionMode( (selectDir ? JFileChooser.DIRECTORIES_ONLY : JFileChooser.FILES_ONLY) );
          __fileChangeListener = dirChangeListener;
       }

Modified: ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileTableCellEditor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileTableCellEditor.java?rev=1803821&r1=1803820&r2=1803821&view=diff
==============================================================================
--- ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileTableCellEditor.java (original)
+++ ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/component/FileTableCellEditor.java Wed Aug  2 14:05:07 2017
@@ -33,6 +33,11 @@ final public class FileTableCellEditor e
       _button.setToolTipText( "Select File" );
       _button.addActionListener( this );
       _chooser = new JFileChooser();
+      final String cwdPath = System.getProperty( "user.dir" );
+      if ( cwdPath != null && !cwdPath.isEmpty() ) {
+         _chooser.setCurrentDirectory( new File( cwdPath ) );
+      }
+
    }
 
    public JFileChooser getFileChooser() {