Assists in browsing documents related to components.
Links to source code, javadoc, wiki, and more...
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();
}
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();
}