public void writeBundles(StringAppender sb, IFile file, Locale locale) { IFile dependencies[]; if (file instanceof IRepository.ISet) { dependencies = ((IRepository.ISet) file).listDependencies();
public void writeBundles(StringAppender sb, IHierarchicalFile file, Locale locale) { IHierarchicalFile dependencies[]; if (file instanceof IHierarchicalRepository.ISet) { dependencies = ((IHierarchicalRepository.ISet) file) .listDependencies();
    public void writeBundles(StringAppender sb, IFile file, Locale locale) {        IFile dependencies[];        if (file instanceof IRepository.ISet) {            dependencies = ((IRepository.ISet) file).listDependencies();        } else if (file instanceof IRepository.IModule) {            dependencies = ((IRepository.IModule) file).listDependencies();        } else {            dependencies = new IFile[] { file };        }        List classes = new ArrayList(dependencies.length);        for (int i = 0; i < dependencies.length; i++) {            IFile dependency = dependencies[i];            if ((dependency instanceof IJavaScriptRepository.IClassFile) == false) {                continue;            }            IJavaScriptRepository.IClassFile cf = (IJavaScriptRepository.IClassFile) dependency;            classes.addAll(Arrays.asList(cf.listClasses()));        }        if (classes.isEmpty()) {            return;        }        sb.append("new f_bundle(\"");        sb.append(file.getURI(locale));        sb.append('\"');        Map symbols = null;        if (enableSymbols) {            symbols = getSymbols();        }        for (Iterator it = classes.iterator(); it.hasNext();) {            IClass clazz = (IClass) it.next();            sb.append(',');            String className = clazz.getName();            if (symbols != null) {                String cn = (String) symbols.get(className);                if (cn != null) {                    className = cn;                }            }            sb.append(className);        }        sb.append(");\n");    }