langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/Messager.java
changeset 28892 7e09121db885
parent 25874 83c19f00452c
equal deleted inserted replaced
28891:dc7d89f2e25c 28892:7e09121db885
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    25 
    25 
    26 package com.sun.tools.javadoc;
    26 package com.sun.tools.javadoc;
    27 
    27 
    28 import java.io.PrintWriter;
    28 import java.io.PrintWriter;
    29 import java.util.Locale;
    29 import java.util.Locale;
       
    30 import java.util.ResourceBundle;
    30 
    31 
    31 import com.sun.javadoc.*;
    32 import com.sun.javadoc.*;
    32 import com.sun.tools.javac.util.Context;
    33 import com.sun.tools.javac.util.Context;
    33 import com.sun.tools.javac.util.JCDiagnostic;
    34 import com.sun.tools.javac.util.JCDiagnostic;
    34 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
    35 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
   124                        PrintWriter errWriter,
   125                        PrintWriter errWriter,
   125                        PrintWriter warnWriter,
   126                        PrintWriter warnWriter,
   126                        PrintWriter noticeWriter) {
   127                        PrintWriter noticeWriter) {
   127         super(context, errWriter, warnWriter, noticeWriter);
   128         super(context, errWriter, warnWriter, noticeWriter);
   128         messages = JavacMessages.instance(context);
   129         messages = JavacMessages.instance(context);
   129         messages.add("com.sun.tools.javadoc.resources.javadoc");
   130         messages.add(locale -> ResourceBundle.getBundle("com.sun.tools.javadoc.resources.javadoc",
       
   131                                                          locale));
   130         javadocDiags = new JCDiagnostic.Factory(messages, "javadoc");
   132         javadocDiags = new JCDiagnostic.Factory(messages, "javadoc");
   131         this.programName = programName;
   133         this.programName = programName;
       
   134 
   132     }
   135     }
   133 
   136 
   134     public void setLocale(Locale locale) {
   137     public void setLocale(Locale locale) {
   135         this.locale = locale;
   138         this.locale = locale;
   136     }
   139     }