Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #59 from jsbulldog89/master
Browse files Browse the repository at this point in the history
Issue #53 & #58 - Hide "Miscellaneous" if there are no classes to show under it.
  • Loading branch information
jjbennett authored Aug 1, 2016
2 parents cdc5c2d + 191424b commit d377798
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/org/salesforce/apexdoc/FileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,19 +326,24 @@ private void createClassGroupContent(TreeMap<String, String> mapFNameToContent,
* @return String of HTML
*/
private String getPageLinks(TreeMap<String, ClassGroup> mapGroupNameToClassGroup, ArrayList<ClassModel> cModels) {
boolean createMiscellaneousGroup = false;

// this is the only place we need the list of class models sorted by name.
TreeMap<String, ClassModel> tm = new TreeMap<String, ClassModel>();
for (ClassModel cm : cModels)
for (ClassModel cm : cModels) {
tm.put(cm.getClassName().toLowerCase(), cm);
if (!createMiscellaneousGroup && cm.getClassGroup() == null)
createMiscellaneousGroup = true;
}
cModels = new ArrayList<ClassModel>(tm.values());

String links = "<td width='20%' vertical-align='top' >";
links += "<div class='sidebar'><div class='navbar'><nav role='navigation'><ul id='mynavbar'>";
links += "<li id='idMenuindex'><a href='.' onclick=\"gotomenu('index.html', event);return false;\" class='nav-item'>Home</a></li>";

// add a bucket ClassGroup for all Classes without a ClassGroup specified
mapGroupNameToClassGroup.put("Miscellaneous", new ClassGroup("Miscellaneous", null));
if (createMiscellaneousGroup)
mapGroupNameToClassGroup.put("Miscellaneous", new ClassGroup("Miscellaneous", null));

// create a sorted list of ClassGroups

Expand Down

0 comments on commit d377798

Please sign in to comment.