Package org.rythmengine

Examples of org.rythmengine.RythmEngine.conf()


        if (null != template) {
            escape = template.__curEscape();
        } else {
            RythmEngine engine = RythmEngine.get();
            if (null != engine) {
                escape = engine.conf().defaultCodeType().escape();
            } else {
                escape = Escape.RAW;
            }
        }
        return escape.apply(o);
View Full Code Here


     *
     * @return the configuration instance associated with engine running in the current thread
     */
    public static RythmConfiguration get() {
        RythmEngine engine = RythmEngine.get();
        return null != engine ? engine.conf() : EMPTY_CONF;
    }

    private final static ILogger logger = Logger.get(RythmConfiguration.class);

    public void debug() {
View Full Code Here

                    iterator = Collections.EMPTY_LIST.iterator();
                    return;
                }
                List<String> seps = new ArrayList<String>();
                RythmEngine engine = RythmEngine.get();
                RythmConfiguration conf = engine.conf();
                if ("zh".equals(conf.locale().getLanguage())) {
                    seps.addAll(Arrays.asList("\n,、,,,;,。,:".split(",")));
                } else {
                    seps.add("\n");
                }
View Full Code Here

            return template.__curLocale();
        }
        Locale retval;
        RythmEngine engine = RythmEngine.get();
        if (null != engine) {
            retval = engine.conf().locale();
        } else {
            retval = RythmConfigurationKey.I18N_LOCALE.getDefaultConfiguration();
        }
        return retval;
    }
View Full Code Here

    private int lastCursor = 0;

    public TemplateTokenizer(IContext context) {
        ctx = context;
        RythmEngine engine = ctx.getEngine();
        RythmConfiguration conf = engine.conf();
        if ((conf.smartEscapeEnabled() || conf.naturalTemplateEnabled()) && engine.extensionManager().hasTemplateLangs()) {
            parsers.add(new CodeTypeBlockStartSensor(ctx));
            parsers.add(new CodeTypeBlockEndSensor(ctx));
        }
        if (conf.naturalTemplateEnabled() && engine.extensionManager().hasTemplateLangs()) {
View Full Code Here

            ICodeType type = engine.renderSettings.codeType();
            if (null == type) {
                type = templateResource.codeType(engine());
            }
            if (null == type || ICodeType.DefImpl.RAW == type) {
                type = engine.conf().defaultCodeType();
            }
            codeType = type;
            if (null == name) {
                // this is the root level template class
                root = this;
View Full Code Here

            codeType = type;
            if (null == name) {
                // this is the root level template class
                root = this;
                name = templateResource.getSuggestedClassName() + CN_SUFFIX;
                if (engine.conf().typeInferenceEnabled()) {
                    name += ParamTypeInferencer.uuid();
                }
                ITemplateResourceLoader loader = engine().resourceManager().whichLoader(templateResource);
                if (null != loader) {
                    Object k = templateResource.getKey();
View Full Code Here

        RythmEngine e = engine();
        if (null == e) {
            // not in Rendering process yet, let's assume it's safe to check system properties
            return;
        }
        String s = e.conf().allowedSystemProperties();
        if (s.indexOf(key) > -1) return;
        checkRythm();
        if (null != csm) csm.checkPropertyAccess(key);
        if (null != osm) osm.checkPropertyAccess(key);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.