1
/* $Revision: 7973 $ $Author: egonw $ $Date: 2007-02-19 13:16:03 +0100 (Mon, 19 Feb 2007) $
3
* Copyright (C) 2004 Egon Willighagen <egonw@users.sf.net>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public License
7
* as published by the Free Software Foundation; either version 2.1
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
package net.sf.cdk.tools.doclets;
21
import com.sun.tools.doclets.Taglet;
22
import com.sun.javadoc.*;
26
* Taglet that expands @cdk.module tag into a weblink to the CDK
29
public class CDKModuleTaglet implements Taglet {
31
private static final String NAME = "cdk.module";
33
public String getName() {
37
public boolean inField() {
41
public boolean inConstructor() {
45
public boolean inMethod() {
49
public boolean inOverview() {
53
public boolean inPackage() {
57
public boolean inType() {
61
public boolean isInlineTag() {
65
public static void register(Map tagletMap) {
66
CDKModuleTaglet tag = new CDKModuleTaglet();
67
Taglet t = (Taglet) tagletMap.get(tag.getName());
69
tagletMap.remove(tag.getName());
71
tagletMap.put(tag.getName(), tag);
74
public String toString(Tag tag) {
75
return "<DT><B>Belongs to CDK module: </B><DD>"
76
+ "<a href=\"http://almost.cubic.uni-koeln.de/cdk/cdk_top/devel/modules/module-"
77
+ tag.text() + "/\">" + tag.text() + "</a></DD>\n";
80
public String toString(Tag[] tags) {
81
if (tags.length == 0) {
84
return toString(tags[0]);