Example usage for org.eclipse.jdt.internal.compiler.impl CompilerOptions OPTION_ReportMissingJavadocTags

List of usage examples for org.eclipse.jdt.internal.compiler.impl CompilerOptions OPTION_ReportMissingJavadocTags

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.impl CompilerOptions OPTION_ReportMissingJavadocTags.

Prototype

String OPTION_ReportMissingJavadocTags

To view the source code for org.eclipse.jdt.internal.compiler.impl CompilerOptions OPTION_ReportMissingJavadocTags.

Click Source Link

Usage

From source file:dacapo.eclipse.EclipseBuildTests.java

License:Open Source License

protected static Hashtable warningOptions(int kind) {
    // Values/*from   w  ww.  j a v a 2  s.  c om*/
    Hashtable optionsMap = null;
    switch (kind) {
    case 0:
        optionsMap = JavaCore.getDefaultOptions();
        break;
    default:
        optionsMap = new Hashtable(350);
        break;
    }
    if (kind == 0) {
        // Default set since 3.1
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
    } else {
        boolean all = kind == 1;
        String generate = all ? CompilerOptions.GENERATE : CompilerOptions.DO_NOT_GENERATE;
        String warning = all ? CompilerOptions.WARNING : CompilerOptions.IGNORE;
        String enabled = all ? CompilerOptions.ENABLED : CompilerOptions.DISABLED;
        String preserve = all ? CompilerOptions.OPTIMIZE_OUT : CompilerOptions.PRESERVE;

        // Set options values
        optionsMap.put(CompilerOptions.OPTION_LocalVariableAttribute, generate);
        optionsMap.put(CompilerOptions.OPTION_LineNumberAttribute, generate);
        optionsMap.put(CompilerOptions.OPTION_SourceFileAttribute, generate);
        optionsMap.put(CompilerOptions.OPTION_PreserveUnusedLocal, preserve);
        optionsMap.put(CompilerOptions.OPTION_DocCommentSupport, enabled);
        optionsMap.put(CompilerOptions.OPTION_ReportMethodWithConstructorName, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportDeprecation, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode, enabled);
        optionsMap.put(CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod, enabled);
        optionsMap.put(CompilerOptions.OPTION_ReportHiddenCatchBlock, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedLocal, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedParameter, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedImport, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportNoEffectAssignment, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportNoImplicitStringConversion, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportNonStaticAccessToStatic, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportIndirectStaticAccess, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportIncompatibleNonInheritedInterfaceMethod, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportLocalVariableHiding, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportFieldHiding, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportEmptyStatement, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportAssertIdentifier, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnnecessaryElse, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadoc, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadocTags, enabled);
        optionsMap.put(CompilerOptions.OPTION_ReportMissingJavadocTags, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportMissingJavadocComments, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportFinallyBlockNotCompletingNormally, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, warning);
        optionsMap.put(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, warning);
        optionsMap.put(CompilerOptions.OPTION_TaskTags, all ? JavaCore.DEFAULT_TASK_TAGS : "");
        optionsMap.put(CompilerOptions.OPTION_TaskPriorities, all ? JavaCore.DEFAULT_TASK_PRIORITIES : "");
        optionsMap.put(CompilerOptions.OPTION_TaskCaseSensitive, enabled);
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedParameterWhenImplementingAbstract, enabled);
        optionsMap.put(CompilerOptions.OPTION_ReportUnusedParameterWhenOverridingConcrete, enabled);
        optionsMap.put(CompilerOptions.OPTION_ReportSpecialParameterHidingField, enabled);
        optionsMap.put(CompilerOptions.OPTION_InlineJsr, enabled);
    }

    // Ignore 3.1 options
    optionsMap.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.IGNORE);
    optionsMap.put(CompilerOptions.OPTION_ReportEnumIdentifier, CompilerOptions.IGNORE);

    // Return created options map
    return optionsMap;
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.rolesandteams.FileStructure.java

License:Open Source License

