Class HackedRuntimeInstance

  • All Implemented Interfaces:
    org.apache.velocity.runtime.RuntimeConstants, org.apache.velocity.runtime.RuntimeLogger, org.apache.velocity.runtime.RuntimeServices

    public class HackedRuntimeInstance
    extends org.apache.velocity.runtime.RuntimeInstance
    Motivation: use a hidden folder where included velocity templates can be referenced. the default IJ includes folder can be overridden by the user. overriding the included macros will break plugin functionality on upgrades Implementation: an ugly hack on velocity inner implementation. Reasoning: Velocity is statically initialized, globally, in IJ IDEA. Extending IJ Classes that initialize Velocity is tricky since their API keeps changing between versions 14 - 2016 Date: 2/13/2017
    Author:
    Yaron Yamin
    • Field Summary

      • Fields inherited from interface org.apache.velocity.runtime.RuntimeConstants

        COUNTER_INITIAL_VALUE, COUNTER_NAME, DEBUG_PREFIX, DEFAULT_RUNTIME_DIRECTIVES, DEFAULT_RUNTIME_PROPERTIES, DEFINE_DIRECTIVE_MAXDEPTH, DIRECTIVE_IF_TOSTRING_NULLCHECK, ENCODING_DEFAULT, ERROR_PREFIX, ERRORMSG_END, ERRORMSG_START, EVALUATE_CONTEXT_CLASS, EVENTHANDLER_INCLUDE, EVENTHANDLER_INVALIDREFERENCES, EVENTHANDLER_METHODEXCEPTION, EVENTHANDLER_NULLSET, EVENTHANDLER_REFERENCEINSERTION, FILE_RESOURCE_LOADER_CACHE, FILE_RESOURCE_LOADER_PATH, HAS_NEXT_NAME, INFO_PREFIX, INPUT_ENCODING, INTERPOLATE_STRINGLITERALS, INTROSPECTOR_RESTRICT_CLASSES, INTROSPECTOR_RESTRICT_PACKAGES, MAX_NUMBER_LOOPS, NUMBER_OF_PARSERS, OUTPUT_ENCODING, PARSE_DIRECTIVE_MAXDEPTH, PARSER_POOL_CLASS, PARSER_POOL_SIZE, PROVIDE_SCOPE_CONTROL, RESOURCE_LOADER, RESOURCE_MANAGER_CACHE_CLASS, RESOURCE_MANAGER_CLASS, RESOURCE_MANAGER_DEFAULTCACHE_SIZE, RESOURCE_MANAGER_LOGWHENFOUND, RUNTIME_LOG, RUNTIME_LOG_ERROR_STACKTRACE, RUNTIME_LOG_INFO_STACKTRACE, RUNTIME_LOG_LOGSYSTEM, RUNTIME_LOG_LOGSYSTEM_CLASS, RUNTIME_LOG_REFERENCE_LOG_INVALID, RUNTIME_LOG_WARN_STACKTRACE, RUNTIME_REFERENCES_STRICT, RUNTIME_REFERENCES_STRICT_ESCAPE, SET_NULL_ALLOWED, SKIP_INVALID_ITERATOR, STRICT_MATH, TRACE_PREFIX, UBERSPECT_CLASSNAME, UNKNOWN_PREFIX, VM_ARGUMENTS_STRICT, VM_BODY_REFERENCE, VM_CONTEXT_LOCALSCOPE, VM_LIBRARY, VM_LIBRARY_AUTORELOAD, VM_LIBRARY_DEFAULT, VM_MAX_DEPTH, VM_MESSAGES_ON, VM_PERM_ALLOW_INLINE, VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL, VM_PERM_INLINE_LOCAL, WARN_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      HackedRuntimeInstance​(org.apache.velocity.runtime.RuntimeInstance existingRi)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setProperty​(java.lang.String key, java.lang.Object value)  
      • Methods inherited from class org.apache.velocity.runtime.RuntimeInstance

        addDirective, addProperty, addVelocimacro, addVelocimacro, clearProperty, createNewParser, debug, dumpVMNamespace, error, evaluate, evaluate, getApplicationAttribute, getApplicationEventCartridge, getBoolean, getConfiguration, getContent, getContent, getDirective, getInt, getInt, getIntrospector, getLoaderNameForResource, getLog, getProperty, getString, getString, getTemplate, getTemplate, getUberspect, getVelocimacro, getVelocimacro, info, init, init, init, invokeVelocimacro, isInitialized, isVelocimacro, loadDirective, parse, parse, parse, removeDirective, render, setApplicationAttribute, setConfiguration, setProperties, setProperties, warn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HackedRuntimeInstance

        public HackedRuntimeInstance​(org.apache.velocity.runtime.RuntimeInstance existingRi)
    • Method Detail

      • setProperty

        public void setProperty​(java.lang.String key,
                                java.lang.Object value)
        Specified by:
        setProperty in interface org.apache.velocity.runtime.RuntimeServices
        Overrides:
        setProperty in class org.apache.velocity.runtime.RuntimeInstance