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

(-)a/junit/src/org/netbeans/modules/junit/output/Bundle.properties (-2 / +6 lines)
Lines 1-6 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
2
#
3
# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
3
# Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
4
#
4
#
5
# The contents of this file are subject to the terms of either the GNU
5
# The contents of this file are subject to the terms of either the GNU
6
# General Public License Version 2 only ("GPL") or the Common
6
# General Public License Version 2 only ("GPL") or the Common
Lines 23-29 Link Here
23
# Contributor(s):
23
# Contributor(s):
24
#
24
#
25
# The Original Software is NetBeans. The Initial Developer of the Original
25
# The Original Software is NetBeans. The Initial Developer of the Original
26
# Software is Sun Microsystems, Inc. Portions Copyright 2006-2007 Sun
26
# Software is Sun Microsystems, Inc. Portions Copyright 2006-2008 Sun
27
# Microsystems, Inc. All Rights Reserved.
27
# Microsystems, Inc. All Rights Reserved.
28
#
28
#
29
# If you wish your version of this file to be governed by only the CDDL
29
# If you wish your version of this file to be governed by only the CDDL
Lines 89-97 Link Here
89
# {0} .. name of the test method
89
# {0} .. name of the test method
90
MSG_TestMethodFailed={0} - FAILED
90
MSG_TestMethodFailed={0} - FAILED
91
MSG_TestMethodError={0} - caused an ERROR
91
MSG_TestMethodError={0} - caused an ERROR
92
MSG_TestMethodRunning={0} - running...
93
MSG_TestMethodInterrupted={0} - interrupted
92
MSG_TestMethodPassed_HTML=passed
94
MSG_TestMethodPassed_HTML=passed
93
MSG_TestMethodFailed_HTML=FAILED
95
MSG_TestMethodFailed_HTML=FAILED
94
MSG_TestMethodError_HTML=caused an ERROR
96
MSG_TestMethodError_HTML=caused an ERROR
97
MSG_TestMethodRunning_HTML=running...
98
MSG_TestMethodInterrupted_HTML=interrupted
95
99
96
# {0} .. name of the test method, {1} .. elapsed time in seconds
100
# {0} .. name of the test method, {1} .. elapsed time in seconds
97
MSG_TestMethodPassed_time={0}  ({1,number,0.0##} s)
101
MSG_TestMethodPassed_time={0}  ({1,number,0.0##} s)
(-)a/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java (-35 / +127 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
4
 * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
5
 *
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
7
 * General Public License Version 2 only ("GPL") or the Common
Lines 75-82 Link Here
75
import static java.util.Calendar.MILLISECOND;
75
import static java.util.Calendar.MILLISECOND;
76
import static java.util.logging.Level.FINER;
76
import static java.util.logging.Level.FINER;
77
import static java.util.logging.Level.FINEST;
77
import static java.util.logging.Level.FINEST;
78
import static org.netbeans.modules.junit.output.RegexpUtils.ADD_ERROR_PREFIX;
79
import static org.netbeans.modules.junit.output.RegexpUtils.ADD_FAILURE_PREFIX;
78
import static org.netbeans.modules.junit.output.RegexpUtils.END_OF_TEST_PREFIX;
80
import static org.netbeans.modules.junit.output.RegexpUtils.END_OF_TEST_PREFIX;
79
import static org.netbeans.modules.junit.output.RegexpUtils.NESTED_EXCEPTION_PREFIX;
80
import static org.netbeans.modules.junit.output.RegexpUtils.OUTPUT_DELIMITER_PREFIX;
81
import static org.netbeans.modules.junit.output.RegexpUtils.OUTPUT_DELIMITER_PREFIX;
81
import static org.netbeans.modules.junit.output.RegexpUtils.START_OF_TEST_PREFIX;
82
import static org.netbeans.modules.junit.output.RegexpUtils.START_OF_TEST_PREFIX;
82
import static org.netbeans.modules.junit.output.RegexpUtils.TESTCASE_PREFIX;
83
import static org.netbeans.modules.junit.output.RegexpUtils.TESTCASE_PREFIX;
Lines 107-112 Link Here
107
    private static final String XML_FORMATTER_CLASS_NAME
108
    private static final String XML_FORMATTER_CLASS_NAME
108
            = "org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter";//NOI18N
109
            = "org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter";//NOI18N
109
    
110
    
111
    /**
112
     * Does Ant provide detailed information about the currently running test
113
     * and its output?
114
     */
115
    private boolean testListenerInfoAvailable = false;
110
    /**
116
    /**
111
     * number of tests to be executed in the current test suite
117
     * number of tests to be executed in the current test suite
112
     * 
118
     * 
Lines 172-179 Link Here
172
    /** */
178
    /** */
173
    private RegexpUtils regexp = RegexpUtils.getInstance();
179
    private RegexpUtils regexp = RegexpUtils.getInstance();
174
    
180
    
175
    /** */
181
    ///** */
176
    private Report topReport;
182
    //private Report topReport;
177
    /** */
183
    /** */
178
    private Report report;
184
    private Report report;
179
    /** */
185
    /** */
Lines 236-241 Link Here
236
            progressLogger.finest("VERBOSE: " + msg);                   //NOI18N
242
            progressLogger.finest("VERBOSE: " + msg);                   //NOI18N
237
        }
243
        }
238
        if (msg.startsWith(TEST_LISTENER_PREFIX)) {
244
        if (msg.startsWith(TEST_LISTENER_PREFIX)) {
245
            if (report == null) {
246
                return;
247
            }
248
            testListenerInfoAvailable = true;
239
            String testListenerMsg = msg.substring(TEST_LISTENER_PREFIX.length());
249
            String testListenerMsg = msg.substring(TEST_LISTENER_PREFIX.length());
240
            if (testListenerMsg.startsWith(TESTS_COUNT_PREFIX)) {
250
            if (testListenerMsg.startsWith(TESTS_COUNT_PREFIX)) {
241
                String countStr = testListenerMsg.substring(TESTS_COUNT_PREFIX.length());
251
                String countStr = testListenerMsg.substring(TESTS_COUNT_PREFIX.length());
Lines 252-278 Link Here
252
                }
262
                }
253
                return;
263
                return;
254
            }
264
            }
255
            if (testListenerMsg.startsWith(START_OF_TEST_PREFIX)) {
265
266
            int leftBracketIndex = testListenerMsg.indexOf('(');
267
            if (leftBracketIndex == -1) {
268
                return;
269
            }
270
271
            final String shortMsg = testListenerMsg.substring(0, leftBracketIndex);
272
            if (shortMsg.equals(START_OF_TEST_PREFIX)) {
273
                boolean testStarted = false;
256
                String restOfMsg = testListenerMsg.substring(START_OF_TEST_PREFIX.length());
274
                String restOfMsg = testListenerMsg.substring(START_OF_TEST_PREFIX.length());
257
                if ((restOfMsg.length() == 0)
275
                if (restOfMsg.length() == 0) {
258
                        || !Character.isLetterOrDigit(restOfMsg.charAt(0))) {
276
                    testStarted = true;
277
                } else {
278
                    char firstChar = restOfMsg.charAt(0);
279
                    char lastChar = restOfMsg.charAt(restOfMsg.length() - 1);
280
                    if ((firstChar == '(') && (lastChar == ')')) {
281
                        testcase = new Report.Testcase();
282
                        testcase.name = restOfMsg.substring(1, restOfMsg.length() - 1);
283
                        testcase.timeMillis = Report.Testcase.NOT_FINISHED_YET;
284
                        testStarted = true;
285
                    } else if (!Character.isLetterOrDigit(firstChar)) {
286
                        testStarted = true;
287
                    }
288
                }
289
                if (testStarted) {
259
                    progressLogger.finest("test started");              //NOI18N
290
                    progressLogger.finest("test started");              //NOI18N
260
                }
291
                }
261
                return;
292
                return;
262
            }
293
            }
263
            if (testListenerMsg.startsWith(END_OF_TEST_PREFIX)) {
294
            if (shortMsg.equals(END_OF_TEST_PREFIX)) {
295
                boolean testFinished = false;
264
                String restOfMsg = testListenerMsg.substring(END_OF_TEST_PREFIX.length());
296
                String restOfMsg = testListenerMsg.substring(END_OF_TEST_PREFIX.length());
265
                if ((restOfMsg.length() == 0)
297
                if (restOfMsg.length() == 0) {
266
                        || !Character.isLetterOrDigit(restOfMsg.charAt(0))) {
298
                    testFinished = true;
267
                    progressLogger.finest("test finished");             //NOI18N
299
                } else {
300
                    char firstChar = restOfMsg.charAt(0);
301
                    char lastChar = restOfMsg.charAt(restOfMsg.length() - 1);
302
                    if ((firstChar == '(') && (lastChar == ')')) {
303
                        String name = restOfMsg.substring(1, restOfMsg.length() - 1);
304
                        if (name.equals(testcase.name)) {
305
                            testFinished = true;
306
                        }
307
                    } else if (!Character.isLetterOrDigit(firstChar)) {
308
                        testFinished = true;
309
                    }
310
                }
311
                if (testFinished) {
312
                    if (testcase != null) {
313
                        testcase.timeMillis = Report.Testcase.TIME_UNKNOWN;
314
                        report.reportTest(testcase);
315
                        testcase = null;
316
                    }
268
                    executedOneSuiteTests++;
317
                    executedOneSuiteTests++;
269
                    if (expectedOneSuiteTests < executedOneSuiteTests) {
318
                    if (expectedOneSuiteTests < executedOneSuiteTests) {
270
                        expectedOneSuiteTests = executedOneSuiteTests;
319
                        expectedOneSuiteTests = executedOneSuiteTests;
271
                    }
320
                    }
321
                    progressLogger.finest("test finished");             //NOI18N
272
                    updateProgress();
322
                    updateProgress();
273
                }
323
                }
274
                return;
324
                return;
275
            }
325
            }
326
            if (shortMsg.equals(ADD_FAILURE_PREFIX)
327
                    || shortMsg.equals(ADD_ERROR_PREFIX)) {
328
                if (testcase == null) {
329
                    return;
330
                }
331
                int lastCharIndex = testListenerMsg.length() - 1;
332
                if (testListenerMsg.charAt(lastCharIndex) != ')') {
333
                    return;
334
                }
335
                String insideBrackets = testListenerMsg.substring(
336
                                                        shortMsg.length() + 1,
337
                                                        lastCharIndex);
338
                int commaIndex = insideBrackets.indexOf(',');
339
                String testName = (commaIndex == -1)
340
                                  ? insideBrackets
341
                                  : insideBrackets.substring(0, commaIndex);
342
                if (!testName.equals(testcase.className)) {
343
                    return;
344
                }
345
                testcase.trouble = new Report.Trouble(shortMsg.equals(ADD_ERROR_PREFIX));
346
                if (commaIndex != -1) {
347
                    int errMsgStart;
348
                    if (Character.isSpaceChar(insideBrackets.charAt(commaIndex + 1))) {
349
                        errMsgStart = commaIndex + 2;
350
                    } else {
351
                        errMsgStart = commaIndex + 1;
352
                    }
353
                    testcase.trouble.message = insideBrackets.substring(errMsgStart);
354
                }
355
            }
356
            return;
276
        }
357
        }
277
        
358
        
278
        /* Look for classpaths: */
359
        /* Look for classpaths: */
Lines 312-317 Link Here
312
            progressLogger.finest("NORMAL:  " + msg);                   //NOI18N
393
            progressLogger.finest("NORMAL:  " + msg);                   //NOI18N
313
        }
