public Set getCodeScripts()

in src/main/java/org/apache/cxf/cwiki/Page.java [430:461]


    public Set<String> getCodeScripts() throws Exception {
        Set<String> scripts = new HashSet<String>();
        if (codeTypes != null) {
            for (String s : codeTypes) {
                String sc = CODE_TYPE_MAP.get(s);
                if (sc == null) {
                    System.out.println("WARNING: no code highlighter for " + s);
                } else {
                    scripts.add(sc);
                }
            }
        }
        if (scripts.isEmpty()) {
            scripts.add(CODE_TYPE_MAP.get("java"));
            scripts.add(CODE_TYPE_MAP.get("plain"));
        }
        if (includes != null) {
            for (String i : includes) {
                try {
                    Page p = exporter.findPage(i);
                    if (p != null && p.getHasCode()) {
                        scripts.addAll(p.getCodeScripts());
                    } else if (p == null) {
                        System.out.println("    Did not find page " + i);
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
        return scripts;
    }