|
Lines 3446-3452
Link Here
|
| 3446 |
CompilerOptions.OPTION_IncludeNullInfoFromAsserts, |
3446 |
CompilerOptions.OPTION_IncludeNullInfoFromAsserts, |
| 3447 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
3447 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3448 |
return; |
3448 |
return; |
| 3449 |
} |
3449 |
} else if (token.equals("invalidJavadoc")) { //$NON-NLS-1$ |
|
|
3450 |
setSeverity(CompilerOptions.OPTION_ReportInvalidJavadoc, severity, isEnabling); |
| 3451 |
this.options.put( |
| 3452 |
CompilerOptions.OPTION_ReportInvalidJavadocTags, |
| 3453 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3454 |
this.options.put( |
| 3455 |
CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, |
| 3456 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3457 |
this.options.put( |
| 3458 |
CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, |
| 3459 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3460 |
if (isEnabling) { |
| 3461 |
this.options.put( |
| 3462 |
CompilerOptions.OPTION_DocCommentSupport, |
| 3463 |
CompilerOptions.ENABLED); |
| 3464 |
this.options.put( |
| 3465 |
CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, |
| 3466 |
CompilerOptions.PRIVATE); |
| 3467 |
} |
| 3468 |
return; |
| 3469 |
} else if (token.equals("invalidJavadocTag")) { //$NON-NLS-1$ |
| 3470 |
this.options.put( |
| 3471 |
CompilerOptions.OPTION_ReportInvalidJavadocTags, |
| 3472 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3473 |
return; |
| 3474 |
} else if (token.equals("invalidJavadocTagDep")) { //$NON-NLS-1$ |
| 3475 |
this.options.put( |
| 3476 |
CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, |
| 3477 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3478 |
return; |
| 3479 |
} else if (token.equals("invalidJavadocTagNotVisible")) { //$NON-NLS-1$ |
| 3480 |
this.options.put( |
| 3481 |
CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, |
| 3482 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3483 |
return; |
| 3484 |
} else if (token.startsWith("invalidJavadocTagVisibility")) { //$NON-NLS-1$ |
| 3485 |
int start = token.indexOf('('); |
| 3486 |
int end = token.indexOf(')'); |
| 3487 |
String visibility = null; |
| 3488 |
if (isEnabling && start >= 0 && end >= 0 && start < end){ |
| 3489 |
visibility = token.substring(start+1, end).trim(); |
| 3490 |
} |
| 3491 |
if (visibility != null && visibility.equals(CompilerOptions.PUBLIC) |
| 3492 |
|| visibility.equals(CompilerOptions.PRIVATE) |
| 3493 |
|| visibility.equals(CompilerOptions.PROTECTED) |
| 3494 |
|| visibility.equals(CompilerOptions.DEFAULT)) { |
| 3495 |
this.options.put( |
| 3496 |
CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, |
| 3497 |
visibility); |
| 3498 |
return; |
| 3499 |
} else { |
| 3500 |
throw new IllegalArgumentException(this.bind("configure.invalidJavadocTagVisibility", token)); //$NON-NLS-1$ |
| 3501 |
} |
| 3502 |
} |
| 3450 |
break; |
3503 |
break; |
| 3451 |
case 'j' : |
3504 |
case 'j' : |
| 3452 |
if (token.equals("javadoc")) {//$NON-NLS-1$ |
3505 |
if (token.equals("javadoc")) {//$NON-NLS-1$ |
|
Lines 3466-3471
Link Here
|
| 3466 |
if (token.equals("maskedCatchBlock") || token.equals("maskedCatchBlocks")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$ |
3519 |
if (token.equals("maskedCatchBlock") || token.equals("maskedCatchBlocks")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$ |
| 3467 |
setSeverity(CompilerOptions.OPTION_ReportHiddenCatchBlock, severity, isEnabling); |
3520 |
setSeverity(CompilerOptions.OPTION_ReportHiddenCatchBlock, severity, isEnabling); |
| 3468 |
return; |
3521 |
return; |
|
|
3522 |
} else if (token.equals("missingJavadocTags")) { //$NON-NLS-1$ |
| 3523 |
setSeverity(CompilerOptions.OPTION_ReportMissingJavadocTags, severity, isEnabling); |
| 3524 |
this.options.put( |
| 3525 |
CompilerOptions.OPTION_ReportMissingJavadocTagsOverriding, |
| 3526 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3527 |
this.options.put( |
| 3528 |
CompilerOptions.OPTION_ReportMissingJavadocTagsMethodTypeParameters, |
| 3529 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3530 |
if (isEnabling) { |
| 3531 |
this.options.put( |
| 3532 |
CompilerOptions.OPTION_DocCommentSupport, |
| 3533 |
CompilerOptions.ENABLED); |
| 3534 |
this.options.put( |
| 3535 |
CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, |
| 3536 |
CompilerOptions.PRIVATE); |
| 3537 |
} |
| 3538 |
return; |
| 3539 |
} else if (token.equals("missingJavadocTagsOverriding")) { //$NON-NLS-1$ |
| 3540 |
this.options.put( |
| 3541 |
CompilerOptions.OPTION_ReportMissingJavadocTagsOverriding, |
| 3542 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3543 |
return; |
| 3544 |
} else if (token.equals("missingJavadocTagsMethod")) { //$NON-NLS-1$ |
| 3545 |
this.options.put( |
| 3546 |
CompilerOptions.OPTION_ReportMissingJavadocTagsMethodTypeParameters, |
| 3547 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3548 |
return; |
| 3549 |
} else if (token.startsWith("missingJavadocTagsVisibility")) { //$NON-NLS-1$ |
| 3550 |
int start = token.indexOf('('); |
| 3551 |
int end = token.indexOf(')'); |
| 3552 |
String visibility = null; |
| 3553 |
if (isEnabling && start >= 0 && end >= 0 && start < end){ |
| 3554 |
visibility = token.substring(start+1, end).trim(); |
| 3555 |
} |
| 3556 |
if (visibility != null && visibility.equals(CompilerOptions.PUBLIC) |
| 3557 |
|| visibility.equals(CompilerOptions.PRIVATE) |
| 3558 |
|| visibility.equals(CompilerOptions.PROTECTED) |
| 3559 |
|| visibility.equals(CompilerOptions.DEFAULT)) { |
| 3560 |
this.options.put( |
| 3561 |
CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, |
| 3562 |
visibility); |
| 3563 |
return; |
| 3564 |
} else { |
| 3565 |
throw new IllegalArgumentException(this.bind("configure.missingJavadocTagsVisibility", token)); //$NON-NLS-1$ |
| 3566 |
} |
| 3567 |
} else if (token.equals("missingJavadocComments")) { //$NON-NLS-1$ |
| 3568 |
setSeverity(CompilerOptions.OPTION_ReportMissingJavadocComments, severity, isEnabling); |
| 3569 |
this.options.put( |
| 3570 |
CompilerOptions.OPTION_ReportMissingJavadocCommentsOverriding, |
| 3571 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3572 |
if (isEnabling) { |
| 3573 |
this.options.put( |
| 3574 |
CompilerOptions.OPTION_DocCommentSupport, |
| 3575 |
CompilerOptions.ENABLED); |
| 3576 |
this.options.put( |
| 3577 |
CompilerOptions.OPTION_ReportMissingJavadocCommentsVisibility, |
| 3578 |
CompilerOptions.PRIVATE); |
| 3579 |
} |
| 3580 |
return; |
| 3581 |
} else if (token.equals("missingJavadocCommentsOverriding")) { //$NON-NLS-1$ |
| 3582 |
setSeverity(CompilerOptions.OPTION_ReportMissingJavadocComments, severity, isEnabling); |
| 3583 |
this.options.put( |
| 3584 |
CompilerOptions.OPTION_ReportMissingJavadocCommentsOverriding, |
| 3585 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3586 |
return; |
| 3587 |
} else if (token.startsWith("missingJavadocCommentsVisibility")) { //$NON-NLS-1$ |
| 3588 |
int start = token.indexOf('('); |
| 3589 |
int end = token.indexOf(')'); |
| 3590 |
String visibility = null; |
| 3591 |
if (isEnabling && start >= 0 && end >= 0 && start < end){ |
| 3592 |
visibility = token.substring(start+1, end).trim(); |
| 3593 |
} |
| 3594 |
if (visibility != null && visibility.equals(CompilerOptions.PUBLIC) |
| 3595 |
|| visibility.equals(CompilerOptions.PRIVATE) |
| 3596 |
|| visibility.equals(CompilerOptions.PROTECTED) |
| 3597 |
|| visibility.equals(CompilerOptions.DEFAULT)) { |
| 3598 |
this.options.put( |
| 3599 |
CompilerOptions.OPTION_ReportMissingJavadocCommentsVisibility, |
| 3600 |
visibility); |
| 3601 |
return; |
| 3602 |
} else { |
| 3603 |
throw new IllegalArgumentException(this.bind("configure.missingJavadocCommentsVisibility", token)); //$NON-NLS-1$ |
| 3604 |
} |
| 3469 |
} |
3605 |
} |
| 3470 |
break; |
3606 |
break; |
| 3471 |
case 'n' : |
3607 |
case 'n' : |
|
Lines 3666-3671
Link Here
|
| 3666 |
} else if (token.equals("unusedThrown")) { //$NON-NLS-1$ |
3802 |
} else if (token.equals("unusedThrown")) { //$NON-NLS-1$ |
| 3667 |
setSeverity(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, severity, isEnabling); |
3803 |
setSeverity(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, severity, isEnabling); |
| 3668 |
return; |
3804 |
return; |
|
|
3805 |
} else if (token.equals("unusedThrownWhenOverriding")) { //$NON-NLS-1$ |
| 3806 |
this.options.put( |
| 3807 |
CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding, |
| 3808 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3809 |
return; |
| 3810 |
} else if (token.equals("unusedThrownIncludeDocComment")) { //$NON-NLS-1$ |
| 3811 |
this.options.put( |
| 3812 |
CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionIncludeDocCommentReference, |
| 3813 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3814 |
return; |
| 3815 |
} else if (token.equals("unusedThrownExemptExceptionThrowable")) { //$NON-NLS-1$ |
| 3816 |
this.options.put( |
| 3817 |
CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable, |
| 3818 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3819 |
return; |
| 3669 |
} else if (token.equals("unqualifiedField") || token.equals("unqualified-field-access")) { //$NON-NLS-1$ //$NON-NLS-2$ |
3820 |
} else if (token.equals("unqualifiedField") || token.equals("unqualified-field-access")) { //$NON-NLS-1$ //$NON-NLS-2$ |
| 3670 |
setSeverity(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, severity, isEnabling); |
3821 |
setSeverity(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, severity, isEnabling); |
| 3671 |
return; |
3822 |
return; |
|
Lines 3679-3685
Link Here
|
| 3679 |
setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling); |
3830 |
setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling); |
| 3680 |
setSeverity(CompilerOptions.OPTION_ReportRedundantSpecificationOfTypeArguments, severity, isEnabling); |
3831 |
setSeverity(CompilerOptions.OPTION_ReportRedundantSpecificationOfTypeArguments, severity, isEnabling); |
| 3681 |
return; |
3832 |
return; |
| 3682 |
} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$ |
3833 |
} else if (token.equals("unusedParam")) { //$NON-NLS-1$ |
|
|
3834 |
setSeverity(CompilerOptions.OPTION_ReportUnusedParameter, severity, isEnabling); |
| 3835 |
return; |
| 3836 |
} else if (token.equals("unusedParamIncludeDoc")) { //$NON-NLS-1$ |
| 3837 |
this.options.put( |
| 3838 |
CompilerOptions.OPTION_ReportUnusedParameterIncludeDocCommentReference, |
| 3839 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3840 |
return; |
| 3841 |
} else if (token.equals("unusedParamOverriding")) { //$NON-NLS-1$ |
| 3842 |
this.options.put( |
| 3843 |
CompilerOptions.OPTION_ReportUnusedParameterWhenOverridingConcrete, |
| 3844 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3845 |
return; |
| 3846 |
} else if (token.equals("unusedParamImplementing")) { //$NON-NLS-1$ |
| 3847 |
this.options.put( |
| 3848 |
CompilerOptions.OPTION_ReportUnusedParameterWhenImplementingAbstract, |
| 3849 |
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); |
| 3850 |
return; |
| 3851 |
} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$ |
| 3683 |
setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling); |
3852 |
setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling); |
| 3684 |
setSeverity(CompilerOptions.OPTION_ReportRedundantSpecificationOfTypeArguments, severity, isEnabling); |
3853 |
setSeverity(CompilerOptions.OPTION_ReportRedundantSpecificationOfTypeArguments, severity, isEnabling); |
| 3685 |
return; |
3854 |
return; |