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

(-)a/ide.kit/test/qa-functional/src/org/netbeans/test/ide/GeneralSanityTest.java (+59 lines)
Lines 82-87 Link Here
82
            honorAutoloadEager(true).
82
            honorAutoloadEager(true).
83
            addTest(
83
            addTest(
84
//                "testWaitForUIReady",
84
//                "testWaitForUIReady",
85
                "testSelectAllNodesInServicesTab",
85
                "testBlacklistedClassesHandler",
86
                "testBlacklistedClassesHandler",
86
                "testOrgOpenideOptionsIsDisabledAutoload",
87
                "testOrgOpenideOptionsIsDisabledAutoload",
87
                "testOrgNetBeansModulesLanguagesIsDisabledAutoload",
88
                "testOrgNetBeansModulesLanguagesIsDisabledAutoload",
Lines 125-130 Link Here
125
        r.waitForAWT();
126
        r.waitForAWT();
126
127
127
    }
128
    }
129
130
    public void testSelectAllNodesInServicesTab() throws Exception {
131
        // issue 162859
132
133
        // make sure BPEL is available and initialized:
134
        ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);
135
        Class<?> clazz = Class.forName("org.netbeans.modules.bpel.debugger.ui.action.Breakpoint", true, l);
136
        Object obj = clazz.newInstance();
137
        assertNotNull("BPEL breakpoints support initialized", obj);
138
139
        class R implements Runnable {
140
            TopComponent services;
141
            ExplorerManager em;
142
            Node[] nodes;
143
144
            public synchronized void run() {
145
                services = WindowManager.getDefault().findTopComponent("services");
146
                notifyAll();
147
                assertNotNull("Services tab shall be found", services);
148
                services.open();
149
                services.requestVisible();
150
                services.requestActive();
151
152
                if (services instanceof ExplorerManager.Provider) {
153
                    em = ((ExplorerManager.Provider)services).getExplorerManager();
154
                } else {
155
                    fail("Services tab is also ExplorerManager.Provider");
156
                }
157
                nodes = em.getRootContext().getChildren().getNodes(true);
158
            }
159
160
            synchronized final void waitForAWT() throws InterruptedException {
161
                int countDown = 10;
162
                while (services == null && countDown-- > 0) {
163
                    WindowManager.getDefault().invokeWhenUIReady(this);
164
                    wait();
165
                }
166
            }
167
        }
168
        R r = new R();
169
        r.waitForAWT();
170
171
172
        assertNotNull("Services Top Component found", r.services);
173
        assertNotNull("Nodes are ready", r.nodes);
174
175
        int cnt = 0;
176
        for (Node n : r.nodes) {
177
            r.em.setSelectedNodes(new Node[] { n });
178
            Thread.sleep(500);
179
            cnt++;
180
        }
181
182
        if (cnt == 0) {
183
            fail("Fail no nodes in Services tab");
184
        }
185
    }
186
128
187
129
    public void testBlacklistedClassesHandler() throws Exception {
188
    public void testBlacklistedClassesHandler() throws Exception {
130
        BlacklistedClassesHandler bcHandler = BlacklistedClassesHandlerSingleton.getBlacklistedClassesHandler();
189
        BlacklistedClassesHandler bcHandler = BlacklistedClassesHandlerSingleton.getBlacklistedClassesHandler();

Return to bug 162859