public void test1522_roleTagInJavadoc2() {
    Map customOptions = getCompilerOptions();
    // -enableJavadoc
    customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
    // -warn:+javadoc
    customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
    customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);
    // part of +javadoc but not needed:
    //       customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.ENABLED);
    //       customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.ENABLED);
    //       customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, CompilerOptions.PRIVATE);
    runTestExpectingWarnings(/*from  w w w  .  jav a2  s  . c  om*/
            new String[] { "Team1522rtij2.java",
                    "\n" + "/**\n" + "  * A team with a role file.\n" + "  * @role R1522rtij2_1\n" + "  */\n"
                            + "public team class Team1522rtij2 {\n" + "    /** @param bar a R1522rtij2_2 */\n"
                            + "    void foo(R1522rtij2_2 bar) {} // ensure it's loaded\n" + "}\n" + "    \n",
                    "Team1522rtij2/R1522rtij2_1.java",
                    "\n" + "team package Team1522rtij2;\n" + "protected class R1522rtij2_1 {}\n" + "    \n",
                    "Team1522rtij2/R1522rtij2_2.java",
                    "\n" + "team package Team1522rtij2;\n" + "protected class R1522rtij2_2 {}\n" + "    \n" },
            "----------\n" + "1. WARNING in Team1522rtij2.java (at line 6)\n"
                    + "   public team class Team1522rtij2 {\n" + "                     ^^^^^^^^^^^^^\n"
                    + "Javadoc: Missing tag for role file R1522rtij2_2 (OTJLD 1.2.5(d)).\n" + "----------\n",
            customOptions);
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.rolesandteams.FileStructure.java

License:Open Source License

public void test1522_roleTagInJavadoc3() {
    Map customOptions = getCompilerOptions();
    customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
    customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
    customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);
    runTestExpectingWarnings(/*from  www. j a va 2  s .  c  o  m*/
            new String[] { "Team1522rtij3.java",
                    "\n" + "/**\n" + "  * A team with a role file.\n"
                            + "  * @role R1522rtij3_1 this is really a role file\n"
                            + "  * @role R1522rtij3_2 this role is inline\n" + "  */\n"
                            + "public team class Team1522rtij3 {\n" + "    protected class R1522rtij3_2 {}\n"
                            + "    \n" + "    /** @param bar a R1522rtij3_2 */\n"
                            + "    void foo(R1522rtij3_2 bar) {}\n" + "}\n" + "    \n",
                    "Team1522rtij3/R1522rtij3_1.java",
                    "\n" + "team package Team1522rtij3;\n" + "protected class R1522rtij3_1 {}\n" + "    \n" },
            "----------\n" + "1. WARNING in Team1522rtij3.java (at line 5)\n"
                    + "   * @role R1522rtij3_2 this role is inline\n" + "           ^^^^^^^^^^^^\n"
                    + "Javadoc: R1522rtij3_2 is an inline role, whereas the @role tag should only be used for role files (OTJLD 1.2.5(d)).\n"
                    + "----------\n",
            customOptions);
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.rolesandteams.FileStructure.java

License:Open Source License

public void test1522_roleTagInJavadoc4() {
    Map customOptions = getCompilerOptions();
    customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
    customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
    customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);
    runTestExpectingWarnings(/*w w  w .j a  v  a2 s.c  o  m*/
            new String[] { "Team1522rtij4.java",
                    "\n" + "/**\n" + "  * A team with a role file.\n" + "  * @role R1522rtij4_1\n"
                            + "  * @role String\n" + "  */\n" + "public team class Team1522rtij4 {\n"
                            + "    protected class R1522rtij4_2 {}\n" + "\n"
                            + "    /** @param bar a R1522rtij4_2 */\n" + "    void foo(R1522rtij4_2 bar) {}\n"
                            + "}\n" + "    \n",
                    "Team1522rtij4/R1522rtij4_1.java",
                    "\n" + "team package Team1522rtij4;\n" + "protected class R1522rtij4_1 {}\n" + "    \n" },
            "----------\n" + "1. WARNING in Team1522rtij4.java (at line 5)\n" + "   * @role String\n"
                    + "           ^^^^^^\n"
                    + "Javadoc: String cannot be resolved to a role of this team (OTJLD 1.2.5(d)).\n"
                    + "----------\n",
            customOptions);
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.rolesandteams.FileStructure.java

License:Open Source License

