rebels_mascot
asked on
Trying to understand JavaDoc and custom Doclets
Hi I've been trying to understand how JavaDocs and Custom doclets work. I want to create a doclet that will only display methods which has a custom tag, i.e. if a method has @myTag in the comments it'll display all the comments for that method whereas if it doesn't have @myTag it doesn't show any oof the comments
I created a custom taglet and specify the following command in Eclipse:
-taglet DocPackage.myTag -tagletpath 'C:\\Documents and Settings\\bbermingham\\wor kspace\\Ja vaDocTest'
But I want it to output in the standard html format. I think I'll have to completly create a new Doclet which has all the code for creating the html files, css files, etc because the Standard doc really can't be modified (I found). I'm very new to this and really I'm just looking for steps to create this custom doclet. What classes do I need to refer to, do I need to implement another class or extend from Doclet or Standard?
I hope I'm making sense.
I created a custom taglet and specify the following command in Eclipse:
-taglet DocPackage.myTag -tagletpath 'C:\\Documents and Settings\\bbermingham\\wor
But I want it to output in the standard html format. I think I'll have to completly create a new Doclet which has all the code for creating the html files, css files, etc because the Standard doc really can't be modified (I found). I'm very new to this and really I'm just looking for steps to create this custom doclet. What classes do I need to refer to, do I need to implement another class or extend from Doclet or Standard?
I hope I'm making sense.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
/*
* @(#)Standard.java 1.4 04/07/26
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tools.doclets.stan
import com.sun.javadoc.*;
import com.sun.tools.doclets.form
public class Standard {
public static final HtmlDoclet htmlDoclet = new HtmlDoclet();
public static int optionLength(String option) {
return htmlDoclet.optionLength(op
}
public static boolean start(RootDoc root) {
return htmlDoclet.start(root);
}
public static boolean validOptions(String[][] options,
DocErrorReporter reporter) {
return htmlDoclet.validOptions(op
}
public static LanguageVersion languageVersion() {
return htmlDoclet.languageVersion
}
}
I can't see how I can change this to only output methods with the @myTag taglet.