System.out.println(":: generating packagesOverviewFrame.html...");
StringBuffer rulePackageLinks = new StringBuffer();
for(JTabbedPane rulePackagePane : this.sortElementsRulePackages(this.editor.getRulePackages())) {
RulePackagePanel rulePackage = (RulePackagePanel) rulePackagePane;
String rulePackageName = rulePackage.toString();
String rulePackageLink = rulePackageName.replaceAll(" ", "").toLowerCase();
DocumentationPanel rPDocumentationPanel = rulePackage.getDocumentationPanel();
rulePackageLinks.append("<a href=\"" + rulePackageLink + "OverviewFrame.html\" target=\"rulesOverviewFrame\">" + rulePackageName + "</a><br>\n");
// --- rules overview frames - begin ---
JTabbedPane[] associatedRulePackages = this.sortElementsRules(rulePackage.getAssociatedRules());
this.rulePackageAssociations.put(rulePackageName, associatedRulePackages);
this.generateRulesOverviewFrame(rulePackageName, associatedRulePackages);
// --- rules overview frames - end ---
this.ruleFrameNavigation.append(" - <a href=\"" + rulePackageLink + "PackageDescription.html\">" + rulePackageName + "</a>");
this.allRules_content.append("<h2>Rule Package <a href=\"" + rulePackageLink + "PackageDescription.html\">" + rulePackageName + "</a></h2>\n");
this.allRules_content.append(rPDocumentationPanel.getShortDescription());
}
File.writeFile(this.targetDirectory + "packagesOverviewFrame.html", String.format(this.getTemplate("packagesOverviewFrame"), rulePackageLinks.toString()));
this.ruleFrameNavigation.append("</td><td align=\"right\"><a href=\"index.html?%s\" target=\"_top\">FRAMES</a> - <a href=\"%s\" target=\"_top\">NO FRAMES</a></td></tr></table>");
// --- package overview frame - end ---
// --- all rules overview frame - begin ---
this.generateRulesOverviewFrame("All Rules", this.sortElementsRules(this.editor.getRules()));
// --- all rules overview frame - end ---
// --- packages description frame - begin ---
System.out.println(":: generating packagesDescriptionFrame.html...");
String title = "All Rule Packages";
String formattedNavi = String.format(this.ruleFrameNavigation.toString(), "packagesDescriptionFrame.html", "packagesDescriptionFrame.html");
File.writeFile(this.targetDirectory + "packagesDescriptionFrame.html", String.format(this.getTemplate("ruleFrame"), title, title, ruleFrameHeader, formattedNavi, title, this.allRules_content.toString(), formattedNavi));
// --- packages description frame - end ---
// --- rule package description frames - begin ---
for(JTabbedPane rulePackagePane : this.sortElementsRulePackages(this.editor.getRulePackages())) {
RulePackagePanel rulePackage = (RulePackagePanel) rulePackagePane;
String rulePackageName = rulePackage.toString();
String rulePackageLink = rulePackageName.replaceAll(" ", "").toLowerCase() + "PackageDescription.html";
title = "Rule Package " + rulePackageName;
System.out.println(":: generating " + rulePackageLink + "...");
formattedNavi = String.format(this.ruleFrameNavigation.toString(), rulePackageLink , rulePackageLink);
String content = rulePackage.getDocumentationPanel().getContent(this.targetDirectory, this.rulePackageAssociations.get(rulePackageName));
File.writeFile(this.targetDirectory + rulePackageLink, String.format(this.getTemplate("ruleFrame"), title, title, ruleFrameHeader, formattedNavi, title, content, formattedNavi));
}
// --- rule package description frames - end ---