public void test1522_roleTagInJavadoc5() {
    Map customOptions = getCompilerOptions();
    customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
    customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
    customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);
    runTestExpectingWarnings(new String[] { "Team1522rtij5.java",
            "\n" + "/**\n" + "  * A team with a role file.\n" + "  * @role\n" + "  * @role R1522rtij5_1\n"
                    + "  */\n" + "public team class Team1522rtij5 {\n" + "    protected class R1522rtij5_2 {}\n"
                    + "\n" + "    /** @param bar a R1522rtij5_2 */\n" + "    void foo(R1522rtij5_2 bar) {}\n"
                    + "}\n" + "    \n",
            "Team1522rtij5/R1522rtij5_1.java",
            "\n" + "team package Team1522rtij5;\n" + "protected class R1522rtij5_1 {}\n" + "    \n" },
            "----------\n" + "1. WARNING in Team1522rtij5.java (at line 4)\n" + "   * @role\n" + "      ^^^^\n"
                    + "Javadoc: Missing identifier\n" + "----------\n",
            customOptions);/*from  w  ww . jav  a2 s. com*/
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.rolesandteams.FileStructure.java

License:Open Source License

public void test1522_roleTagInJavadoc6() {
    Map customOptions = getCompilerOptions();
    customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
    customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
    customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);
    runTestExpectingWarnings(new String[] { "Team1522rtij6.java",
            "\n" + "/**\n" + "  * A team with a role file.\n" + "  * @role R1522rtij6_1\n" + "  * @role Wrong\n"
                    + "  */\n" + "public team class Team1522rtij6 {\n" + "    protected class R1522rtij6_2 {}\n"
                    + "\n" + "    /** @param bar a R1522rtij6_2 */\n" + "    void foo(R1522rtij6_2 bar) {}\n"
                    + "}\n" + "    \n",
            "Team1522rtij6/R1522rtij6_1.java",
            "\n" + "team package Team1522rtij6;\n" + "protected class R1522rtij6_1 {}\n" + "    \n" },
            "----------\n" + "1. WARNING in Team1522rtij6.java (at line 5)\n" + "   * @role Wrong\n"
                    + "           ^^^^^\n"
                    + "Javadoc: Wrong cannot be resolved to a role of this team (OTJLD 1.2.5(d)).\n"
                    + "----------\n",
            customOptions);/* w w  w  .  j  a v  a2 s . c  o  m*/
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.rolesandteams.FileStructure.java

License:Open Source License

public void test1522_roleTagInJavadoc7() {
    Map customOptions = getCompilerOptions();
    customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
    customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
    customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);
    runTestExpectingWarnings(//from  w w w  .j  av a  2s  .co m
            new String[] { "T1522rtij7.java",
                    "\n" + "/**\n" + "  * A class with a role file.\n" + "  * @role R1522rtij7_1\n" + "  */\n"
                            + "public class T1522rtij7 {\n" + "    protected class R1522rtij7_1 {}\n" + "\n"
                            + "    /** @param bar a R1522rtij7_1 */\n" + "    void foo(R1522rtij7_1 bar) {}\n"
                            + "}\n" + "    \n" },
            "----------\n" + "1. WARNING in T1522rtij7.java (at line 4)\n" + "   * @role R1522rtij7_1\n"
                    + "           ^^^^^^^^^^^^\n"
                    + "Javadoc: Illegal @role tag, type T1522rtij7 is not a team (OTJLD 1.2.5(d)).\n"
                    + "----------\n",
            customOptions);
}

From source file:org.eclipse.objectteams.otdt.tests.otjld.rolesandteams.FileStructure.java

License:Open Source License

public void test1526_rofiTeamExtendsNonTeam1() {
    Map customOptions = getCompilerOptions();
    customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
    customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
    customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);

    compileOrder = new String[][] { new String[] { "Team1526rtent1.java", "Team1526rtent1/Role1.java" },
            new String[] { "Team1526rtent1/Role2.java" } };
    runConformTest(new String[] { "Team1526rtent1.java", "public team class Team1526rtent1 {}\n",
            "Team1526rtent1/Role1.java", "team package Team1526rtent1;\n" + "protected class Role1 {}\n",
            "Team1526rtent1/Role2.java",
            "team package Team1526rtent1;\n" + "protected team class Role2 extends Role1 {}\n" }, "",
            null/*classLibraries*/, true/*shouldFlushOutputDirectory*/, null/*vmArguments*/, customOptions,
            null/*no custom requestor*/);
}

