Java Code Examples for com.sun.tools.doclets.formats.html.SingleIndexWriter

Following code examples demonstrate how to use com.sun.tools.doclets.formats.html.SingleIndexWriterfrom java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use com.sun.tools.doclets.formats.html.SingleIndexWriterand various code implementation of this class.

	protected void generateOtherFiles(RootDoc root, ClassTree classtree) throws Exception {
		BuilderFactory builderFactory = configuration.getBuilderFactory();
		AbstractBuilder constantsSummaryBuilder = builderFactory.getConstantsSummaryBuider();
		constantsSummaryBuilder.build();
		AbstractBuilder serializedFormBuilder = builderFactory.getSerializedFormBuilder();
		serializedFormBuilder.build();

		if (configuration.linksource) {
			if (configuration.destDirName.length() > 0) {
				SourceToHTMLConverter.convertRoot(configuration, root, configuration.destDirName
						+ File.separator + DocletConstants.SOURCE_OUTPUT_DIR_NAME);
			} else {
				SourceToHTMLConverter
						.convertRoot(configuration, root, DocletConstants.SOURCE_OUTPUT_DIR_NAME);
			}
		}

		if (configuration.topFile.length() == 0) {
			configuration.standardmessage.error("doclet.No_Non_Deprecated_Classes_To_Document");
			return;
		}
		boolean nodeprecated = configuration.nodeprecated;
		String configdestdir = configuration.destDirName;
		String confighelpfile = configuration.helpfile;
		String configstylefile = configuration.stylesheetfile;
		performCopy(configdestdir, confighelpfile);
		performCopy(configdestdir, configstylefile);
		Util.copyResourceFile(configuration, "inherit.gif", false);
		if (configuration.classuse) {
			ClassUseWriter.generate(configuration, classtree);
		}
		IndexBuilder indexbuilder = new IndexBuilder(configuration, nodeprecated);

		if (configuration.createtree) {
			CustomTreeWriter.generate(configuration, classtree, targetContractMap);
		}
		if (configuration.createindex) {
			if (configuration.splitindex) {
				SplitIndexWriter.generate(configuration, indexbuilder);
			} else {
				SingleIndexWriter.generate(configuration, indexbuilder);
			}
		}

		if (!(configuration.nodeprecatedlist || nodeprecated)) {
			DeprecatedListWriter.generate(configuration);
		}

		CustomAllClassesFrameWriter.generate(configuration, new IndexBuilder(configuration, nodeprecated,
				true), targetContractMap);

		FrameOutputWriter.generate(configuration);

		if (configuration.createoverview) {
			CustomPackageIndexWriter.generate(configuration, targetContractMap);
		}
		if (configuration.helpfile.length() == 0 && !configuration.nohelp) {
			HelpWriter.generate(configuration);
		}
		if (configuration.stylesheetfile.length() == 0) {
			StylesheetWriter.generate(configuration);
		}
	} 


	protected void generateOtherFiles(RootDoc root, ClassTree classtree) throws Exception {
		super.generateOtherFiles(root, classtree);
		if (configuration().linksource) {
			SourceToHTMLConverter.convertRoot(configuration(),
					root, DocPaths.SOURCE_OUTPUT);
		}

		if (configuration().topFile.isEmpty()) {
			return;
		}
		final boolean nodeprecated = configuration().nodeprecated;
		Utils.performCopy(configuration().helpfile, configuration());
		Utils.performCopy(configuration().stylesheetfile, configuration());
		if (configuration().classuse) {
			ClassUseWriter.generate(configuration(), classtree);
		}
		final IndexBuilder indexbuilder = new IndexBuilder(configuration(), nodeprecated);

		if (configuration().createtree) {
			TreeWriter.generate(configuration(), classtree);
		}
		if (configuration().createindex) {
			if (configuration().splitindex) {
				SplitIndexWriter.generate(configuration(), indexbuilder);
			} else {
				SingleIndexWriter.generate(configuration(), indexbuilder);
			}
		}

		if (!(configuration().nodeprecatedlist || nodeprecated)) {
			configuration().getProxyInstaller().noProxy(configuration(), () -> {
				DeprecatedListWriter.generate(configuration());
			});
		}

		AllClassesFrameWriter.generate(configuration(),
				new IndexBuilder(configuration(), nodeprecated, true));

		FrameOutputWriter.generate(configuration());

		if (configuration().createoverview) {
			PackageIndexWriter.generate(configuration());
		}
		if (configuration().helpfile.length() == 0 && !configuration().nohelp) {
			HelpWriter.generate(configuration());
		}
		DocFile file;
		if (configuration().stylesheetfile.length() == 0) {
			file = DocFile.createFileForOutput(configuration(), DocPaths.STYLESHEET);
			file.copyResource(DocPaths.RESOURCES.resolve(DocPaths.STYLESHEET), false, true);
		}
		file = DocFile.createFileForOutput(configuration(), DocPaths.JAVASCRIPT);
		file.copyResource(DocPaths.RESOURCES.resolve(DocPaths.JAVASCRIPT), true, true);
	} 

Advertisement
Javadoc
Generate only one index file for all the Member Names with Indexing in Unicode Order. The name of th

e generated file is "index-all.html" and it is generated in current or the destination directory.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice. @see java.lang.Character @author Atul M Dambalkar @author Bhavesh Patel (Modified)

Read More
Advertisement