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

(-)RootNodeChildren.java (+5 lines)
Lines 57-62 Link Here
57
    }
57
    }
58
    
58
    
59
    /**
59
    /**
60
     * Displays a node with a message about a test suite running.
61
     *
62
     * @param  suiteName  name of the running test suite,
63
     *                    or {@code ANONYMOUS_SUITE} for anonymous suites
64
     * @see  ResultDisplayHandler#ANONYMOUS_SUITE
60
     */
65
     */
61
    void displaySuiteRunning(final String suiteName) {
66
    void displaySuiteRunning(final String suiteName) {
62
        
67
        
(-)ResultDisplayHandler.java (-4 / +13 lines)
Lines 240-262 Link Here
240
    //-----------------------------------------------------------//
240
    //-----------------------------------------------------------//
241
    //------------------- DISPLAYING TREE -----------------------//
241
    //------------------- DISPLAYING TREE -----------------------//
242
    
242
    
243
    private static final String ANONYMOUS_SUITE = new String();
243
    static final String ANONYMOUS_SUITE = new String();
244
    private String runningSuite;
244
    private String runningSuite;
245
    private List reports;
245
    private List reports;
246
    private String message;
246
    private String message;
247
    
247
    
248
    /**
248
    /**
249
     *
250
     * @param  suiteName  name of the running suite; or {@code null} in the case
251
     *                    of anonymous suite
249
     */
252
     */
250
    void displaySuiteRunning(final String suiteName) {
253
    void displaySuiteRunning(String suiteName) {
251
        
254
        
252
        /* Called from the AntLogger's thread */
255
        /* Called from the AntLogger's thread */
253
        
256
        
254
        assert runningSuite == null;
257
        assert runningSuite == null;
255
        
258
        
259
        suiteName = (suiteName != null) ? suiteName : ANONYMOUS_SUITE;
260
        
256
        synchronized (this) {
261
        synchronized (this) {
257
            if (treePanel == null) {
262
            if (treePanel == null) {
258
                runningSuite = (suiteName != null) ? suiteName
263
                runningSuite = suiteName;
259
                                                   : ANONYMOUS_SUITE;
260
                return;
264
                return;
261
            }
265
            }
262
        }
266
        }
Lines 306-311 Link Here
306
    private Map/*<String, Method>*/ methodsMap;
310
    private Map/*<String, Method>*/ methodsMap;
307
    
311
    
308
    /**
312
    /**
313
     * Calls a given display-method of class {@code ResutlPanelTree}
314
     * in the AWT event queue thread.
315
     *
316
     * @param  methodName  name of the {@code ResultPanelTree} method
317
     * @param  param  argument to be passed to the method
309
     */
318
     */
310
    private void displayInDispatchThread(final String methodName,
319
    private void displayInDispatchThread(final String methodName,
311
                                         final Object param) {
320
                                         final Object param) {
(-)JUnitOutputReader.java (+4 lines)
Lines 524-529 Link Here
524
    }
524
    }
525
    
525
    
526
    /**
526
    /**
527
     * Notifies that a test suite was just started.
528
     *
529
     * @param  suiteName  name of the suite; or {@code null}
530
     *                    in the case of anonymous suite
527
     */
531
     */
528
    private Report suiteStarted(final String suiteName) {
532
    private Report suiteStarted(final String suiteName) {
529
        closePreviousReport();
533
        closePreviousReport();
(-)RootNode.java (+6 lines)
Lines 83-88 Link Here
83
    }
83
    }
84
    
84
    
85
    /**
85
    /**
86
     * Displays a message that a given test suite is running.
87
     *
88
     * @param  suiteName  name of the running test suite,
89
     *                    or {@code ANONYMOUS_SUITE} for anonymous suites
90
     *
91
     * @see  ResultDisplayHandler#ANONYMOUS_SUITE
86
     */
92
     */
87
    void displaySuiteRunning(final String suiteName) {
93
    void displaySuiteRunning(final String suiteName) {
88
        assert EventQueue.isDispatchThread();
94
        assert EventQueue.isDispatchThread();
(-)TestsuiteNode.java (-4 / +19 lines)
Lines 29-39 Link Here
29
 */
29
 */
30
final class TestsuiteNode extends AbstractNode {
30
final class TestsuiteNode extends AbstractNode {
31
    
31
    
32
    private final String suiteName;
32
    private String suiteName;
33
    private Report report;
33
    private Report report;
34
    private boolean filtered;
34
    private boolean filtered;
35
    
35
    
36
    /**
36
    /**
37
     *
38
     * @param  suiteName  name of the test suite, or {@code ANONYMOUS_SUITE}
39
     *                    in the case of anonymous suite
40
     * @see  ResultDisplayHandler#ANONYMOUS_SUITE
37
     */
41
     */
38
    TestsuiteNode(final String suiteName, final boolean filtered) {
42
    TestsuiteNode(final String suiteName, final boolean filtered) {
39
        this(null, suiteName, filtered);
43
        this(null, suiteName, filtered);
Lines 47-52 Link Here
47
    }
51
    }
48
    
52
    
49
    /**
53
    /**
54
     *
55
     * @param  suiteName  name of the test suite, or {@code ANONYMOUS_SUITE}
56
     *                    in the case of anonymous suite
57
     * @see  ResultDisplayHandler#ANONYMOUS_SUITE
50
     */
58
     */
51
    private TestsuiteNode(final Report report,
59
    private TestsuiteNode(final Report report,
52
                          final String suiteName,
60
                          final String suiteName,
Lines 58-63 Link Here
58
        this.suiteName = (report != null) ? report.suiteClassName : suiteName;
66
        this.suiteName = (report != null) ? report.suiteClassName : suiteName;
59
        this.filtered = filtered;
67
        this.filtered = filtered;
60
        
68
        
69
        assert this.suiteName != null;
70
        
61
        setDisplayName();
71
        setDisplayName();
62
        setIconBaseWithExtension(
72
        setIconBaseWithExtension(
63
                "org/netbeans/modules/junit/output/res/class.gif");     //NOI18N
73
                "org/netbeans/modules/junit/output/res/class.gif");     //NOI18N
Lines 67-75 Link Here
67
     */
77
     */
68
    void displayReport(final Report report) {
78
    void displayReport(final Report report) {
69
        assert (this.report == null) && (report != null);
79
        assert (this.report == null) && (report != null);
70
        assert report.suiteClassName.equals(this.suiteName);
80
        assert report.suiteClassName.equals(this.suiteName)
81
               || (this.suiteName == ResultDisplayHandler.ANONYMOUS_SUITE);
71
        
82
        
72
        this.report = report;
83
        this.report = report;
84
        suiteName = report.suiteClassName;
73
        
85
        
74
        setDisplayName();
86
        setDisplayName();
75
        setChildren(new TestsuiteNodeChildren(report, filtered));
87
        setChildren(new TestsuiteNodeChildren(report, filtered));
Lines 90-96 Link Here
90
    private void setDisplayName() {
102
    private void setDisplayName() {
91
        String displayName;
103
        String displayName;
92
        if (report == null) {
104
        if (report == null) {
93
            if (suiteName != null) {
105
            if (suiteName != ResultDisplayHandler.ANONYMOUS_SUITE) {
94
                displayName = NbBundle.getMessage(
106
                displayName = NbBundle.getMessage(
95
                                          getClass(),
107
                                          getClass(),
96
                                          "MSG_TestsuiteRunning",       //NOI18N
108
                                          "MSG_TestsuiteRunning",       //NOI18N
Lines 115-122 Link Here
115
    /**
127
    /**
116
     */
128
     */
117
    public String getHtmlDisplayName() {
129
    public String getHtmlDisplayName() {
130
        
131
        assert suiteName != null;
132
        
118
        StringBuffer buf = new StringBuffer(60);
133
        StringBuffer buf = new StringBuffer(60);
119
        if (suiteName != null) {
134
        if (suiteName != ResultDisplayHandler.ANONYMOUS_SUITE) {
120
            buf.append(suiteName);
135
            buf.append(suiteName);
121
            buf.append("&nbsp;&nbsp;");                                 //NOI18N
136
            buf.append("&nbsp;&nbsp;");                                 //NOI18N
122
        } else {
137
        } else {
(-)ResultPanelTree.java (+5 lines)
Lines 167-172 Link Here
167
    }
167
    }
168
    
168
    
169
    /**
169
    /**
170
     * Displays a message about a running suite.
171
     *
172
     * @param  suiteName  name of the running suite,
173
     *                    or {@code ANONYMOUS_SUITE} for anonymous suites
174
     * @see  ResultDisplayHandler#ANONYMOUS_SUITE
170
     */
175
     */
171
    void displaySuiteRunning(final String suiteName) {
176
    void displaySuiteRunning(final String suiteName) {
172
        assert EventQueue.isDispatchThread();
177
        assert EventQueue.isDispatchThread();
(-)Manager.java (+3 lines)
Lines 288-293 Link Here
288
    }
288
    }
289
    
289
    
290
    /**
290
    /**
291
     *
292
     * @param  suiteName  name of the running suite; or {@code null} in the case
293
     *                    of anonymous suite
291
     */
294
     */
292
    void displaySuiteRunning(final AntSession session,
295
    void displaySuiteRunning(final AntSession session,
293
                             final int sessionType,
296
                             final int sessionType,

Return to bug 73541