394
        }
314
        
395
        
396
        if (testListenerInfoAvailable
397
                && (report != null) && !report.isSuiteFinished()
398
                && (testcase != null)) {
399
            displayOutput(msg, event.getLogLevel() == AntEvent.LOG_WARN);
400
            return;
401
        }
402
315
        //<editor-fold defaultstate="collapsed" desc="if (waitingForIssueStatus) ...">
403
        //<editor-fold defaultstate="collapsed" desc="if (waitingForIssueStatus) ...">
316
        if (waitingForIssueStatus) {
404
        if (waitingForIssueStatus) {
317
            assert testcase != null;
405
            assert testcase != null;
Lines 433-438 Link Here
433
            if (matcher.matches()) {
521
            if (matcher.matches()) {
434
                assert report != null;
522
                assert report != null;
435
                
523
                
524
                report.markSuiteFinished();
436
                try {
525
                try {
437
                    report.totalTests = Integer.parseInt(matcher.group(1));
526
                    report.totalTests = Integer.parseInt(matcher.group(1));
438
                    report.failures = Integer.parseInt(matcher.group(2));
527
                    report.failures = Integer.parseInt(matcher.group(2));
Lines 457-463 Link Here
457
        }
546
        }
458
        //</editor-fold>
547
        //</editor-fold>
459
        //<editor-fold defaultstate="collapsed" desc="output">
548
        //<editor-fold defaultstate="collapsed" desc="output">
460
        else {
549
        else if (!testListenerInfoAvailable) {
461
            displayOutput(msg,
550
            displayOutput(msg,
462
                          event.getLogLevel() == AntEvent.LOG_WARN);
551
                          event.getLogLevel() == AntEvent.LOG_WARN);
463
        }
552
        }
Lines 736-753 Link Here
736
         //
825
         //
737
        isDeterminateProgress = willBeDeterminateProgress;
826
        isDeterminateProgress = willBeDeterminateProgress;
738
        
827
        
739
        Manager.getInstance().testStarted(session,
828
        manager.testStarted(session, sessionType);
740
                                          sessionType);
741
    }
829
    }
742
    
830
    
743
    /**
831
    /**
744
     */
832
     */
745
    void testTaskFinished() {
833
    void testTaskFinished() {
746
        if (waitingForIssueStatus) {
747
            assert testcase != null;
748
            
749
            report.reportTest(testcase);
750
        }
751
        closePreviousReport();
834
        closePreviousReport();
752
835
753
        progressLogger.finer("ACTUAL # OF SUITES: " + executedSuitesCount);
836
        progressLogger.finer("ACTUAL # OF SUITES: " + executedSuitesCount);
Lines 869-876 Link Here
869
    void buildFinished(final AntEvent event) {
952
    void buildFinished(final AntEvent event) {
870
        try {
953
        try {
871
            buildFinished(event.getException());
954
            buildFinished(event.getException());
872
            Manager.getInstance().sessionFinished(session,
955
873
                                                  sessionType);
956
            if (report != null) {
957
                closePreviousReport(true);  //true ... interrupted
958
            }
959
960
            manager.sessionFinished(session, sessionType);
874
        } finally {
961
        } finally {
875
            progressHandle.finish();
962
            progressHandle.finish();
876
        }
963
        }
Lines 898-918 Link Here
898
            progressHandle.progress(stepMessage);
985
            progressHandle.progress(stepMessage);
899
        }
986
        }
900
                
987
                
901
        Manager.getInstance().displaySuiteRunning(session,
988
        manager.displaySuiteRunning(session, sessionType, suiteName);
902
                                                  sessionType,
903
                                                  suiteName);
904
        return report;
989
        return report;
905
    }
990
    }
906
    
991
    
907
    /**
992
    /**
908
     */
993
     */
909
    private void suiteFinished(final Report report) {
994
    private void suiteFinished(final Report report, boolean interrupted) {
910
        if (progressLogger.isLoggable(FINER)) {
995
        if (progressLogger.isLoggable(FINER)) {
911
            progressLogger.finer("actual # of tests in a suite: " + executedOneSuiteTests);
996
            progressLogger.finer("actual # of tests in a suite: " + executedOneSuiteTests);
912
        }
997
        }
913
        executedSuitesCount++;
998
        executedSuitesCount++;
914
        
999
        
915
        Manager.getInstance().displayReport(session, sessionType, report);
1000
        manager.displayReport(session, sessionType, report);
916
    }
1001
    }
917
    
1002
    
918
    private void buildFinished(final Throwable exception) {
1003
    private void buildFinished(final Throwable exception) {
Lines 951-957 Link Here
951
    /**
1036
    /**
952
     */
1037
     */
953
    private void displayOutput(final String text, final boolean error) {
1038
    private void displayOutput(final String text, final boolean error) {
954
        Manager.getInstance().displayOutput(session, sessionType, text, error);
1039
        manager.displayOutput(session, sessionType, text, error);
955
    }
1040
    }
956
    
1041
    
957
    //--------------------------------------------------------
1042
    //--------------------------------------------------------
Lines 959-973 Link Here
959
    /**
1044
    /**
960
     */
1045
     */
961
    private boolean tryParsePlainHeader(String testcaseHeader) {
1046
    private boolean tryParsePlainHeader(String testcaseHeader) {
1047
        assert report != null;
962
        final Matcher matcher = regexp.getTestcaseHeaderPlainPattern()
1048
        final Matcher matcher = regexp.getTestcaseHeaderPlainPattern()
963
                                .matcher(testcaseHeader);
1049
                                .matcher(testcaseHeader);
964
        if (matcher.matches()) {
1050
        if (matcher.matches()) {
965
            String methodName = matcher.group(1);
1051
            String methodName = matcher.group(1);
966
            int timeMillis = regexp.parseTimeMillisNoNFE(matcher.group(2));
1052
            int timeMillis = regexp.parseTimeMillisNoNFE(matcher.group(2));
967
            
1053
            
968
            testcase = new Report.Testcase();
1054
            testcase = report.findTest(methodName, true);
969
            testcase.className = null;
1055
            testcase.className = null;
970
            testcase.name = methodName;
971
            testcase.timeMillis = timeMillis;
1056
            testcase.timeMillis = timeMillis;
972
            
1057
            
973
            trouble = null;
1058
            trouble = null;
Lines 982-987 Link Here
982
    /**
1067
    /**
983
     */
1068
     */
984
    private boolean tryParseBriefHeader(String testcaseHeader) {
1069
    private boolean tryParseBriefHeader(String testcaseHeader) {
1070
        assert report != null;
985
        final Matcher matcher = regexp.getTestcaseHeaderBriefPattern()
1071
        final Matcher matcher = regexp.getTestcaseHeaderBriefPattern()
986
                                .matcher(testcaseHeader);
1072
                                .matcher(testcaseHeader);
987
        if (matcher.matches()) {
1073
        if (matcher.matches()) {
Lines 989-997 Link Here
989
            String clsName = matcher.group(2);
1075
            String clsName = matcher.group(2);
990
            boolean error = (matcher.group(3) == null);
1076
            boolean error = (matcher.group(3) == null);
991
1077
992
            testcase = new Report.Testcase();
1078
            testcase = report.findTest(methodName, true);
993
            testcase.className = clsName;
1079
            testcase.className = clsName;
994
            testcase.name = methodName;
995
            testcase.timeMillis = -1;
1080
            testcase.timeMillis = -1;
996
1081
997
            trouble = (testcase.trouble = new Report.Trouble(error));
1082
            trouble = (testcase.trouble = new Report.Trouble(error));
Lines 1002-1010 Link Here
1002
        }
1087
        }
1003
    }
1088
    }
1004
    
1089
    
1005
    /**
1006
     */
1007
    private void closePreviousReport() {
1090
    private void closePreviousReport() {
1091
        closePreviousReport(false);
1092
    }
1093
1094
    private void closePreviousReport(boolean interrupted) {
1008
        if (xmlOutputBuffer != null) {
1095
        if (xmlOutputBuffer != null) {
1009
            try {
1096
            try {
1010
                String xmlOutput = xmlOutputBuffer.toString();
1097
                String xmlOutput = xmlOutputBuffer.toString();
Lines 1019-1029 Link Here
1019
                assert false;           //should not happen (StringReader)
1106
                assert false;           //should not happen (StringReader)
1020
            }
1107
            }
1021
        } else if ((report != null) && (report.resultsDir != null)) {
1108
        } else if ((report != null) && (report.resultsDir != null)) {
1109
1110
            if (waitingForIssueStatus) {
1111
                assert testcase != null;
1112
                report.reportTest(testcase);
1113
            }
1114
1022
            /*
1115
            /*
1023
             * We have parsed the output but it seems that we also have
1116
             * We have parsed the output but it seems that we also have
1024
             * an XML report file available - let's use it:
1117
             * an XML report file available - let's use it:
1025
             */
1118
             */
1026
            
1027
            File reportFile = new File(
1119
            File reportFile = new File(
1028
                              report.resultsDir,
1120
                              report.resultsDir,
1029
                              "TEST-" + report.suiteClassName + ".xml");//NOI18N
1121
                              "TEST-" + report.suiteClassName + ".xml");//NOI18N
Lines 1060-1066 Link Here
1060
            }
1152
            }
1061
        }
1153
        }
1062
        if (report != null) {
1154
        if (report != null) {
1063
            suiteFinished(report);
1155
            suiteFinished(report, interrupted);
1064
        }
1156
        }
1065
        
1157
        
1066
        xmlOutputBuffer = null;
1158
        xmlOutputBuffer = null;
(-)a/junit/src/org/netbeans/modules/junit/output/RegexpUtils.java (-2 / +4 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
4
 * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
5
 *
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
7
 * General Public License Version 2 only ("GPL") or the Common
Lines 24-30 Link Here
24
 * Contributor(s):
24
 * Contributor(s):
25
 *
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
28
 * Microsystems, Inc. All Rights Reserved.
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
30
 * If you wish your version of this file to be governed by only the CDDL
Lines 152-157 Link Here
152
    static final String START_OF_TEST_PREFIX = "startTest";             //NOI18N
152
    static final String START_OF_TEST_PREFIX = "startTest";             //NOI18N
153
    /** */
153
    /** */
154
    static final String END_OF_TEST_PREFIX = "endTest";                 //NOI18N
154
    static final String END_OF_TEST_PREFIX = "endTest";                 //NOI18N
155
    static final String ADD_FAILURE_PREFIX = "addFailure";      //NOI18N
156
    static final String ADD_ERROR_PREFIX = "addError";          //NOI18N
155
    
157
    
156
    /**
158
    /**
157
     * Regexp matching part of a Java task's invocation debug message
159
     * Regexp matching part of a Java task's invocation debug message
(-)a/junit/src/org/netbeans/modules/junit/output/Report.java (-4 / +47 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
4
 * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
5
 *
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
7
 * General Public License Version 2 only ("GPL") or the Common
Lines 24-30 Link Here
24
 * Contributor(s):
24
 * Contributor(s):
25
 *
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
28
 * Microsystems, Inc. All Rights Reserved.
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
30
 * If you wish your version of this file to be governed by only the CDDL
Lines 47-53 Link Here
47
import java.util.Collection;
47
import java.util.Collection;
48
import java.util.Collections;
48
import java.util.Collections;
49
import org.netbeans.api.java.classpath.ClassPath;
49
import org.netbeans.api.java.classpath.ClassPath;
50
import org.openide.ErrorManager;
51
import org.openide.filesystems.FileObject;
50
import org.openide.filesystems.FileObject;
52
51
53
/**
52
/**
Lines 76-82 Link Here
76
     */
75
     */
77
    int detectedPassedTests;
76
    int detectedPassedTests;
78
    private Collection<Testcase> tests;
77
    private Collection<Testcase> tests;
79
    private boolean closed = false;
78
    private boolean suiteFinished = false;
80
    
79
    
81
    /**
80
    /**
82
     */
81
     */
Lines 99-104 Link Here
99
            detectedPassedTests++;
98
            detectedPassedTests++;
100
        }
99
        }
101
    }
100
    }
101
102
    /**
103
     * Finds a test having the given name in this {@code Report}.
104
     * If parameter {@code create} is {@code true} and a test of the given
105
     * name did not exist, a new {@code Testcase} is created and is named
106
     * after the given {@code name} parameter.
107
     *
108
     * @param  name  requested name of the test
109
     * @param  create  whether a test should be created if it does not exist yet
110
     * @return  an existing test of the given name, or {@code null} if it does
111
     *          not exist and parameter {@code create} is {@code false},
112
     *          or a newly created {@code Testcase} if test of the given
113
     *          name did not exist and parameter {@code create} was {@code true}
114
     */
115
    Testcase findTest(String name, boolean create) {
116
        if ((tests == null) || tests.isEmpty()) {
117
            return create ? new Testcase(name) : null;
118
        }
119
120
        for (Testcase test : tests) {
121
            if (name.equals(test.name)) {
122
                return test;
123
            }
124
        }
125
        return create ? new Testcase(name) : null;
126
    }
127
128
    /**
129
     */
130
    void markSuiteFinished() {
131
        suiteFinished = true;
132
    }
133
134
    /**
135
     */
136
    boolean isSuiteFinished() {
137
        return suiteFinished;
138
    }
102
    
139
    
103
    /**
140
    /**
104
     */
141
     */
Lines 119-124 Link Here
119
        this.elapsedTimeMillis = report.elapsedTimeMillis;
156
        this.elapsedTimeMillis = report.elapsedTimeMillis;
120
        this.detectedPassedTests = report.detectedPassedTests;
157
        this.detectedPassedTests = report.detectedPassedTests;
121
        this.tests = report.tests;
158
        this.tests = report.tests;
159
        this.suiteFinished |= report.suiteFinished;
122
    }
160
    }
123
    
161
    
124
    /**
162
    /**
Lines 155-164 Link Here
155
    /**
193
    /**
156
     */
194
     */
157
    static final class Testcase {
195
    static final class Testcase {
196
        static final int TIME_UNKNOWN = -1;
197
        static final int NOT_FINISHED_YET = -2;
158
        String className;
198
        String className;
159
        String name;
199
        String name;
160
        int timeMillis;
200
        int timeMillis;
161
        Trouble trouble;
201
        Trouble trouble;
202
203
        Testcase() {}
204
        Testcase(String name) { this.name = name; }
162
    }
205
    }
163
    
206
    
164
    /**
207
    /**
(-)a/junit/src/org/netbeans/modules/junit/output/TestMethodNode.java (-37 / +62 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
4
 * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
5
 *
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
7
 * General Public License Version 2 only ("GPL") or the Common
Lines 24-30 Link Here
24
 * Contributor(s):
24
 * Contributor(s):
25
 *
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
28
 * Microsystems, Inc. All Rights Reserved.
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
30
 * If you wish your version of this file to be governed by only the CDDL
Lines 46-57 Link Here
46
import org.openide.nodes.Children;
46
import org.openide.nodes.Children;
47
import org.openide.util.NbBundle;
47
import org.openide.util.NbBundle;
48
import org.openide.util.actions.SystemAction;
48
import org.openide.util.actions.SystemAction;
49
import static org.netbeans.modules.junit.output.Report.Testcase;
49
50
50
/**
51
/**
51
 *
52
 *
52
 * @author Marian Petras
53
 * @author Marian Petras
53
 */
54
 */
54
final class TestMethodNode extends AbstractNode {
55
final class TestMethodNode extends AbstractNode {
56
57
    private static final String[] NO_TIME_STATUS_KEYS = new String[] {
58
                                      null,
59
                                      "MSG_TestMethodError",            //NOI18N
60
                                      "MSG_TestMethodFailed"};          //NOI18N
61
    private static final String[] TIME_STATUS_KEYS = new String[] {
62
                                      "MSG_TestMethodPassed_time",      //NOI18N
63
                                      "MSG_TestMethodError_time",       //NOI18N
64
                                      "MSG_TestMethodFailed_time"};     //NOI18N
65
    private static final String STATUS_KEY_INTERRUPTED
66
                                    = "MSG_TestMethodInterrupted";      //NOI18N
67
    private static final String[] NO_TIME_STATUS_KEYS_HTML = new String[] {
68
                                      "MSG_TestMethodPassed_HTML",      //NOI18N
69
                                      "MSG_TestMethodError_HTML",       //NOI18N
70
                                      "MSG_TestMethodFailed_HTML"};     //NOI18N
71
    private static final String[] TIME_STATUS_KEYS_HTML = new String[] {
72
                                      "MSG_TestMethodPassed_HTML_time", //NOI18N
73
                                      "MSG_TestMethodError_HTML_time",  //NOI18N
74
                                      "MSG_TestMethodFailed_HTML_time"};//NOI18N
75
    private static final String STATUS_KEY_INTERRUPTED_HTML
76
                                    = "MSG_TestMethodInterrupted_HTML"; //NOI18N
55
77
56
    /** */
78
    /** */
57
    private final Report.Testcase testcase;
79
    private final Report.Testcase testcase;
Lines 82-105 Link Here
82
            setDisplayName(testcase.name);
104
            setDisplayName(testcase.name);
83
            return;
105
            return;
84
        }
106
        }
85
        
107
86
        String[] noTimeKeys = new String[] {
108
        String bundleKey;
87
                                      null,
109
        Object[] bundleParams;
88
                                      "MSG_TestMethodError",            //NOI18N
110
        if (testcase.timeMillis == Testcase.NOT_FINISHED_YET) {
89
                                      "MSG_TestMethodFailed"};          //NOI18N
111
            bundleKey = STATUS_KEY_INTERRUPTED;
90
        String[] timeKeys = new String[] {
112
            bundleParams = new Object[] {testcase.name};
91
                                      "MSG_TestMethodPassed_time",      //NOI18N
113
        } else if (testcase.timeMillis == Testcase.TIME_UNKNOWN) {
92
                                      "MSG_TestMethodError_time",       //NOI18N
114
            bundleKey = NO_TIME_STATUS_KEYS[status];
93
                                      "MSG_TestMethodFailed_time"};     //NOI18N
115
            bundleParams = new Object[] {testcase.name};
94
        setDisplayName(
116
        } else {
95
                testcase.timeMillis < 0
117
            bundleKey = TIME_STATUS_KEYS[status];
96
                ? NbBundle.getMessage(getClass(),
118
            bundleParams = new Object[] {testcase.name,
97
                                      noTimeKeys[status],
119
                                         new Float(testcase.timeMillis/1000f)};
98
                                      testcase.name)
120
        }
99
                : NbBundle.getMessage(getClass(),
121
        setDisplayName(NbBundle.getMessage(getClass(), bundleKey, bundleParams));
100
                                      timeKeys[status],
101
                                      testcase.name,
102
                                      new Float(testcase.timeMillis/1000f)));
103
    }
122
    }
104
    
123
    
105
    /**
124
    /**
Lines 109-134 Link Here
109
        final int status = (testcase.trouble == null)
128
        final int status = (testcase.trouble == null)
110
                           ? 0
129
                           ? 0
111
                           : testcase.trouble.isError() ? 1 : 2;
130
                           : testcase.trouble.isError() ? 1 : 2;
112
        String[] noTimeKeys = new String[] {
131
113
                                      "MSG_TestMethodPassed_HTML",      //NOI18N
132
        String bundleKey;
114
                                      "MSG_TestMethodError_HTML",       //NOI18N
133
        Object bundleParam;
115
                                      "MSG_TestMethodFailed_HTML"};     //NOI18N
134
        String color = null;
116
        String[] timeKeys = new String[] {
135
        if (testcase.timeMillis == Testcase.NOT_FINISHED_YET) {
117
                                      "MSG_TestMethodPassed_HTML_time", //NOI18N
136
            bundleKey = STATUS_KEY_INTERRUPTED_HTML;
118
                                      "MSG_TestMethodError_HTML_time",  //NOI18N
137
            bundleParam = null;
119
                                      "MSG_TestMethodFailed_HTML_time"};//NOI18N
138
            color = "CE7B00";   //dark orange                           //NOI18N
139
        } else if (testcase.timeMillis == Testcase.TIME_UNKNOWN) {
140
            bundleKey = NO_TIME_STATUS_KEYS_HTML[status];
141
            bundleParam = null;
142
        } else {
143
            bundleKey = TIME_STATUS_KEYS_HTML[status];
144
            bundleParam = new Float(testcase.timeMillis/1000f);
145
        }
146
        if (color == null) {
147
            color = (testcase.trouble != null) ? "FF0000" : "00CC00";   //NOI18N
148
        }
120
                                          
149
                                          
121
        StringBuffer buf = new StringBuffer(60);
150
        StringBuilder buf = new StringBuilder(60);
122
        buf.append(testcase.name);
151
        buf.append(testcase.name);
123
        buf.append("&nbsp;&nbsp;");                                     //NOI18N
152
        buf.append("&nbsp;&nbsp;");                                     //NOI18N
124
        buf.append("<font color='#");                                   //NOI18N
153
        buf.append("<font color='#").append(color).append("'>");        //NOI18N
125
        buf.append(testcase.trouble != null ? "FF0000'>" : "00CC00'>"); //NOI18N
154
        buf.append((bundleParam == null)
126
        buf.append(testcase.timeMillis < 0
155
                   ? NbBundle.getMessage(getClass(), bundleKey)
127
                   ? NbBundle.getMessage(getClass(),
156
                   : NbBundle.getMessage(getClass(), bundleKey, bundleParam));
128
                                         noTimeKeys[status])
129
                   : NbBundle.getMessage(getClass(),
130
                                         timeKeys[status],
131
                                         new Float(testcase.timeMillis/1000f)));
132
        buf.append("</font>");                                          //NOI18N
157
        buf.append("</font>");                                          //NOI18N
133
        return buf.toString();
158
        return buf.toString();
134
    }
159
    }
(-)a/junit/src/org/netbeans/modules/junit/output/XmlOutputParser.java (+1 lines)
Lines 107-112 Link Here
107
        XmlOutputParser parser = new XmlOutputParser();
107
        XmlOutputParser parser = new XmlOutputParser();
108
        try {
108
        try {
109
           parser.xmlReader.parse(new InputSource(reader));
109
           parser.xmlReader.parse(new InputSource(reader));
110
           parser.report.markSuiteFinished();
110
        } catch (SAXException ex) {
111
        } catch (SAXException ex) {
111
            String message = ex.getMessage();
112
            String message = ex.getMessage();
112
            int severity = ErrorManager.INFORMATIONAL;
113
            int severity = ErrorManager.INFORMATIONAL;
(-)a/properties/src/org/netbeans/modules/properties/PropertiesLocaleNode.java (-15 / +43 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
4
 * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
5
 *
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
7
 * General Public License Version 2 only ("GPL") or the Common
Lines 43-58 Link Here
43
43
44
import java.awt.Component;
44
import java.awt.Component;
45
import java.awt.datatransfer.Transferable;
45
import java.awt.datatransfer.Transferable;
46
import java.awt.Dialog;
47
import java.awt.event.ActionEvent;
48
import java.awt.event.ActionListener;
49
import java.io.IOException;
46
import java.io.IOException;
50
import java.text.MessageFormat;
51
import java.util.List;
47
import java.util.List;
52
import javax.swing.Action;
48
import javax.swing.Action;
53
import javax.swing.JPanel;
54
49
55
import org.openide.actions.*;
56
import org.openide.DialogDescriptor;
50
import org.openide.DialogDescriptor;
57
import org.openide.filesystems.FileObject;
51
import org.openide.filesystems.FileObject;
58
import org.openide.filesystems.FileUtil;
52
import org.openide.filesystems.FileUtil;
Lines 61-66 Link Here
61
import org.openide.nodes.NodeTransfer;
55
import org.openide.nodes.NodeTransfer;
62
import org.openide.NotifyDescriptor;
56
import org.openide.NotifyDescriptor;
63
import org.openide.DialogDisplayer;
57
import org.openide.DialogDisplayer;
58
import org.openide.actions.CopyAction;
59
import org.openide.actions.CutAction;
60
import org.openide.actions.DeleteAction;
61
import org.openide.actions.EditAction;
62
import org.openide.actions.FileSystemAction;
63
import org.openide.actions.NewAction;
64
import org.openide.actions.OpenAction;
65
import org.openide.actions.PasteAction;
66
import org.openide.actions.PropertiesAction;
67
import org.openide.actions.SaveAsTemplateAction;
68
import org.openide.actions.ToolsAction;
64
import org.openide.util.actions.SystemAction;
69
import org.openide.util.actions.SystemAction;
65
import org.openide.util.datatransfer.NewType;
70
import org.openide.util.datatransfer.NewType;
66
import org.openide.util.datatransfer.PasteType;
71
import org.openide.util.datatransfer.PasteType;
Lines 110-115 Link Here
110
     *
115
     *
111
     * @return array of actions for this node
116
     * @return array of actions for this node
112
     */
117
     */
118
    @Override
113
    protected SystemAction[] createActions () {
119
    protected SystemAction[] createActions () {
114
        return new SystemAction[] {
120
        return new SystemAction[] {
115
            SystemAction.get(EditAction.class),
121
            SystemAction.get(EditAction.class),
Lines 131-136 Link Here
131
        };
137
        };
132
    }
138
    }
133
139
140
    @Override
134
    public Action getPreferredAction() {
141
    public Action getPreferredAction() {
135
        return getActions(false)[0];
142
        return getActions(false)[0];
136
    }
143
    }
Lines 141-153 Link Here
141
     *
148
     *
142
     * @return locale part of name
149
     * @return locale part of name
143
     */
150
     */
151
    @Override
144
    public String getName() {
152
    public String getName() {
145
        String localeName = "invalid"; // NOI18N
153
        String localeName = "invalid"; // NOI18N
146
        if (getFileEntry().getFile().isValid() && !getFileEntry().getFile().isVirtual()) {
154
        if (getFileEntry().getFile().isValid() && !getFileEntry().getFile().isVirtual()) {
147
            localeName = Util.getLocaleSuffix (getFileEntry());
155
            localeName = Util.getLocaleSuffix (getFileEntry());
148
            if (localeName.length() > 0)
156
            if (localeName.length() > 0) {
149
                if (localeName.charAt(0) == PropertiesDataLoader.PRB_SEPARATOR_CHAR)
157
                if (localeName.charAt(0) == PropertiesDataLoader.PRB_SEPARATOR_CHAR) {
150
                    localeName = localeName.substring(1);
158
                    localeName = localeName.substring(1);
159
                }
160
            }
151
        }
161
        }
152
        return localeName;
162
        return localeName;
153
    }
163
    }
Lines 156-168 Link Here
156
     *
166
     *
157
     * @param name the new name
167
     * @param name the new name
158
     */
168
     */
169
    @Override
159
    public void setName (String name) {
170
    public void setName (String name) {
160
        if(!name.startsWith(getFileEntry().getDataObject().getPrimaryFile().getName())) {
171
        if(!name.startsWith(getFileEntry().getDataObject().getPrimaryFile().getName())) {
161
            name = Util.assembleName (getFileEntry().getDataObject().getPrimaryFile().getName(), name);
172
            name = Util.assembleName (getFileEntry().getDataObject().getPrimaryFile().getName(), name);
162
        }
173
        }
163
        
174
        
164
        // new name is same as old one, do nothing
175
        // new name is same as old one, do nothing
165
        if (name.equals(super.getName())) return;
176
        if (name.equals(super.getName())) {
177
            return;
178
        }
166
179
167
        super.setName (name);
180
        super.setName (name);
168
        setDisplayName(Util.getLocaleLabel(getFileEntry()));
181
        setDisplayName(Util.getLocaleLabel(getFileEntry()));
Lines 176-206 Link Here
176
    }
189
    }
177
    
190
    
178
    /** This node can be renamed. Overrides superclass method. */
191
    /** This node can be renamed. Overrides superclass method. */
192
    @Override
179
    public boolean canRename() {
193
    public boolean canRename() {
180
        return getFileEntry().isDeleteAllowed ();
194
        return getFileEntry().isDeleteAllowed ();
181
    }
195
    }
182
196
183
    /** Returns all the item in addition to "normal" cookies. Overrides superclass method. */
197
    /** Returns all the item in addition to "normal" cookies. Overrides superclass method. */
184
    @SuppressWarnings("unchecked")
198
    @SuppressWarnings("unchecked")
199
    @Override
185
    public <T extends Node.Cookie> T getCookie(Class<T> cls) {
200
    public <T extends Node.Cookie> T getCookie(Class<T> cls) {
186
        if (cls.isInstance(getFileEntry())) return (T) getFileEntry();
201
        if (cls.isInstance(getFileEntry())) {
187
        if (cls == PropertiesLocaleNode.class) return (T) this;
202
            return (T) getFileEntry();
203
        }
204
        if (cls == PropertiesLocaleNode.class) {
205
            return (T) this;
206
        }
188
        return super.getCookie(cls);
207
        return super.getCookie(cls);
189
    }
208
    }
190
209
191
    /** List new types that can be created in this node. Overrides superclass method.
210
    /** List new types that can be created in this node. Overrides superclass method.
192
     * @return new types
211
     * @return new types
193
     */
212
     */
213
    @Override
194
    public NewType[] getNewTypes () {
214
    public NewType[] getNewTypes () {
195
        return new NewType[] {
215
        return new NewType[] {
196
            new NewType() {
216
            new NewType() {
197
217
198
                /** Getter for name property. */
218
                /** Getter for name property. */
219
            @Override
199
                public String getName() {
220
                public String getName() {
200
                    return NbBundle.getBundle(PropertiesLocaleNode.class).getString("LAB_NewPropertyAction");
221
                    return NbBundle.getBundle(PropertiesLocaleNode.class).getString("LAB_NewPropertyAction");
201
                }
222
                }
202
                
223
                
203
                /** Gets help context. */ 
224
                /** Gets help context. */ 
225
            @Override
204
                public HelpCtx getHelpCtx() {
226
                public HelpCtx getHelpCtx() {
205
                    return new HelpCtx(Util.HELP_ID_ADDING);
227
                    return new HelpCtx(Util.HELP_ID_ADDING);
206
                }
228
                }
Lines 240-255 Link Here
240
262
241
    /** Indicates if this node has a customizer. Overrides superclass method. 
263
    /** Indicates if this node has a customizer. Overrides superclass method. 
242
     * @return true */
264
     * @return true */
265
    @Override
243
    public boolean hasCustomizer() {
266
    public boolean hasCustomizer() {
244
        return true;
267
        return true;
245
    }
268
    }
246
    
269
    
247
    /** Gets node customizer. Overrides superclass method. */
270
    /** Gets node customizer. Overrides superclass method. */
271
    @Override
248
    public Component getCustomizer() {
272
    public Component getCustomizer() {
249
        return new LocaleNodeCustomizer((PropertiesFileEntry)getFileEntry());
273
        return new LocaleNodeCustomizer((PropertiesFileEntry)getFileEntry());
250
    }
274
    }
251
    
275
    
252
    /** Creates paste types for this node. Overrides superclass method. */
276
    /** Creates paste types for this node. Overrides superclass method. */
277
    @Override
253
    protected void createPasteTypes(Transferable t, List<PasteType> s) {
278
    protected void createPasteTypes(Transferable t, List<PasteType> s) {
254
        super.createPasteTypes(t, s);
279
        super.createPasteTypes(t, s);
255
        Element.ItemElem item;
280
        Element.ItemElem item;
Lines 308-313 Link Here
308
333
309
        /** Gets name. 
334
        /** Gets name. 
310
         * @return human presentable name of this paste type. */
335
         * @return human presentable name of this paste type. */
336
        @Override
311
        public String getName() {
337
        public String getName() {
312
            String pasteKey = mode == 1 ? "CTL_PasteKeyValue" : "CTL_PasteKeyNoValue";
338
            String pasteKey = mode == 1 ? "CTL_PasteKeyValue" : "CTL_PasteKeyNoValue";
313
            return NbBundle.getBundle(PropertiesLocaleNode.class).getString(pasteKey);
339
            return NbBundle.getBundle(PropertiesLocaleNode.class).getString(pasteKey);
Lines 321-330 Link Here
321
        public Transferable paste() throws IOException {
347
        public Transferable paste() throws IOException {
322
            PropertiesStructure ps = ((PropertiesFileEntry)getFileEntry()).getHandler().getStructure();
348
            PropertiesStructure ps = ((PropertiesFileEntry)getFileEntry()).getHandler().getStructure();
323
            String value;
349
            String value;
324
            if (mode == MODE_PASTE_WITH_VALUE)
350
            if (mode == MODE_PASTE_WITH_VALUE) {
325
                value = item.getValue();
351
                value = item.getValue();
326
            else
352
            } else {
327
                value = "";
353
                value = "";
354
            }
328
            if (ps != null) {
355
            if (ps != null) {
329
                Element.ItemElem newItem = ps.getItem(item.getKey());
356
                Element.ItemElem newItem = ps.getItem(item.getKey());
330
                if (newItem == null) {
357
                if (newItem == null) {
Lines 334-341 Link Here
334
                    newItem.setValue(value);
361
                    newItem.setValue(value);
335
                    newItem.setComment(item.getComment());
362
                    newItem.setComment(item.getComment());
336
                }
363
                }
337
                if (node != null)
364
                if (node != null) {
338
                    node.destroy();
365
                    node.destroy();
366
                }
339
            }
367
            }
340
368
341
            return null;
369
            return null;

Return to bug 138824