if (storage != null) {
java.util.Map<String,PlatformCategoriesDescriptor> categories = new HashMap<String,PlatformCategoriesDescriptor>();
for (FileObject child : storage.getChildren()) {
try {
DataObject dobj = DataObject.find(child);
Node node = dobj.getNodeDelegate();
ScalaPlatform platform = node.getLookup().lookup(ScalaPlatform.class);
if (platform != null) {
String platformType = platform.getSpecification().getName();
if (platformType != null) {
platformType = platformType.toUpperCase(Locale.ENGLISH);
PlatformCategoriesDescriptor platforms = categories.get(platformType);
if (platforms == null ) {
platforms = new PlatformCategoriesDescriptor (platformType);
categories.put (platformType, platforms);
}
platforms.add (node);
}
else {
ErrorManager.getDefault().log ("Platform: "+ platform.getDisplayName() +" has invalid specification."); //NOI18N
}
}
else {
ErrorManager.getDefault().log ("Platform node for : "+node.getDisplayName()+" has no platform in its lookup."); //NOI18N
}
}catch (DataObjectNotFoundException e) {
ErrorManager.getDefault().notify(e);
}
}