/** * Return the library name for a given macro. * @param vmName Name of the Macro to look up. * @param template Template * @return The name of the library which registered this macro in a namespace. */ public String getLibraryName(final String vmName, Template template) { if (usingNamespaces()) { /* * if we have this macro defined in this namespace, then * it is masking the global, library-based one, so * just return null */ MacroEntry me = (MacroEntry)template.getMacros().get(vmName); if( me != null ) return null; } MacroEntry me = (MacroEntry) globalNamespace.get(vmName); if (me != null) { return me.getSourceTemplate(); } return null; }
definingTemplate.getMacros().put(vmName, me); return true;