netbeans.org is behind firewall, using runsocks wrapper... Index: src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.java =================================================================== RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.java,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.java 3 Mar 2005 09:04:04 -0000 1.37 +++ src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.java 2 May 2005 12:03:31 -0000 1.38 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; +import javax.swing.Action; import javax.swing.JButton; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -46,6 +47,9 @@ private Panel firer; private WizardDescriptor wizardDescriptor; + // key to action value that influence folder list current directory + public static final String INITIAL_SOURCE_ROOT = "EXISTING_SOURCES_CURRENT_DIRECTORY"; // NOI18N + /** Creates new form PanelSourceFolders */ public PanelSourceFolders (Panel panel) { this.firer = panel; @@ -93,6 +97,17 @@ File[] testRoot = (File[]) settings.getProperty ("testRoot"); //NOI18N if (testRoot != null) { ((FolderList)this.testsPanel).setFiles (testRoot); + } + + // honor current directory property + File currentDirectory = null; + Action action = (Action) wizardDescriptor.getProperty("javax.swing.Action"); // NOI18N + if (action != null) { + currentDirectory = (File) action.getValue(INITIAL_SOURCE_ROOT); // NOI18N + } + if (currentDirectory != null && currentDirectory.isDirectory()) { + ((FolderList)sourcePanel).setLastUsedDir(currentDirectory); + ((FolderList)testsPanel).setLastUsedDir(currentDirectory); } }