langtools/src/share/classes/com/sun/tools/javac/util/Log.java
changeset 3660 ee583c342a41
parent 2212 1d3dc0e0ba0c
child 3995 73af8b6fb8bc
equal deleted inserted replaced
3659:7c9f033e5232 3660:ee583c342a41
    76 
    76 
    77     /** Switch: emit warning messages.
    77     /** Switch: emit warning messages.
    78      */
    78      */
    79     public boolean emitWarnings;
    79     public boolean emitWarnings;
    80 
    80 
       
    81     /** Switch: suppress note messages.
       
    82      */
       
    83     public boolean suppressNotes;
       
    84 
    81     /** Print stack trace on errors?
    85     /** Print stack trace on errors?
    82      */
    86      */
    83     public boolean dumpOnError;
    87     public boolean dumpOnError;
    84 
    88 
    85     /** Print multiple errors for same source locations.
    89     /** Print multiple errors for same source locations.
   119 
   123 
   120         Options options = Options.instance(context);
   124         Options options = Options.instance(context);
   121         this.dumpOnError = options.get("-doe") != null;
   125         this.dumpOnError = options.get("-doe") != null;
   122         this.promptOnError = options.get("-prompt") != null;
   126         this.promptOnError = options.get("-prompt") != null;
   123         this.emitWarnings = options.get("-Xlint:none") == null;
   127         this.emitWarnings = options.get("-Xlint:none") == null;
       
   128         this.suppressNotes = options.get("suppressNotes") != null;
   124         this.MaxErrors = getIntOption(options, "-Xmaxerrs", 100);
   129         this.MaxErrors = getIntOption(options, "-Xmaxerrs", 100);
   125         this.MaxWarnings = getIntOption(options, "-Xmaxwarns", 100);
   130         this.MaxWarnings = getIntOption(options, "-Xmaxwarns", 100);
   126 
   131 
   127         boolean rawDiagnostics = options.get("rawDiagnostics") != null;
   132         boolean rawDiagnostics = options.get("rawDiagnostics") != null;
   128         messages = JavacMessages.instance(context);
   133         messages = JavacMessages.instance(context);
   322 
   327 
   323         case NOTE:
   328         case NOTE:
   324             // Print out notes only when we are permitted to report warnings
   329             // Print out notes only when we are permitted to report warnings
   325             // Notes are only generated at the end of a compilation, so should be small
   330             // Notes are only generated at the end of a compilation, so should be small
   326             // in number.
   331             // in number.
   327             if (emitWarnings || diagnostic.isMandatory()) {
   332             if ((emitWarnings || diagnostic.isMandatory()) && !suppressNotes) {
   328                 writeDiagnostic(diagnostic);
   333                 writeDiagnostic(diagnostic);
   329             }
   334             }
   330             break;
   335             break;
   331 
   336 
   332         case WARNING:
   337         case WARNING: