Generate the package index file named "overview-frame.html".
@throws DocletAbortException
13147
public static void generate(ConfigurationImpl configuration) {
        PackageIndexFrameWriter packgen;
        DocPath filename = DocPaths.OVERVIEW_FRAME;
        try {
            packgen = new PackageIndexFrameWriter(configuration, filename);
            packgen.buildPackageIndexFile("doclet.Window_Overview", false);
            packgen.close();
        } catch (IOException exc) {
            configuration.standardmessage.error(
                        "doclet.exception_encountered",
                        exc.toString(), filename);
            throw new DocletAbortException(exc);
        }
    }
945768
function generateTutorial(title, tutorial, fileName, originalFileName, isHtmlTutorial) {
        var tutorialData = {
            docs: null, // If there is no "docs" prop, Erros in layout.tmpl. (For left-nav member listing control)
            isTutorial: true,
            env: env,
            title: title,
            header: tutorial.title,
            children: tutorial.children,
            isHtmlTutorial: isHtmlTutorial,
            package: find({kind: 'package'})[0]
        };

        if (isHtmlTutorial) {
            _.extend(tutorialData, generateHtmlTutorialData(tutorial, fileName, originalFileName));
        } else {
            tutorialData.content = tutorial.parse();
        }

        var tutorialPath = path.join(outdir, fileName),
            html = view.render('tutorial.tmpl', tutorialData);

        // yes, you can use {@link} in tutorials too!
        html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>

        fs.writeFileSync(tutorialPath, html, 'utf8');
    }
1118775
public function packageWriter(&$doclet)
    {

        parent::HTMLWriter($doclet);

        $rootDoc =& $this->_doclet->rootDoc();
        $phpdoctor =& $this->_doclet->phpdoctor();

        $displayTree = $phpdoctor->getOption('tree');

        if ($displayTree) {
            $this->_sections[0] = array('title' => 'Overview', 'url' => 'overview-summary.html');
            $this->_sections[1] = array('title' => 'Namespace');
            $this->_sections[2] = array('title' => 'Class');
            //$this->_sections[3] = array('title' => 'Use');
            $this->_sections[4] = array('title' => 'Tree', 'selected' => TRUE);
            if ($doclet->includeSource()) $this->_sections[5] = array('title' => 'Files', 'url' => 'overview-files.html');
            $this->_sections[6] = array('title' => 'Deprecated', 'url' => 'deprecated-list.html');
            $this->_sections[7] = array('title' => 'Todo', 'url' => 'todo-list.html');
            $this->_sections[8] = array('title' => 'Index', 'url' => 'index-all.html');

            $this->_id = 'tree';

            $tree = array();
            $classes =& $rootDoc->classes();
            if ($classes) {
                foreach ($classes as $class) {
                    $this->_buildTree($tree, $class);
                }
            }

            ob_start();

            echo "<hr>\n\n";
            echo '<h1>Class Hierarchy</h1>';

            $this->_displayTree($tree);

            $this->_output = ob_get_contents();
            ob_end_clean();

            $this->_write('overview-tree.html', 'Overview', TRUE);
        }

        $this->_id = 'package';

        $packages =& $rootDoc->packages();
        ksort($packages);

        foreach ($packages as $packageName => $package) {

            $this->_depth = $package->depth() + 1;

            $this->_sections[0] = array('title' => 'Overview', 'url' => 'overview-summary.html');
            $this->_sections[1] = array('title' => 'Namespace', 'selected' => TRUE);
            $this->_sections[2] = array('title' => 'Class');
            //$this->_sections[3] = array('title' => 'Use');
            if ($displayTree) $this->_sections[4] = array('title' => 'Tree', 'url' => $package->asPath().'/package-tree.html');
            if ($doclet->includeSource()) $this->_sections[5] = array('title' => 'Files', 'url' => 'overview-files.html');
            $this->_sections[6] = array('title' => 'Deprecated', 'url' => 'deprecated-list.html');
            $this->_sections[7] = array('title' => 'Todo', 'url' => 'todo-list.html');
            $this->_sections[8] = array('title' => 'Index', 'url' => 'index-all.html');

            ob_start();

            echo "<hr>\n\n";

            echo '<h1>Namespace ', $package->name(), "</h1>\n\n";

            $textTag =& $package->tags('@text');
            if ($textTag) {
                echo '<div class="comment">', $this->_processInlineTags($textTag, TRUE), "</div>\n\n";
                echo '<dl><dt>See:</dt><dd><b><a href="#overview_description">Description</a></b></dd></dl>', "\n\n";
            }

            $classes =& $package->ordinaryClasses();
            if ($classes) {
                ksort($classes);
                echo '<table class="title">', "\n";
                echo '<tr><th colspan="2" class="title">Class Summary</th></tr>', "\n";
                foreach ($classes as $name => $class) {
                    $textTag =& $classes[$name]->tags('@text');
                    echo '<tr><td class="name"><a href="', str_repeat('../', $this->_depth), $classes[$name]->asPath(), '">', $classes[$name]->name(), '</a></td>';
                    echo '<td class="description">';
                    if ($textTag) echo strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>');
                    echo "</td></tr>\n";
                }
                echo "</table>\n\n";
            }

            $interfaces =& $package->interfaces();
            if ($interfaces) {
                ksort($interfaces);
                echo '<table class="title">'."\n";
                echo '<tr><th colspan="2" class="title">Interface Summary</th></tr>'."\n";
                foreach ($interfaces as $name => $interface) {
                    $textTag =& $interfaces[$name]->tags('@text');
                    echo '<tr><td class="name"><a href="', str_repeat('../', $this->_depth), $interfaces[$name]->asPath(), '">', $interfaces[$name]->name(), '</a></td>';
                    echo '<td class="description">';
                    if ($textTag) echo strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>');
                    echo "</td></tr>\n";
                }
                echo "</table>\n\n";
            }

            $traits =& $package->traits();
            if ($traits) {
                ksort($traits);
                echo '<table class="title">'."\n";
                echo '<tr><th colspan="2" class="title">Trait Summary</th></tr>'."\n";
                foreach ($traits as $name => $trait) {
                    $textTag =& $traits[$name]->tags('@text');
                    echo '<tr><td class="name"><a href="', str_repeat('../', $this->_depth), $traits[$name]->asPath(), '">', $traits[$name]->name(), '</a></td>';
                    echo '<td class="description">';
                    if ($textTag) echo strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>');
                    echo "</td></tr>\n";
                }
                echo "</table>\n\n";
            }

            $exceptions =& $package->exceptions();
            if ($exceptions) {
                ksort($exceptions);
                echo '<table class="title">'."\n";
                echo '<tr><th colspan="2" class="title">Exception Summary</th></tr>'."\n";
                foreach ($exceptions as $name => $exception) {
                    $textTag =& $exceptions[$name]->tags('@text');
                    echo '<tr><td class="name"><a href="', str_repeat('../', $this->_depth), $exceptions[$name]->asPath(), '">', $exceptions[$name]->name(), '</a></td>';
                    echo '<td class="description">';
                    if ($textTag) echo strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>');
                    echo "</td></tr>\n";
                }
                echo "</table>\n\n";
            }

            $functions =& $package->functions();
            if ($functions) {
                ksort($functions);
                echo '<table class="title">', "\n";
                echo '<tr><th colspan="2" class="title">Function Summary</th></tr>', "\n";
                foreach ($functions as $name => $function) {
                    $textTag =& $functions[$name]->tags('@text');
                    echo '<tr><td class="name"><a href="package-functions.html#', $functions[$name]->name(), '">', $functions[$name]->name(), '</a></td>';
                    echo '<td class="description">';
                    if ($textTag) echo strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>');
                    echo "</td></tr>\n";
                }
                echo "</table>\n\n";
            }

            $globals =& $package->globals();
            if ($globals) {
                ksort($globals);
                echo '<table class="title">', "\n";
                echo '<tr><th colspan="2" class="title">Global Summary</th></tr>', "\n";
                foreach ($globals as $name => $global) {
                    $textTag =& $globals[$name]->tags('@text');
                    echo '<tr><td class="name"><a href="package-globals.html#', $globals[$name]->name(), '">', $globals[$name]->name(), '</a></td>';
                    echo '<td class="description">';
                    if ($textTag) echo strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>');
                    echo "</td></tr>\n";
                }
                echo "</table>\n\n";
            }

            $textTag =& $package->tags('@text');
            if ($textTag) {
                echo '<h1>Namespace ', $package->name(), " Description</h1>\n\n";
                echo '<div class="comment" id="overview_description">'. $this->_processInlineTags($textTag), "</div>\n\n";
            }

            echo "<hr>\n\n";

            $this->_output = ob_get_contents();
            ob_end_clean();

            $this->_write($package->asPath().'/package-summary.html', $package->name(), TRUE);

            if ($displayTree) {

                $this->_sections[0] = array('title' => 'Overview', 'url' => 'overview-summary.html');
                $this->_sections[1] = array('title' => 'Namespace', 'url' => $package->asPath().'/package-summary.html', 'relative' => TRUE);
                $this->_sections[2] = array('title' => 'Class');
                //$this->_sections[3] = array('title' => 'Use');
                $this->_sections[4] = array('title' => 'Tree', 'url' => $package->asPath().'/package-tree.html', 'selected' => TRUE, 'relative' => TRUE);
                if ($doclet->includeSource()) $this->_sections[5] = array('title' => 'Files', 'url' => 'overview-files.html');
                $this->_sections[6] = array('title' => 'Deprecated', 'url' => 'deprecated-list.html');
                $this->_sections[7] = array('title' => 'Todo', 'url' => 'todo-list.html');
                $this->_sections[8] = array('title' => 'Index', 'url' => 'index-all.html');

                $this->_id = 'tree';

                $tree = array();
                $classes =& $package->ordinaryClasses();
                if ($classes) {
                    ksort($classes);
                    foreach ($classes as $class) {
                        $this->_buildTree($tree, $class);
                    }
                }

                ob_start();

                echo "<hr>\n\n";

                echo '<h1>Class Hierarchy for Package ', $package->name(),'</h1>';

                $this->_displayTree($tree);

                $this->_output = ob_get_contents();
                ob_end_clean();

                $this->_write($package->asPath().'/package-tree.html', $package->name(), TRUE);
            }

        }

    }
827476
public void generateTreeFile() throws IOException {
        HtmlTree body = getTreeHeader();
        Content headContent = getResource("doclet.Hierarchy_For_All_Packages");
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
                HtmlStyle.title, headContent);
        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
        addPackageTreeLinks(div);
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
                ? HtmlTree.MAIN()
                : body;
        htmlTree.addContent(div);
        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
        divTree.addStyle(HtmlStyle.contentContainer);
        addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
        addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
        addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
        addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
        htmlTree.addContent(divTree);
        if (configuration.allowTag(HtmlTag.MAIN)) {
            body.addContent(htmlTree);
        }
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            htmlTree = HtmlTree.FOOTER();
        } else {
            htmlTree = body;
        }
        addNavLinks(false, htmlTree);
        addBottom(htmlTree);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            body.addContent(htmlTree);
        }
        printHtmlDocument(null, true, body);
    }
935794
function createIndex() {
  var directory = 'src/views'
  var directories = fs.readdirSync(directory)

  try {
    var lines = ['// This is a generated file, do not edit, or disable "prebuild" command in package.json if you want to take control']
    for (var i = 0; i < directories.length; i++) {
      var path = directory + '/' + directories[i];
      if (fs.existsSync(path) && fs.lstatSync(path).isDirectory()) {
        var file = directories[i] + '.js'
        if (fs.existsSync(directory + '/' + directories[i] + '/' + file)) {
          lines.push('export { default as ' + directories[i] + ' } from \'./' + directories[i] + '/' + directories[i] + '\'')
        }
      }
    }

    fs.writeFileSync(directory + '/index.js', lines.join('\n') + '\n');
  } catch (err) {
    console.log(err)
  }
}
1079074
protected void addIndex(Content body) {
        for (String groupname : groupList) {
            List<PackageDoc> list = groupPackageMap.get(groupname);
            if (list != null && !list.isEmpty()) {
                addIndexContents(list,
                                 groupname, configuration.getText("doclet.Member_Table_Summary",
                                                                  groupname, configuration.getText("doclet.packages")), body);
            }
        }
    }
1157572
public int execute() throws IOException {
        outputDir.mkdirs();

        if (packageName == null || packageName.length() == 0) {
            packageName = groupId + "." + artifactId;
        }

        String packageDir = packageName.replace('.', '/');

        debug("Creating archetype using Maven groupId: " + groupId + ", artifactId: " + artifactId + ", version: " + version + " in directory: " + outputDir);

        Map<String, String> replaceProperties = parseProperties();
        replaceProperties.putAll(overrideProperties);

        debug("Using replace properties: " + replaceProperties);

        ZipFile zip = null;
        try {
            zip = new ZipFile(archetypeFile);
            Enumeration<? extends ZipEntry> entries = zip.entries();
            while (entries.hasMoreElements()) {
                final ZipEntry entry = entries.nextElement();
                if (!entry.isDirectory()) {
                    String fullName = entry.getName();
                    if (fullName != null && fullName.startsWith(zipEntryPrefix)) {
                        String name = replaceFileProperties(fullName.substring(zipEntryPrefix.length()), replaceProperties);
                        debug("Processing resource: " + name);

                        int idx = name.lastIndexOf('/');
                        Matcher matcher = sourcePathRegexPattern.matcher(name);
                        String dirName;
                        if (packageName.length() > 0 && idx > 0 && matcher.matches()) {
                            String prefix = matcher.group(1);
                            dirName = prefix + packageDir + "/" + name.substring(prefix.length());
                        } else if (packageName.length() > 0 && name.startsWith(webInfResources)) {
                            dirName = "src/main/webapp/WEB-INF/" + packageDir + "/resources" + name.substring(webInfResources.length());
                        } else {
                            dirName = name;
                        }

                        // lets replace properties...
                        File file = new File(outputDir, dirName);
                        file.getParentFile().mkdirs();
                        FileOutputStream out = null;
                        try {
                            out = new FileOutputStream(file);
                            boolean isBinary = false;
                            for (String suffix : binarySuffixes) {
                                if (name.endsWith(suffix)) {
                                    isBinary = true;
                                    break;
                                }
                            }
                            if (isBinary) {
                                // binary file?  don't transform.
                                IOHelpers.copy(zip.getInputStream(entry), out);
                            } else {
                                // text file...
                                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                                IOHelpers.copy(zip.getInputStream(entry), bos);
                                String text = new String(bos.toByteArray(), "UTF-8");
                                out.write(transformContents(text, replaceProperties).getBytes());
                            }
                        } finally {
                            if (out != null) {
                                IOHelpers.close(out);
                            }
                        }
                    }
                }
            }
        } catch (Exception e) {
            throw new IOException(e.getMessage(), e);
        } finally {
            if (zip != null) {
                IOHelpers.close(zip);
            }
        }

        // now lets replace all the properties in the pom.xml
        if (!replaceProperties.isEmpty()) {
            File pom = new File(outputDir, "pom.xml");
            if (!pom.isFile()) {
                // must be non maven archetype?
                return 0;
            }
            String text = IOHelpers.readFully(new FileReader(pom));
            for (Map.Entry<String, String> e : replaceProperties.entrySet()) {
                text = replaceVariable(text, e.getKey(), e.getValue());
            }
            // replace name if we have a custom name
            if (Strings.isNotBlank(name)) {
                text = text.replaceFirst("<name>(.*)</name>", "<name>" + name + "</name>");
            }
            // replace description if we have a custom description
            if (Strings.isNotBlank(description)) {
                text = text.replaceFirst("<description>(.*)</description>", "<description>" + description + "</description>");
            }
            IOHelpers.writeTo(pom, text);
        }

        // now lets create the default directories
        if (createDefaultDirectories) {
            File srcDir = new File(outputDir, "src");
            File mainDir = new File(srcDir, "main");
            File testDir = new File(srcDir, "test");

            String srcDirName = "java";

            for (File dir : new File[]{mainDir, testDir}) {
                for (String name : new String[]{srcDirName + "/" + packageDir, "resources"}) {
                    new File(dir, name).mkdirs();
                }
            }
        }

        return 0;
    }
443440
function globalWriter(&$doclet) {

        parent::MDWriter($doclet);

        $this->_id = "definition";

        $rootDoc = & $this->_doclet->rootDoc();

        $packages = & $rootDoc->packages();
        ksort($packages);

        foreach ($packages as $packageName => $package) {
            $this->_depth = $package->depth() + 1;

            ob_start();

            echo "- - -\n\n";

            echo "#Globals#\n\n";

            echo "- - -\n\n";

            $globals = & $package->globals();

            if ($globals) {
                ksort($globals);
                echo "<table id=\"summary_global\" class=\"title\">", "\n";
                echo "<tr><th colspan=\"2\" class=\"title\">Global Summary</th></tr>", "\n";
                foreach ($globals as $global) {
                    $textTag = & $global->tags("@text");
                    $type = & $global->type();
                    echo "<tr>\n";
                    echo "<td>", $global->modifiers(FALSE), " ", $global->typeAsString(), "</td>\n";
                    echo "<td class=\"description\">";
                    echo "<p class=\"name\"><a href=\"#", $this->_asURL($global), "\">", $global->name(), "</a></p>";
                    if ($textTag) {
                        echo "<p class=\"description\">", strip_tags($this->_processInlineTags($textTag, TRUE), "<a><b>**<u><em>"), "</p>";
                    }
                    echo "</td>\n";
                    echo "</tr>\n";
                }
                echo "</table>\n\n";

                echo "<h2 id=\"detail_global\">Global Detail</h2>", "\n";
                foreach ($globals as $global) {
                    $textTag = & $global->tags("@text");
                    $type = & $global->type();
                    $this->_sourceLocation($global);
                    echo "<h3 id=\"", $global->name(), "\">", $global->name(), "</h3>\n";
                    echo "\n\n", $global->modifiers(), " ", $global->typeAsString(), " **";
                    echo $global->name(), "**";
                    if ($global->value())
                        echo " = ", htmlspecialchars($global->value());
                    echo "\n\n";
                    echo "<div class=\"details\">", "\n";
                    if ($textTag) {
                        echo $this->_processInlineTags($textTag), "\n";
                    }
                    echo "</div>\n\n";
                    $this->_processTags($global->tags());
                    echo "- - -\n\n";
                }
            }

            $this->_output = ob_get_contents();
            ob_end_clean();

            $this->_write($this->_normalize($package->_name) . "_package-globals.md");
        }
    }
1094767
protected void generateFrameFile() throws DocFileIOException {
        Content frame = getFrameDetails();
        HtmlTree body = new HtmlTree(HtmlTag.BODY);
        body.addAttr(HtmlAttr.ONLOAD, "loadFrames()");
        String topFilePath = configuration.topFile.getPath();
        String javaScriptRefresh = "\nif (targetPage == \"\" || targetPage == \"undefined\")\n" +
                "     window.location.replace('" + topFilePath + "');\n";
        RawHtml scriptContent = new RawHtml(javaScriptRefresh.replace("\n", DocletConstants.NL));
        HtmlTree scriptTree = HtmlTree.SCRIPT();
        scriptTree.addContent(scriptContent);
        body.addContent(scriptTree);
        Content noScript = HtmlTree.NOSCRIPT(contents.noScriptMessage);
        body.addContent(noScript);
        if (configuration.allowTag(HtmlTag.MAIN)) {
            HtmlTree main = HtmlTree.MAIN(frame);
            body.addContent(main);
        } else {
            body.addContent(frame);
        }
        if (configuration.windowtitle.length() > 0) {
            printFramesDocument(configuration.windowtitle, configuration,
                    body);
        } else {
            printFramesDocument(configuration.getText("doclet.Generated_Docs_Untitled"),
                    configuration, body);
        }
    }
156381
public static void generate(ConfigurationImpl configuration) throws DocFileIOException {
        DocPath filename = DocPaths.overviewSummary(configuration.frames);
        ModuleIndexWriter mdlgen = new ModuleIndexWriter(configuration, filename);
        mdlgen.buildModuleIndexFile("doclet.Window_Overview_Summary", true);
    }
414255
protected void generatePackageTreeFile() throws DocFileIOException {
        HtmlTree body = getPackageTreeHeader();
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
                ? HtmlTree.MAIN()
                : body;
        Content headContent = contents.getContent("doclet.Hierarchy_For_Package",
                utils.getPackageName(packageElement));
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
                HtmlStyle.title, headContent);
        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
        if (configuration.packages.size() > 1) {
            addLinkToMainTree(div);
        }
        htmlTree.addContent(div);
        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
        divTree.addStyle(HtmlStyle.contentContainer);
        addTree(classtree.baseClasses(), "doclet.Class_Hierarchy", divTree);
        addTree(classtree.baseInterfaces(), "doclet.Interface_Hierarchy", divTree);
        addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
        addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree, true);
        htmlTree.addContent(divTree);
        if (configuration.allowTag(HtmlTag.MAIN)) {
            body.addContent(htmlTree);
        }
        HtmlTree tree = (configuration.allowTag(HtmlTag.FOOTER))
                ? HtmlTree.FOOTER()
                : body;
        addNavLinks(false, tree);
        addBottom(tree);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            body.addContent(tree);
        }
        printHtmlDocument(null, true, body);
    }
56214
private static void generateContextDiagrams(RootDoc root, Options opt, String outputFolder)
	    throws IOException {
        Set<ClassDoc> classDocs = new TreeSet<ClassDoc>(new Comparator<ClassDoc>() {
            public int compare(ClassDoc cd1, ClassDoc cd2) {
                return cd1.name().compareTo(cd2.name());
            }
        });
        for (ClassDoc classDoc : root.classes())
            classDocs.add(classDoc);

	ContextView view = null;
	for (ClassDoc classDoc : classDocs) {
	    try {
		if(view == null)
		    view = new ContextView(outputFolder, classDoc, root, opt);
		else
		    view.setContextCenter(classDoc);
		UmlGraph.buildGraph(root, view, classDoc);
		runGraphviz(opt.dotExecutable, outputFolder, classDoc.containingPackage().name(), classDoc.name(), root);
		alterHtmlDocs(opt, outputFolder, classDoc.containingPackage().name(), classDoc.name(),
			classDoc.name() + ".html", Pattern.compile(".*(Class|Interface|Enum) " + classDoc.name() + ".*") , root);
	    } catch (Exception e) {
		throw new RuntimeException("Error generating " + classDoc.name(), e);
	    }
	}
    }
1113085
public function packageIndexFrameWriter(&$doclet)
    {

        parent::HTMLWriter($doclet);

        ob_start();

        echo '<body id="frame">', "\n\n";

        echo '<h1>'.$this->_doclet->getHeader()."</h1>\n\n";

        echo "<ul>\n";
        echo '<li><a href="allitems-frame.html" target="index">All Items</a></li>'."\n";
        echo "</ul>\n\n";

        echo "<h1>Namespaces</h1>\n\n";

        $rootDoc =& $this->_doclet->rootDoc();

        echo "<ul>\n";
        $packages =& $rootDoc->packages();
        ksort($packages);
        foreach ($packages as $name => $package) {
            echo '<li><a href="'.$package->asPath().'/package-frame.html" target="index">'.$package->name().'</a></li>'."\n";
        }
        echo "</ul>\n\n";

        echo '</body>', "\n\n";

        $this->_output = ob_get_contents();
        ob_end_clean();

        $this->_write('overview-frame.html', 'Overview', FALSE);

    }
