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 36261
Collapse All | Expand All

(-)projects/ide/src/org/netbeans/modules/projects/ide/actions/ViewProjectsTabAction.java (-8 / +14 lines)
Lines 36-51 Link Here
36
    }
36
    }
37
37
38
    public void actionPerformed(ActionEvent evt) {
38
    public void actionPerformed(ActionEvent evt) {
39
        Mode m = WindowManager.getDefault ().getCurrentWorkspace ().findMode ("explorer"); //NOI18N
39
        TopComponent workplaceTab = WorkplaceTab.getDefault();
40
        if (m != null) {
40
        
41
            TopComponent tc [] = m.getTopComponents ();
41
        Workspace w = WindowManager.getDefault().getCurrentWorkspace();
42
            for (int i = 0; i < tc.length; i++) {
42
        Mode mode = w.findMode(workplaceTab);
43
                if (tc[i] instanceof WorkplaceTab) {
43
        if(mode == null) {
44
                    tc[i].open();
44
            mode = w.findMode("explorer"); // NOI18N
45
                    tc[i].requestFocus();
45
            if(mode == null) {
46
                }
46
                mode = w.createMode(
47
                    "explorer", // NOI18N
48
                    "Explorer", // display name XXX needles after merge
49
                    null); // icon XXX needless after merge
47
            }
50
            }
51
            mode.dockInto(workplaceTab);
48
        }
52
        }
53
        workplaceTab.open();
54
        workplaceTab.requestFocus(); // TEMP
49
    }
55
    }
50
56
51
    public HelpCtx getHelpCtx() {
57
    public HelpCtx getHelpCtx() {
(-)projects/ide/src/org/netbeans/modules/projects/ide/resources/components/projects.settings (-1 / +1 lines)
Lines 6-10 Link Here
6
    <instanceof class="org.openide.windows.ExplorerPanel"/>
6
    <instanceof class="org.openide.windows.ExplorerPanel"/>
7
    <instanceof class="java.awt.Container"/>
7
    <instanceof class="java.awt.Container"/>
8
    <instanceof class="java.awt.Component"/>
8
    <instanceof class="java.awt.Component"/>
9
    <instance class="org.netbeans.modules.projects.ide.ui.workplace.WorkplaceTab"/>
9
    <instance class="org.netbeans.modules.projects.ide.ui.workplace.WorkplaceTab" method="getDefault"/>
10
</settings>
10
</settings>
(-)projects/ide/src/org/netbeans/modules/projects/ide/ui/workplace/WorkplaceTab.java (-1 / +11 lines)
Lines 45-52 Link Here
45
    
45
    
46
    private transient BeanTreeView view;
46
    private transient BeanTreeView view;
47
    
47
    
48
    private static WorkplaceTab defaultInstance;
49
    
48
    /** Creates a new instance of ExplorerTab */
50
    /** Creates a new instance of ExplorerTab */
49
    public WorkplaceTab() {
51
    private WorkplaceTab() {
50
        super();
52
        super();
51
        
53
        
52
        Node w = Workplace.getDefault().getNode();
54
        Node w = Workplace.getDefault().getNode();
Lines 73-78 Link Here
73
                }
75
                }
74
            }, 5000);
76
            }, 5000);
75
        }
77
        }
78
    }
79
    
80
    public static synchronized WorkplaceTab getDefault() {
81
        if(defaultInstance == null) {
82
            defaultInstance = new WorkplaceTab();
83
        }
84
        
85
        return defaultInstance;
76
    }
86
    }
77
    
87
    
78
    public void requestFocus () {
88
    public void requestFocus () {

Return to bug 36261