This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 58486
Collapse All | Expand All

(-)src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.java (+15 lines)
Lines 21-26 Link Here
21
import java.util.ArrayList;
21
import java.util.ArrayList;
22
import java.util.Enumeration;
22
import java.util.Enumeration;
23
import java.util.Iterator;
23
import java.util.Iterator;
24
import javax.swing.Action;
24
import javax.swing.JButton;
25
import javax.swing.JButton;
25
import javax.swing.event.ChangeEvent;
26
import javax.swing.event.ChangeEvent;
26
import javax.swing.event.ChangeListener;
27
import javax.swing.event.ChangeListener;
Lines 46-51 Link Here
46
    private Panel firer;
47
    private Panel firer;
47
    private WizardDescriptor wizardDescriptor;
48
    private WizardDescriptor wizardDescriptor;
48
49
50
    // key to action value that influence folder list current directory
51
    public static final String INITIAL_SOURCE_ROOT = "EXISTING_SOURCES_CURRENT_DIRECTORY"; // NOI18N
52
49
    /** Creates new form PanelSourceFolders */
53
    /** Creates new form PanelSourceFolders */
50
    public PanelSourceFolders (Panel panel) {
54
    public PanelSourceFolders (Panel panel) {
51
        this.firer = panel;
55
        this.firer = panel;
Lines 93-98 Link Here
93
        File[] testRoot = (File[]) settings.getProperty ("testRoot");       //NOI18N
97
        File[] testRoot = (File[]) settings.getProperty ("testRoot");       //NOI18N
94
        if (testRoot != null) {
98
        if (testRoot != null) {
95
            ((FolderList)this.testsPanel).setFiles (testRoot);
99
            ((FolderList)this.testsPanel).setFiles (testRoot);
100
        }
101
102
        // honor current directory property
103
        File currentDirectory = null;
104
        Action action = (Action) wizardDescriptor.getProperty("javax.swing.Action"); // NOI18N
105
        if (action != null) {
106
            currentDirectory = (File) action.getValue(INITIAL_SOURCE_ROOT); // NOI18N
107
        }        
108
        if (currentDirectory != null && currentDirectory.isDirectory()) {       
109
            ((FolderList)sourcePanel).setLastUsedDir(currentDirectory);
110
            ((FolderList)testsPanel).setLastUsedDir(currentDirectory);
96
        }
111
        }
97
    }
112
    }
98
113

Return to bug 58486