try {
Definition definition = descriptor.getDef();
if (definition instanceof RootDefinition) {
List<DefDescriptor<?>> deps = ((RootDefinition) definition).getBundle();
ValidationEngine validationEngine = new ValidationEngine();
for (DefDescriptor<?> dep : deps) {
if (dep.getPrefix().equals(DefDescriptor.JAVASCRIPT_PREFIX)) {
List<ValidationError> ret = validationEngine.validate(dep);
ValidationUtil.trimFilenames(ret);
for (ValidationError error : ret) {
Map<String, String> m = new TreeMap<String, String>();
String comp = descriptor.getNamespace() + ':' + descriptor.getName();
m.put("CompName", comp);