977
protected function generateIndex() {

		/**
			*  Handle missing index.html. Solves https://github.com/drupal-pattern-lab/patternlab-php-core/issues/14
			*  Could also be used to re-add missing styleguidekit assets with a few edits?
			*
			*  1. @TODO: Figure out a better way to future-proof path resolution for styleguidekit `dist` folder
			*  2. Recusirively copy files from styleguidekit to publicDir via https://stackoverflow.com/a/7775949
			*  3. Make sure we only try to create new directories if they don't already exist
			*  4. Only copy files if they are missing (vs changed, etc)
			*/
		if (!file_exists(Config::getOption("publicDir")."/index.html")) {
			$index = Console::getHumanReadablePath(Config::getOption("publicDir")).DIRECTORY_SEPARATOR."index.html";
			Console::writeWarning($index . " is missing. No biggie. Grabbing a fresh copy from your StyleguideKit...");

			$baseDir = Config::getOption("baseDir") . '/vendor';
			$finder = new Finder();

			// Locate the current theme's styleguidekit assets via the patternlab-styleguidekit `type` in composer.json
			$finder->files()->name("composer.json")->in($baseDir)->contains('patternlab-styleguidekit')->sortByName();

			foreach ($finder as $file) {
				$src = dirname($file->getRealPath()) . DIRECTORY_SEPARATOR . 'dist'; /* [1] */
				$dest= Config::getOption("publicDir");

				if (is_dir($src)){

					if(!is_dir($dest)) {
						mkdir($dest, 0755);
	        }

	        foreach ( /* [2] */
						$iterator = new \RecursiveIteratorIterator(
							new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item
					) {
						if ($item->isDir()) {
							if(!is_dir($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName())) { /* [3] */
								mkdir($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
							}
						} else {
							if(!file_exists($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName())) { /* [4] */
								copy($item, $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
							}
						}
					}
				}
			}
		}

		// set-up the dispatcher
		$dispatcherInstance = Dispatcher::getInstance();

		// note the start of the operation
		$dispatcherInstance->dispatch("builder.generateIndexStart");

		// default var
		$dataDir = Config::getOption("publicDir")."/styleguide/data";

		// double-check that the data directory exists
		if (!is_dir($dataDir)) {
			FileUtil::makeDir($dataDir);
		}

		$output = "";

		// load and write out the config options
		$config                         = array();
		$exposedOptions                 = Config::getOption("exposedOptions");
		foreach ($exposedOptions as $exposedOption) {
			$config[$exposedOption]     = Config::getOption($exposedOption);
		}
		$output     .= "var config = ".json_encode($config).";\n";

		// load the ish Controls
		$ishControls     = array();
		$controlsToHide  = array();
		$ishControlsHide = Config::getOption("ishControlsHide");
		if ($ishControlsHide) {
			foreach ($ishControlsHide as $controlToHide) {
				$controlsToHide[$controlToHide] = "true";
			}
		}
		$ishControls["ishControlsHide"] = $controlsToHide;
		$output      .= "var ishControls = ".json_encode($ishControls).";\n";

		// load and write out the items for the navigation
		$niExporter   = new NavItemsExporter();
		$navItems     = $niExporter->run();
		$output      .= "var navItems = ".json_encode($navItems).";\n";

		// load and write out the items for the pattern paths
		$patternPaths = array();
		$ppdExporter  = new PatternPathDestsExporter();
		$patternPaths = $ppdExporter->run();
		$output      .= "var patternPaths = ".json_encode($patternPaths).";\n";

		// load and write out the items for the view all paths
		$viewAllPaths = array();
		$vapExporter  = new ViewAllPathsExporter();
		$viewAllPaths = $vapExporter->run($navItems);
		$output      .= "var viewAllPaths = ".json_encode($viewAllPaths).";\n";

		// gather plugin package information
		$packagesInfo = array();
		$componentDir = Config::getOption("componentDir");
		if (!is_dir($componentDir)) {
			mkdir($componentDir);
		}
		$componentPackagesDir = $componentDir."/packages";
		if (!is_dir($componentDir."/packages")) {
			mkdir($componentDir."/packages");
		}
		$finder = new Finder();
		$finder->files()->name("*.json")->in($componentPackagesDir);
		$finder->sortByName();
		foreach ($finder as $file) {
			$filename = $file->getFilename();
			if ($filename[0] != "_") {
				$javascriptPaths = array();
				$packageInfo = json_decode(file_get_contents($file->getPathname()),true);
				foreach ($packageInfo["templates"] as $templateKey => $templatePath) {
					$templatePathFull = $componentDir."/".$packageInfo["name"]."/".$templatePath;
					$packageInfo["templates"][$templateKey] = (file_exists($templatePathFull)) ? file_get_contents($templatePathFull) : "";
				}
				foreach ($packageInfo["javascripts"] as $key => $javascriptPath) {
					$javascriptPaths[] = "patternlab-components/".$packageInfo["name"]."/".$javascriptPath;
				}
				$packageInfo["javascripts"] = $javascriptPaths;
				$packagesInfo[] = $packageInfo;
			}
		}
		$output .= "var plugins = ".json_encode($packagesInfo).";";

		// write out the data
		file_put_contents($dataDir."/patternlab-data.js",$output);
		// Structuring all the same data that went into `patternlab-data.js` and putting it into `patternlab-data.json` too
		$allPlData = array(
			'config' => $config,
			'ishControls' => $ishControls,
			'navItems' => $navItems,
			'patternPaths' => $patternPaths,
			'viewAllPaths' => $viewAllPaths,
			'plugins' => $packagesInfo,
		);
		file_put_contents($dataDir."/patternlab-data.json", json_encode($allPlData));

		// note the end of the operation
		$dispatcherInstance->dispatch("builder.generateIndexEnd");

	}
204526
private void initStandardTaglets() {
        if (javafx) {
            initJavaFXTaglets();
        }

        Taglet temp;
        addStandardTaglet(new ParamTaglet());
        addStandardTaglet(new ReturnTaglet());
        addStandardTaglet(new ThrowsTaglet());
        addStandardTaglet(new SimpleTaglet(EXCEPTION.tagName, null,
                SimpleTaglet.METHOD + SimpleTaglet.CONSTRUCTOR));
        addStandardTaglet(!nosince, new SimpleTaglet(SINCE.tagName, resources.getText("doclet.Since"),
                SimpleTaglet.ALL));
        addStandardTaglet(showversion, new SimpleTaglet(VERSION.tagName, resources.getText("doclet.Version"),
                SimpleTaglet.MODULE + SimpleTaglet.PACKAGE + SimpleTaglet.TYPE + SimpleTaglet.OVERVIEW));
        addStandardTaglet(showauthor, new SimpleTaglet(AUTHOR.tagName, resources.getText("doclet.Author"),
                SimpleTaglet.MODULE + SimpleTaglet.PACKAGE + SimpleTaglet.TYPE + SimpleTaglet.OVERVIEW));
        addStandardTaglet(new SimpleTaglet(SERIAL_DATA.tagName, resources.getText("doclet.SerialData"),
                SimpleTaglet.EXCLUDED));
        addStandardTaglet(new SimpleTaglet(HIDDEN.tagName, resources.getText("doclet.Hidden"),
                SimpleTaglet.FIELD + SimpleTaglet.METHOD + SimpleTaglet.TYPE));
        customTags.put((temp = new SimpleTaglet("factory", resources.getText("doclet.Factory"),
                SimpleTaglet.METHOD)).getName(), temp);
        addStandardTaglet(new SeeTaglet());
        //Standard inline tags
        addStandardTaglet(new DocRootTaglet());
        addStandardTaglet(new InheritDocTaglet());
        addStandardTaglet(new ValueTaglet());
        addStandardTaglet(new LiteralTaglet());
        addStandardTaglet(new CodeTaglet());
        addStandardTaglet(new IndexTaglet());

        // Keep track of the names of standard tags for error
        // checking purposes. The following are not handled above.
        standardTags.add(DEPRECATED.tagName);
        standardTags.add(LINK.tagName);
        standardTags.add(LINK_PLAIN.tagName);
        standardTags.add(SERIAL.tagName);
        standardTags.add(SERIAL_FIELD.tagName);
    }
443405
protected void addModulePackagesIndex(Content body, ModuleElement mdle) {
        addModulePackagesIndexContents("doclet.Module_Summary",
                configuration.getText("doclet.Member_Table_Summary",
                configuration.getText("doclet.Module_Summary"),
                configuration.getText("doclet.modules")), body, mdle);
    }
1030199
public function packageIndexWriter(&$doclet)
    {

        parent::htmlWriter($doclet);

        $phpdoctor =& $this->_doclet->phpdoctor();

        $this->_sections[0] = array('title' => 'Overview', 'selected' => TRUE);
        $this->_sections[1] = array('title' => 'Namespace');
        $this->_sections[2] = array('title' => 'Class');
        //$this->_sections[3] = array('title' => 'Use');
        if ($phpdoctor->getOption('tree')) $this->_sections[4] = array('title' => 'Tree', 'url' => 'overview-tree.html');
        if ($doclet->includeSource()) $this->_sections[5] = array('title' => 'Files', 'url' => 'overview-files.html');
        $this->_sections[6] = array('title' => 'Deprecated', 'url' => 'deprecated-list.html');
        $this->_sections[7] = array('title' => 'Todo', 'url' => 'todo-list.html');
        $this->_sections[8] = array('title' => 'Index', 'url' => 'index-all.html');

        ob_start();

        echo "<hr>\n\n";

        echo '<h1>'.$this->_doclet->docTitle()."</h1>\n\n";

        $rootDoc =& $this->_doclet->rootDoc();

        $textTag =& $rootDoc->tags('@text');
        if ($textTag) {
            $description = $this->_processInlineTags($textTag, TRUE);
            if ($description) {
                echo '<div class="comment">', $description, "</div>\n\n";
                echo '<dl><dt>See:</dt><dd><b><a href="#overview_description">Description</a></b></dd></dl>'."\n\n";
            }
        }

        echo '<table class="title">'."\n";
        echo '<tr><th colspan="2" class="title">Namespaces</th></tr>'."\n";
        $packages =& $rootDoc->packages();
        ksort($packages);
        foreach ($packages as $name => $package) {
            $textTag =& $package->tags('@text');
            echo '<tr><td class="name"><a href="'.$package->asPath().'/package-summary.html">'.$package->name().'</a></td>';
            echo '<td class="description">'.strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>').'</td></tr>'."\n";
        }
        echo '</table>'."\n\n";

        $textTag =& $rootDoc->tags('@text');
        if ($textTag) {
            $description = $this->_processInlineTags($textTag);
            if ($description) {
                echo '<div class="comment" id="overview_description">', $description, "</div>\n\n";
            }
        }

        echo "<hr>\n\n";

        $this->_output = ob_get_contents();
        ob_end_clean();

        $this->_write('overview-summary.html', 'Overview', TRUE);

    }