UseCase useCase = new UseCase(useCaseName, codeExamples);
useCases.add(useCase);
}
int categoryIndex = showcaseCategoryList.indexOf(category);
ShowcaseComponent showcaseComponent = new ShowcaseComponentImpl(categoryIndex, prefix,
camelCaseName, lowerCaseName, useCases);
String lookupKey = prefix + StringPool.UNDERLINE + lowerCaseName;
this.showcaseComponentMap.put(lookupKey, showcaseComponent);
this.showcaseComponents.add(showcaseComponent);
}
inputStream.close();
}
catch (IOException e) {
logger.error("Unable to load file: " + filename);
}
}
else {
logger.info("Missing file: " + filename);
}
Collections.sort(this.showcaseComponents, new ShowcaseComponentComparator());
for (int i = 0; i < showcaseCategoryList.size(); i++) {
List<ShowcaseComponent> categoryShowcaseComponents = new ArrayList<ShowcaseComponent>();
for (ShowcaseComponent showcaseComponent : this.showcaseComponents) {
if (i == showcaseComponent.getCategoryIndex()) {
categoryShowcaseComponents.add(showcaseComponent);
}
}
this.showcaseCategoryMap.put(showcaseCategoryList.get(i), categoryShowcaseComponents);