1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 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 |
172 */ |
172 */ |
173 protected void addIndexComment(Doc member, Tag[] firstSentenceTags, |
173 protected void addIndexComment(Doc member, Tag[] firstSentenceTags, |
174 Content tdSummary) { |
174 Content tdSummary) { |
175 Tag[] deprs = member.tags("deprecated"); |
175 Tag[] deprs = member.tags("deprecated"); |
176 Content div; |
176 Content div; |
177 if (Util.isDeprecated((ProgramElementDoc) member)) { |
177 if (utils.isDeprecated((ProgramElementDoc) member)) { |
178 Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); |
178 Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); |
179 div = HtmlTree.DIV(HtmlStyle.block, deprLabel); |
179 div = HtmlTree.DIV(HtmlStyle.block, deprLabel); |
180 div.addContent(getSpace()); |
180 div.addContent(getSpace()); |
181 if (deprs.length > 0) { |
181 if (deprs.length > 0) { |
182 addInlineDeprecatedComment(member, deprs[0], div); |
182 addInlineDeprecatedComment(member, deprs[0], div); |
183 } |
183 } |
184 tdSummary.addContent(div); |
184 tdSummary.addContent(div); |
185 return; |
185 return; |
186 } else { |
186 } else { |
187 ClassDoc cd = ((ProgramElementDoc)member).containingClass(); |
187 ClassDoc cd = ((ProgramElementDoc)member).containingClass(); |
188 if (cd != null && Util.isDeprecated(cd)) { |
188 if (cd != null && utils.isDeprecated(cd)) { |
189 Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); |
189 Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); |
190 div = HtmlTree.DIV(HtmlStyle.block, deprLabel); |
190 div = HtmlTree.DIV(HtmlStyle.block, deprLabel); |
191 div.addContent(getSpace()); |
191 div.addContent(getSpace()); |
192 tdSummary.addContent(div); |
192 tdSummary.addContent(div); |
193 } |
193 } |