1 /* |
1 /* |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2014, 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 |
27 |
27 |
28 import java.util.List; |
28 import java.util.List; |
29 |
29 |
30 import com.sun.javadoc.*; |
30 import com.sun.javadoc.*; |
31 import com.sun.tools.doclets.formats.html.markup.ContentBuilder; |
31 import com.sun.tools.doclets.formats.html.markup.ContentBuilder; |
32 import com.sun.tools.doclets.formats.html.markup.RawHtml; |
|
33 import com.sun.tools.doclets.formats.html.markup.StringContent; |
|
34 import com.sun.tools.doclets.internal.toolkit.*; |
32 import com.sun.tools.doclets.internal.toolkit.*; |
35 import com.sun.tools.doclets.internal.toolkit.util.*; |
33 import com.sun.tools.doclets.internal.toolkit.util.*; |
36 import com.sun.tools.doclets.internal.toolkit.util.links.*; |
34 import com.sun.tools.doclets.internal.toolkit.util.links.*; |
37 |
35 |
38 /** |
36 /** |
172 * @param classDoc the class to get the tool tip for. |
170 * @param classDoc the class to get the tool tip for. |
173 * @return the tool tip for the appropriate class. |
171 * @return the tool tip for the appropriate class. |
174 */ |
172 */ |
175 private String getClassToolTip(ClassDoc classDoc, boolean isTypeLink) { |
173 private String getClassToolTip(ClassDoc classDoc, boolean isTypeLink) { |
176 Configuration configuration = m_writer.configuration; |
174 Configuration configuration = m_writer.configuration; |
|
175 Utils utils = configuration.utils; |
177 if (isTypeLink) { |
176 if (isTypeLink) { |
178 return configuration.getText("doclet.Href_Type_Param_Title", |
177 return configuration.getText("doclet.Href_Type_Param_Title", |
179 classDoc.name()); |
178 classDoc.name()); |
180 } else if (classDoc.isInterface()){ |
179 } else if (classDoc.isInterface()){ |
181 return configuration.getText("doclet.Href_Interface_Title", |
180 return configuration.getText("doclet.Href_Interface_Title", |
182 Util.getPackageName(classDoc.containingPackage())); |
181 utils.getPackageName(classDoc.containingPackage())); |
183 } else if (classDoc.isAnnotationType()) { |
182 } else if (classDoc.isAnnotationType()) { |
184 return configuration.getText("doclet.Href_Annotation_Title", |
183 return configuration.getText("doclet.Href_Annotation_Title", |
185 Util.getPackageName(classDoc.containingPackage())); |
184 utils.getPackageName(classDoc.containingPackage())); |
186 } else if (classDoc.isEnum()) { |
185 } else if (classDoc.isEnum()) { |
187 return configuration.getText("doclet.Href_Enum_Title", |
186 return configuration.getText("doclet.Href_Enum_Title", |
188 Util.getPackageName(classDoc.containingPackage())); |
187 utils.getPackageName(classDoc.containingPackage())); |
189 } else { |
188 } else { |
190 return configuration.getText("doclet.Href_Class_Title", |
189 return configuration.getText("doclet.Href_Class_Title", |
191 Util.getPackageName(classDoc.containingPackage())); |
190 utils.getPackageName(classDoc.containingPackage())); |
192 } |
191 } |
193 } |
192 } |
194 |
193 |
195 /** |
194 /** |
196 * Return path to the given file name in the given package. So if the name |
195 * Return path to the given file name in the given package. So if the name |