mil.dod.th.word.htm.doclet/src/org/udri/doclet/msword/MSHTMLDoclet.java
public static boolean start(RootDoc root) {
        // Create the MS Word compatible *.htm file
        try {
            // Initialize writer and write out beginning HTML and CSS from
            // template
            _msHTM = new PrintWriter(new File(_options.getFilename()));

            if (_options.getInputFile() == null) {
                throw new FileNotFoundException(
                        "Could not find input file param.  Please add -inputFile param to Javadoc task.");
            }
            File inputFile = new File(_options.getInputFile());
            BufferedReader br = new BufferedReader(new FileReader(inputFile));
            String line;
            while ((line = br.readLine()) != null) {
                if (line.contains(TH_MARKER_START)) {
                    break;
                }

                _msHTM.println(line);
            }
            _msHTM.flush();

            // Continue to read the existing API until we get to the end of the
            // API Section
            while ((line = br.readLine()) != null) {
                if (line.contains(TH_MARKER_END)) {
                    break;
                }
            }

            // Now write out new API
            startClassDocs(root);

            // Look for XSD
            while ((line = br.readLine()) != null) {
                if (line.contains(XSDAppender.TH_XSD_MARKER_START)) {
                    break;
                }

                _msHTM.println(line);
            }

            // Continue to read the existing API until we get to the end of the
            // XSD section
            while ((line = br.readLine()) != null) {
                if (line.contains(XSDAppender.TH_XSD_MARKER_END)) {
                    break;
                }
            }

            // write XSDs
            if (_options.getXsdDirectory() != null) {
                File resourcesDir = new File(_options.getXsdDirectory());
                XSDAppender xsd = new XSDAppender(_msHTM);
                xsd.writeXSDs(resourcesDir);
            }

            // Finish writing wrapper HTML
            while ((line = br.readLine()) != null) {
                _msHTM.println(line);
            }
            _msHTM.flush();

            br.close();
            _msHTM.close();

            //Report broken links within the API
            runLinkReport();

        } catch (Throwable t) {
            t.printStackTrace();

            if (_msHTM != null) {
                _msHTM.close();
            }

            return false;
        }

        return true;
    }
/**
     * Starting point for the JavaDoc documentation process.
     * 
     * @see com.sun.javadoc.Doclet#start(RootDoc)
     * 
     * @param root
     *            The root of the documentation tree.
     * 
     * @return <code>true</code> if success
     */
Starting point for the JavaDoc documentation process.



@param root
The root of the documentation tree.

@return true if success
Starting point for the JavaDoc documentation process . @param root The root of the documentation tree . @return true if success
public static boolean start(RootDoc root) {
        try {
            _msHTM = new PrintWriter(new File(_options.getFilename()));
            if (_options.getInputFile() == null) {
                throw new FileNotFoundException(
                        "Could not find input file param.  Please add -inputFile param to Javadoc task.");
            }
            File inputFile = new File(_options.getInputFile());
            BufferedReader br = new BufferedReader(new FileReader(inputFile));
            String line;
            while ((line = br.readLine()) != null) {
                if (line.contains(TH_MARKER_START)) {
                    break;
                }
                _msHTM.println(line);
            }
            _msHTM.flush();
            while ((line = br.readLine()) != null) {
                if (line.contains(TH_MARKER_END)) {
                    break;
                }
            }
            startClassDocs(root);
            while ((line = br.readLine()) != null) {
                if (line.contains(XSDAppender.TH_XSD_MARKER_START)) {
                    break;
                }
                _msHTM.println(line);
            }
            while ((line = br.readLine()) != null) {
                if (line.contains(XSDAppender.TH_XSD_MARKER_END)) {
                    break;
                }
            }
            if (_options.getXsdDirectory() != null) {
                File resourcesDir = new File(_options.getXsdDirectory());
                XSDAppender xsd = new XSDAppender(_msHTM);
                xsd.writeXSDs(resourcesDir);
            }
            while ((line = br.readLine()) != null) {
                _msHTM.println(line);
            }
            _msHTM.flush();
            br.close();
            _msHTM.close();
            runLinkReport();
        } catch (Throwable t) {
            t.printStackTrace();
            if (_msHTM != null) {
                _msHTM.close();
            }
            return false;
        }
        return true;
    }
public static boolean start ( RootDoc root ) { try { _msHTM = new PrintWriter ( new File ( _options . getFilename ( ) ) ) ; if ( _options . getInputFile ( ) == null ) { throw new FileNotFoundException ( "Could not find input file param.  Please add -inputFile param to Javadoc task." ) ; } File inputFile = new File ( _options . getInputFile ( ) ) ; BufferedReader br = new BufferedReader ( new FileReader ( inputFile ) ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { if ( line . contains ( TH_MARKER_START ) ) { break ; } _msHTM . println ( line ) ; } _msHTM . flush ( ) ; while ( ( line = br . readLine ( ) ) != null ) { if ( line . contains ( TH_MARKER_END ) ) { break ; } } startClassDocs ( root ) ; while ( ( line = br . readLine ( ) ) != null ) { if ( line . contains ( XSDAppender . TH_XSD_MARKER_START ) ) { break ; } _msHTM . println ( line ) ; } while ( ( line = br . readLine ( ) ) != null ) { if ( line . contains ( XSDAppender . TH_XSD_MARKER_END ) ) { break ; } } if ( _options . getXsdDirectory ( ) != null ) { File resourcesDir = new File ( _options . getXsdDirectory ( ) ) ; XSDAppender xsd = new XSDAppender ( _msHTM ) ; xsd . writeXSDs ( resourcesDir ) ; } while ( ( line = br . readLine ( ) ) != null ) { _msHTM . println ( line ) ; } _msHTM . flush ( ) ; br . close ( ) ; _msHTM . close ( ) ; runLinkReport ( ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; if ( _msHTM != null ) { _msHTM . close ( ) ; } return false ; } return true ; }
Starting point for the JavaDoc documentation process.
Starting point for the JavaDoc documentation process .
// Create the MS Word compatible *.htm file // Initialize writer and write out beginning HTML and CSS from // template // Continue to read the existing API until we get to the end of the // API Section // Now write out new API // Look for XSD // Continue to read the existing API until we get to the end of the // XSD section // write XSDs // Finish writing wrapper HTML //Report broken links within the API