NodeList categoryNodeList = runnerNode.getElementsByTagName(CATEGORY_NODE_NAME);
for (int categoryIndex = 0; categoryIndex < categoryNodeList.getLength(); categoryIndex++) {
Element categoryElement = (Element) categoryNodeList.item(categoryIndex);
String categoryNodeName = categoryElement.getAttribute(NAME_ATTR);
ICategoryNode categoryNode = null;
if (Message_uncategorized.equals(categoryNodeName)) {
categoryNode = runnerModel.getDefaultCategoryNode();
}
else {
categoryNode = new CategoryNode(categoryNodeName);
runnerModel.addCategoryNode(categoryNode);
}
NodeList launchNodeList = categoryElement.getElementsByTagName(LAUNCH_NODE_NAME);
for (int i = 0; i < launchNodeList.getLength(); i++) {
Element launchElement = (Element) launchNodeList.item(i);
ILaunchConfiguration launchConfiguration = findLaunchConfigurationByName(launchElement.getAttribute(NAME_ATTR));
if (launchConfiguration != null) {
boolean isBookmarked = Boolean.valueOf(launchElement.getAttribute(BOOKMARK_ATTR));
categoryNode.add(
createLaunchCategory(launchConfiguration, isBookmarked)
);
}
}
}