src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java

changeset 995
62bc3775d5bb
parent 554
9d9f26857129
child 1357
c75be5bc5283
equal deleted inserted replaced
994:459854f564ed 995:62bc3775d5bb
1 /* 1 /*
2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2011, 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
205 205
206 /** 206 /**
207 * Should this doc element be added to the index map? 207 * Should this doc element be added to the index map?
208 */ 208 */
209 protected boolean shouldAddToIndexMap(Doc element) { 209 protected boolean shouldAddToIndexMap(Doc element) {
210 return !(noDeprecated && element.tags("deprecated").length > 0); 210 if (element instanceof PackageDoc)
211 // Do not add to index map if -nodeprecated option is set and the
212 // package is marked as deprecated.
213 return !(noDeprecated && Util.isDeprecated(element));
214 else
215 // Do not add to index map if -nodeprecated option is set and if the
216 // Doc is marked as deprecated or the containing package is marked as
217 // deprecated.
218 return !(noDeprecated &&
219 (Util.isDeprecated(element) ||
220 Util.isDeprecated(((ProgramElementDoc)element).containingPackage())));
211 } 221 }
212 222
213 /** 223 /**
214 * Return a map of all the individual member lists with Unicode character. 224 * Return a map of all the individual member lists with Unicode character.
215 * 225 *

mercurial