Skip to content

try0/wicket-component-document

Repository files navigation

wicket-component-document

Assists in browsing documents related to components.
Links to source code, javadoc, wiki, and more...

console

if (getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT) {

    ComponentDocumentOption defaultOption = new ComponentDocumentOption();

    ComponentDocumentSetting.createInitializer(this)
            .setDefaultOption(defaultOption)
            // wicket-component-document-samples GitHub
            .addBaseUrl("jp.try0.wicket",
                    "https://github.com/try0/wicket-component-document/tree/main/wicket-component-document-samples/src/main/java/")
            // wicket GitHub
            .addBaseUrl("org.apache.wicket",
                    "https://github.com/apache/wicket/tree/wicket-8.x/wicket-core/src/main/java/")
            .initialize();
}

wicket-component-document_console

multiple documents, tooltip

if (getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT) {

    ComponentDocumentOption defaultOption = new ComponentDocumentOption();
    defaultOption.setEnabledTooltip(true);

    ComponentDocumentSetting.createInitializer(this)
            .setDefaultOption(defaultOption)
            // wicket-component-document-samples GitHub
            .addBaseUrl("jp.try0.wicket",
                    "https://github.com/try0/wicket-component-document/tree/main/wicket-component-document-samples/src/main/java/")
            // wicket GitHub
            .addBaseUrl("org.apache.wicket",
                    "https://github.com/apache/wicket/tree/wicket-8.x/wicket-core/src/main/java/")
            // wicket javadoc.io
            .addBaseUrl("org.apache.wicket",
                    "https://javadoc.io/doc/org.apache.wicket/wicket-core/8.13.0/")
            .setUrlAppender(new DocumentUrlAppender() {
                @Override
                protected String getComponentDocumentUrl(String baseUrl, Component component) {

                    String url = super.getComponentDocumentUrl(baseUrl, component);
                    if (baseUrl.startsWith("https://javadoc.io")) {
                        url = url.replaceAll("java$", "html");
                    }

                    return url;
                }
            })
            .initialize();
}

wicket-component-document_tooltip

About

Assists in browsing documents related to components.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published