String[] expandedCategoryPaths = settings
.getArray(STORE_EXPANDED_CATEGORIES_ID);
List categoriesToExpand = new ArrayList(expandedCategoryPaths.length);
for (int i = 0; i < expandedCategoryPaths.length; i++) {
CheatSheetCollectionElement category = cheatsheetCategories
.findChildCollection(new Path(expandedCategoryPaths[i]));
if (category != null) // ie.- it still exists
categoriesToExpand.add(category);
}