From source file:org.thiesen.ecj4ant.Options.java

License:Open Source License

public static Map<String, String> warnAllOptions() {
    return new HashMap<String, String>() {

        private static final long serialVersionUID = 1L;

        {//from   w ww  .ja v  a2  s.c om
            put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_SuppressWarnings, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);

            put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_SourceFileAttribute, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMethodWithConstructorName, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
                    CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportHiddenCatchBlock, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedParameter, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedParameterWhenImplementingAbstract, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedParameterWhenOverridingConcrete, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedParameterIncludeDocCommentReference,
                    CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportNoEffectAssignment, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportLocalVariableHiding, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportSpecialParameterHidingField, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportTypeParameterHiding, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportIncompatibleNonInheritedInterfaceMethod, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportNoImplicitStringConversion, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportAssertIdentifier, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportEnumIdentifier, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportNonStaticAccessToStatic, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportIndirectStaticAccess, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportEmptyStatement, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnnecessaryElse, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTags, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingJavadocTagsOverriding, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingJavadocComments, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingJavadocTagDescription, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingJavadocCommentsVisibility, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingJavadocCommentsOverriding, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportFinallyBlockNotCompletingNormally, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding,
                    CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionIncludeDocCommentReference,
                    CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable,
                    CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportFinalParameterBound, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportVarargsArgumentNeedCast, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportNullReference, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportPotentialNullReference, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportRedundantNullCheck, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportAutoboxing, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportAnnotationSuperInterface, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingDeprecatedAnnotation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportIncompleteEnumSwitch, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportForbiddenReference, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportDiscouragedReference, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnhandledWarningToken, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedLabel, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportParameterAssignment, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportFallthroughCase, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportRedundantSuperinterface, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportComparingIdentical, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportMissingHashCodeMethod, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportDeadCode, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportDeadCodeInTrivialIfStatement, CompilerOptions.WARNING);
        }

    };

}

From source file:org.thiesen.ecj4ant.Options.java

License:Open Source License

public static Map<String, String> saneOptions() {
    return new HashMap<String, String>() {

        private static final long serialVersionUID = 1L;

        {/* w  ww.j av a  2 s .  c  o m*/
            put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_SuppressWarnings, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);

            put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_SourceFileAttribute, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportMethodWithConstructorName, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
                    CompilerOptions.DISABLED);
            put(CompilerOptions.OPTION_ReportHiddenCatchBlock, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedParameter, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportUnusedParameterWhenImplementingAbstract, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_ReportUnusedParameterWhenOverridingConcrete, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_ReportUnusedParameterIncludeDocCommentReference,
                    CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportNoEffectAssignment, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportLocalVariableHiding, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportSpecialParameterHidingField, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportTypeParameterHiding, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportIncompatibleNonInheritedInterfaceMethod, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportNoImplicitStringConversion, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportAssertIdentifier, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportEnumIdentifier, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportNonStaticAccessToStatic, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportIndirectStaticAccess, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportEmptyStatement, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnnecessaryElse, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTags, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportMissingJavadocTagsOverriding, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportMissingJavadocComments, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportMissingJavadocTagDescription, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportMissingJavadocCommentsVisibility, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportMissingJavadocCommentsOverriding, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportFinallyBlockNotCompletingNormally, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding,
                    CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionIncludeDocCommentReference,
                    CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable,
                    CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.WARNING);
            put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportFinalParameterBound, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportVarargsArgumentNeedCast, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportNullReference, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportPotentialNullReference, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportRedundantNullCheck, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportAutoboxing, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportAnnotationSuperInterface, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportMissingDeprecatedAnnotation, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportIncompleteEnumSwitch, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportForbiddenReference, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportDiscouragedReference, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnhandledWarningToken, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportUnusedLabel, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportParameterAssignment, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportFallthroughCase, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation, CompilerOptions.IGNORE);
            put(CompilerOptions.OPTION_ReportRedundantSuperinterface, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportComparingIdentical, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportMissingHashCodeMethod, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportDeadCode, CompilerOptions.ERROR);
            put(CompilerOptions.OPTION_ReportDeadCodeInTrivialIfStatement, CompilerOptions.ERROR);
        }

    };

}