Lines 422-428
Link Here
|
422 |
} |
422 |
} |
423 |
} |
423 |
} |
424 |
} |
424 |
} |
425 |
|
|
|
426 |
/** |
425 |
/** |
427 |
* @param e the given exception to log |
426 |
* @param e the given exception to log |
428 |
*/ |
427 |
*/ |
Lines 464-508
Link Here
|
464 |
} |
463 |
} |
465 |
} |
464 |
} |
466 |
|
465 |
|
467 |
/** |
|
|
468 |
* @param wrongClasspath |
469 |
* the given wrong classpath entry |
470 |
*/ |
471 |
public void logIncorrectClasspath(String wrongClasspath) { |
472 |
if ((this.tagBits & Logger.XML) != 0) { |
473 |
this.parameters.put(Logger.MESSAGE, this.main.bind("configure.incorrectClasspath", wrongClasspath)); //$NON-NLS-1$ |
474 |
this.printTag(Logger.ERROR_TAG, this.parameters, true, true); |
475 |
} |
476 |
this.printlnErr(this.main.bind( |
477 |
"configure.incorrectClasspath", wrongClasspath)); //$NON-NLS-1$ |
478 |
} |
479 |
|
480 |
/** |
481 |
* @param wrongPath |
482 |
* the given wrong path entry |
483 |
*/ |
484 |
public void logIncorrectEndorsedDirsEntry(String wrongPath) { |
485 |
if ((this.tagBits & Logger.XML) != 0) { |
486 |
this.parameters.put(Logger.MESSAGE, this.main.bind("configure.incorrectEndorsedDirsEntry", wrongPath)); //$NON-NLS-1$ |
487 |
this.printTag(Logger.ERROR_TAG, this.parameters, true, true); |
488 |
} |
489 |
this.printlnErr(this.main.bind( |
490 |
"configure.incorrectEndorsedDirsEntry", wrongPath)); //$NON-NLS-1$ |
491 |
} |
492 |
|
493 |
/** |
494 |
* @param wrongPath |
495 |
* the given wrong path entry |
496 |
*/ |
497 |
public void logIncorrectExtDirsEntry(String wrongPath) { |
498 |
if ((this.tagBits & Logger.XML) != 0) { |
499 |
this.parameters.put(Logger.MESSAGE, this.main.bind("configure.incorrectExtDirsEntry", wrongPath)); //$NON-NLS-1$ |
500 |
this.printTag(Logger.ERROR_TAG, this.parameters, true, true); |
501 |
} |
502 |
this.printlnErr(this.main.bind( |
503 |
"configure.incorrectExtDirsEntry", wrongPath)); //$NON-NLS-1$ |
504 |
} |
505 |
|
506 |
public void logIncorrectVMVersionForAnnotationProcessing() { |
466 |
public void logIncorrectVMVersionForAnnotationProcessing() { |
507 |
if ((this.tagBits & Logger.XML) != 0) { |
467 |
if ((this.tagBits & Logger.XML) != 0) { |
508 |
this.parameters.put(Logger.MESSAGE, this.main.bind("configure.incorrectVMVersionforAPT")); //$NON-NLS-1$ |
468 |
this.parameters.put(Logger.MESSAGE, this.main.bind("configure.incorrectVMVersionforAPT")); //$NON-NLS-1$ |
Lines 532-545
Link Here
|
532 |
})); |
492 |
})); |
533 |
} |
493 |
} |
534 |
|
494 |
|
535 |
public void logNoClasspath() { |
|
|
536 |
if ((this.tagBits & Logger.XML) != 0) { |
537 |
this.parameters.put(Logger.MESSAGE, this.main.bind("configure.noClasspath")); //$NON-NLS-1$ |
538 |
this.printTag(Logger.ERROR_TAG, this.parameters, true, true); |
539 |
} |
540 |
this.printlnErr(this.main.bind("configure.noClasspath")); //$NON-NLS-1$ |
541 |
} |
542 |
|
543 |
/** |
495 |
/** |
544 |
* @param exportedClassFilesCounter |
496 |
* @param exportedClassFilesCounter |
545 |
*/ |
497 |
*/ |
Lines 582-587
Link Here
|
582 |
} |
534 |
} |
583 |
} |
535 |
} |
584 |
|
536 |
|
|
|
537 |
/** |
538 |
* @param error the given error |
539 |
*/ |
540 |
public void logPendingError(String error) { |
541 |
if ((this.tagBits & Logger.XML) != 0) { |
542 |
this.parameters.put(Logger.MESSAGE, error); |
543 |
this.printTag(Logger.ERROR_TAG, this.parameters, true, true); |
544 |
} |
545 |
this.printlnErr(error); |
546 |
} |
547 |
|
585 |
private void logProblem(CategorizedProblem problem, int localErrorCount, |
548 |
private void logProblem(CategorizedProblem problem, int localErrorCount, |
586 |
int globalErrorCount, char[] unitSource) { |
549 |
int globalErrorCount, char[] unitSource) { |
587 |
if ((this.tagBits & Logger.EMACS) != 0) { |
550 |
if ((this.tagBits & Logger.EMACS) != 0) { |
Lines 1354-1360
Link Here
|
1354 |
public String log; |
1317 |
public String log; |
1355 |
public Logger logger; |
1318 |
public Logger logger; |
1356 |
public int maxProblems; |
1319 |
public int maxProblems; |
1357 |
public boolean noWarn = false; |
|
|
1358 |
public Map options; |
1320 |
public Map options; |
1359 |
protected PrintWriter out; |
1321 |
protected PrintWriter out; |
1360 |
public boolean proceed = true; |
1322 |
public boolean proceed = true; |
Lines 1364-1369
Link Here
|
1364 |
|
1326 |
|
1365 |
public boolean showProgress = false; |
1327 |
public boolean showProgress = false; |
1366 |
public long startTime; |
1328 |
public long startTime; |
|
|
1329 |
public ArrayList pendingErrors; |
1367 |
|
1330 |
|
1368 |
public boolean systemExitWhenFinished = true; |
1331 |
public boolean systemExitWhenFinished = true; |
1369 |
|
1332 |
|
Lines 1457-1463
Link Here
|
1457 |
} else { |
1420 |
} else { |
1458 |
if (currentClasspathName.length() != 0) { |
1421 |
if (currentClasspathName.length() != 0) { |
1459 |
// we go on anyway |
1422 |
// we go on anyway |
1460 |
this.logger.logIncorrectClasspath(currentClasspathName); |
1423 |
addPendingErrors(this.bind("configure.incorrectClasspath", currentClasspathName));//$NON-NLS-1$ |
1461 |
} |
1424 |
} |
1462 |
return; |
1425 |
return; |
1463 |
} |
1426 |
} |
Lines 1482-1490
Link Here
|
1482 |
paths.add(currentClasspath); |
1445 |
paths.add(currentClasspath); |
1483 |
} else if (currentClasspathName.length() != 0) { |
1446 |
} else if (currentClasspathName.length() != 0) { |
1484 |
// we go on anyway |
1447 |
// we go on anyway |
1485 |
this.logger.logIncorrectClasspath(currentClasspathName); |
1448 |
addPendingErrors(this.bind("configure.incorrectClasspath", currentClasspathName));//$NON-NLS-1$ |
1486 |
} |
1449 |
} |
1487 |
} |
1450 |
} |
|
|
1451 |
private void addPendingErrors(String message) { |
1452 |
if (this.pendingErrors == null) { |
1453 |
this.pendingErrors = new ArrayList(); |
1454 |
} |
1455 |
this.pendingErrors.add(message); |
1456 |
} |
1488 |
/* |
1457 |
/* |
1489 |
* Lookup the message with the given ID in this catalog |
1458 |
* Lookup the message with the given ID in this catalog |
1490 |
*/ |
1459 |
*/ |
Lines 1993-1999
Link Here
|
1993 |
CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation, |
1962 |
CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation, |
1994 |
isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); |
1963 |
isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); |
1995 |
} else { |
1964 |
} else { |
1996 |
throw new InvalidInputException(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$ |
1965 |
addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$ |
1997 |
} |
1966 |
} |
1998 |
} |
1967 |
} |
1999 |
/* |
1968 |
/* |
Lines 2100-2106
Link Here
|
2100 |
classpaths = new ArrayList(DEFAULT_SIZE_CLASSPATH); |
2069 |
classpaths = new ArrayList(DEFAULT_SIZE_CLASSPATH); |
2101 |
String classProp = System.getProperty("java.class.path"); //$NON-NLS-1$ |
2070 |
String classProp = System.getProperty("java.class.path"); //$NON-NLS-1$ |
2102 |
if ((classProp == null) || (classProp.length() == 0)) { |
2071 |
if ((classProp == null) || (classProp.length() == 0)) { |
2103 |
this.logger.logNoClasspath(); |
2072 |
addPendingErrors(this.bind("configure.noClasspath")); //$NON-NLS-1$ |
2104 |
final Classpath classpath = FileSystem.getClasspath(System.getProperty("user.dir"), customEncoding, null);//$NON-NLS-1$ |
2073 |
final Classpath classpath = FileSystem.getClasspath(System.getProperty("user.dir"), customEncoding, null);//$NON-NLS-1$ |
2105 |
if (classpath != null) { |
2074 |
if (classpath != null) { |
2106 |
classpaths.add(classpath); |
2075 |
classpaths.add(classpath); |
Lines 2115-2121
Link Here
|
2115 |
if (currentClasspath != null) { |
2084 |
if (currentClasspath != null) { |
2116 |
classpaths.add(currentClasspath); |
2085 |
classpaths.add(currentClasspath); |
2117 |
} else if (token.length() != 0) { |
2086 |
} else if (token.length() != 0) { |
2118 |
this.logger.logIncorrectClasspath(token); |
2087 |
addPendingErrors(this.bind("configure.incorrectClasspath", token));//$NON-NLS-1$ |
2119 |
} |
2088 |
} |
2120 |
} |
2089 |
} |
2121 |
} |
2090 |
} |
Lines 2171-2177
Link Here
|
2171 |
} |
2140 |
} |
2172 |
} |
2141 |
} |
2173 |
} else if (directoriesToCheck[i].isFile()) { |
2142 |
} else if (directoriesToCheck[i].isFile()) { |
2174 |
this.logger.logIncorrectExtDirsEntry(directoriesToCheck[i].getAbsolutePath()); |
2143 |
addPendingErrors(this.bind( |
|
|
2144 |
"configure.incorrectExtDirsEntry", //$NON-NLS-1$ |
2145 |
directoriesToCheck[i].getAbsolutePath())); |
2175 |
} |
2146 |
} |
2176 |
} |
2147 |
} |
2177 |
} |
2148 |
} |
Lines 2229-2235
Link Here
|
2229 |
} |
2200 |
} |
2230 |
} |
2201 |
} |
2231 |
} else if (directoriesToCheck[i].isFile()) { |
2202 |
} else if (directoriesToCheck[i].isFile()) { |
2232 |
this.logger.logIncorrectEndorsedDirsEntry(directoriesToCheck[i].getAbsolutePath()); |
2203 |
addPendingErrors( |
|
|
2204 |
this.bind( |
2205 |
"configure.incorrectEndorsedDirsEntry", //$NON-NLS-1$ |
2206 |
directoriesToCheck[i].getAbsolutePath())); |
2233 |
} |
2207 |
} |
2234 |
} |
2208 |
} |
2235 |
} |
2209 |
} |
Lines 2739-2749
Link Here
|
2739 |
while (tokenizer.hasMoreTokens()) { |
2713 |
while (tokenizer.hasMoreTokens()) { |
2740 |
String token = tokenizer.nextToken(); |
2714 |
String token = tokenizer.nextToken(); |
2741 |
tokenCounter++; |
2715 |
tokenCounter++; |
|
|
2716 |
switch(token.charAt(0)) { |
2717 |
case '+' : |
2718 |
isEnabling = true; |
2719 |
token = token.substring(1); |
2720 |
break; |
2721 |
case '-' : |
2722 |
isEnabling = false; |
2723 |
token = token.substring(1); |
2724 |
break; |
2725 |
} |
2742 |
handleWarningToken(token, isEnabling, useEnableJavadoc); |
2726 |
handleWarningToken(token, isEnabling, useEnableJavadoc); |
2743 |
} |
2727 |
} |
2744 |
if (tokenCounter == 0) |
2728 |
if (tokenCounter == 0) { |
2745 |
throw new InvalidInputException( |
2729 |
throw new InvalidInputException( |
2746 |
this.bind("configure.invalidWarningOption", currentArg)); //$NON-NLS-1$ |
2730 |
this.bind("configure.invalidWarningOption", currentArg)); //$NON-NLS-1$ |
|
|
2731 |
} |
2747 |
didSpecifyWarnings = true; |
2732 |
didSpecifyWarnings = true; |
2748 |
continue; |
2733 |
continue; |
2749 |
} |
2734 |
} |
Lines 3098-3103
Link Here
|
3098 |
|
3083 |
|
3099 |
this.logger.logCommandLineArguments(newCommandLineArgs); |
3084 |
this.logger.logCommandLineArguments(newCommandLineArgs); |
3100 |
this.logger.logOptions(this.options); |
3085 |
this.logger.logOptions(this.options); |
|
|
3086 |
|
3101 |
if (this.repetitions == 0) { |
3087 |
if (this.repetitions == 0) { |
3102 |
this.repetitions = 1; |
3088 |
this.repetitions = 1; |
3103 |
} |
3089 |
} |
Lines 3131-3136
Link Here
|
3131 |
extdirsClasspaths, |
3117 |
extdirsClasspaths, |
3132 |
endorsedDirClasspaths, |
3118 |
endorsedDirClasspaths, |
3133 |
customEncoding); |
3119 |
customEncoding); |
|
|
3120 |
|
3121 |
if (this.pendingErrors != null) { |
3122 |
for (Iterator iterator = this.pendingErrors.iterator(); iterator.hasNext(); ) { |
3123 |
String message = (String) iterator.next(); |
3124 |
this.logger.logPendingError(message); |
3125 |
} |
3126 |
this.pendingErrors = null; |
3127 |
} |
3134 |
} |
3128 |
} |
3135 |
|
3129 |
|
3136 |
protected void disableWarnings() { |
3130 |
protected void disableWarnings() { |
Lines 3665-3671
Link Here
|
3665 |
default : |
3659 |
default : |
3666 |
// we go on anyway |
3660 |
// we go on anyway |
3667 |
if (currentPath.length() != 0) { |
3661 |
if (currentPath.length() != 0) { |
3668 |
this.logger.logIncorrectClasspath(currentPath); |
3662 |
addPendingErrors(this.bind("configure.incorrectClasspath", currentPath));//$NON-NLS-1$ |
3669 |
} |
3663 |
} |
3670 |
} |
3664 |
} |
3671 |
} |
3665 |
} |