Source:
<code>public void addSearchBox(HTMLNode contentNode) { HTMLNode searchBox = contentNode.addChild("div", "class", "infobox infobox-normal"); searchBox.addAttribute("id", "search-freenet"); searchBox.addChild("div", "class", "infobox-header").addChild("span", "class", "search-title-label", NodeL10n.getBase().getString("WelcomeToadlet.searchBoxLabel")); HTMLNode searchBoxContent = searchBox.addChild("div", "class", "infobox-content"); <START> if(node.pluginManager != null && <END> node.pluginManager.isPluginLoaded("plugins.Library.Main")) { searchBoxContent.addChild("span", "class", "search-warning-text", l10n("searchBoxWarningSlow")); HTMLNode searchForm = container.addFormChild(searchBoxContent, "/library/", "searchform"); searchForm.addChild("input", new String[] { "type", "size", "name" }, new String[] { "text", "80", "search" }); searchForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "find", l10n("searchFreenet") }); searchForm.addAttribute("target", "_blank"); } else if(node.pluginManager == null || node.pluginManager.isPluginLoadedOrLoadingOrWantLoad("Library")) { HTMLNode textSpan = searchBoxContent.addChild("span", "class", "search-not-availible-warning"); NodeL10n.getBase().addL10nSubstitution(textSpan, "WelcomeToadlet.searchPluginLoading", new String[] { "link" }, new HTMLNode[] { HTMLNode.link("/plugins/") }); } else { HTMLNode textSpan = searchBoxContent.addChild("span", "class", "search-not-availible-warning"); NodeL10n.getBase().addL10nSubstitution(textSpan, "WelcomeToadlet.searchPluginNotLoaded", new String[] { "link" }, new HTMLNode[] { HTMLNode.link("/plugins/") }); } }</code><technical_language>Hey, perfect opportunity showSearchBox function, it? :)</technical_language>

Target:
public void addSearchBox(HTMLNode contentNode) { HTMLNode searchBox = contentNode.addChild("div", "class", "infobox infobox-normal"); searchBox.addAttribute("id", "search-freenet"); searchBox.addChild("div", "class", "infobox-header").addChild("span", "class", "search-title-label", NodeL10n.getBase().getString("WelcomeToadlet.searchBoxLabel")); HTMLNode searchBoxContent = searchBox.addChild("div", "class", "infobox-content"); if (showSearchBox()) { searchBoxContent.addChild("span", "class", "search-warning-text", l10n("searchBoxWarningSlow")); HTMLNode searchForm = container.addFormChild(searchBoxContent, "/library/", "searchform"); searchForm.addChild("input", new String[] { "type", "size", "name" }, new String[] { "text", "80", "search" }); searchForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "find", l10n("searchFreenet") }); searchForm.addAttribute("target", "_blank"); } else if (showSearchBoxLoading()) { HTMLNode textSpan = searchBoxContent.addChild("span", "class", "search-not-availible-warning"); NodeL10n.getBase().addL10nSubstitution(textSpan, "WelcomeToadlet.searchPluginLoading", new String[] { "link" }, new HTMLNode[] { HTMLNode.link("/plugins/") }); } else { HTMLNode textSpan = searchBoxContent.addChild("span", "class", "search-not-availible-warning"); NodeL10n.getBase().addL10nSubstitution(textSpan, "WelcomeToadlet.searchPluginNotLoaded", new String[] { "link" }, new HTMLNode[] { HTMLNode.link("/plugins/") }); } }