public void handleMatch(StringBuffer buffer, MatchResult result, FilterContext context) { buffer.append(result.group(1)); // Does our engine know images? RenderEngine engine = context.getRenderContext().getRenderEngine(); String externalImage = ""; if (engine instanceof ImageRenderEngine) { buffer.append(((ImageRenderEngine) engine).getExternalImageLink()); } buffer.append(formatter.format(new Object[] { externalImage, result.group(2), Encoder.toEntity(result.group(2).charAt(0)) + result.group(2).substring(1) })); return; } }
public void handleMatch(StringBuffer buffer, MatchResult result, FilterContext context) { buffer.append(result.group(1)); // Does our engine know images? RenderEngine engine = context.getRenderContext().getRenderEngine(); String externalImage = ""; if (engine instanceof ImageRenderEngine) { buffer.append(((ImageRenderEngine) engine).getExternalImageLink()); } buffer.append(formatter.format(new Object[] { externalImage, result.group(2), Encoder.toEntity(result.group(2).charAt(0)) + result.group(2).substring(1) })); return; } }
RenderEngine engine = context.getRenderEngine();
RenderEngine engine = context.getRenderEngine();
RenderEngine engine = context.getRenderEngine();
public void execute(Writer writer, MacroParameter params) throws IllegalArgumentException, IOException { RenderContext context = params.getContext(); RenderEngine engine = context.getRenderEngine(); XWikiContext xcontext = ((XWikiRadeoxRenderEngine) engine).getXWikiContext();
RenderEngine engine = context.getRenderEngine();
RenderEngine engine = context.getRenderEngine();
RenderEngine engine = context.getRenderEngine();
RenderEngine engine = context.getRenderEngine();
public void execute(Writer writer, MacroParameter params) throws IllegalArgumentException, IOException { RenderContext context = params.getContext(); RenderEngine engine = context.getRenderEngine(); XWikiContext xcontext = ((XWikiRadeoxRenderEngine)engine).getXWikiContext(); XWikiDocument doc = xcontext.getDoc(); String className = params.get("text", 0); String result; if (className==null) result = doc.displayForm(doc.getFullName(), xcontext); else result = doc.displayForm(className, xcontext); writer.write(result); } }
@Override public void handleMatch(StringBuffer buffer, org.radeox.regex.MatchResult result, FilterContext context) RenderEngine engine = context.getRenderContext().getRenderEngine();
RenderEngine engine = context.getRenderEngine(); XWikiContext xcontext = ((XWikiRadeoxRenderEngine) engine).getXWikiContext(); XWikiDocument doc = xcontext.getDoc();
public void handleMatch(StringBuffer buffer, MatchResult result, FilterContext context) RenderEngine engine = context.getRenderContext().getRenderEngine();
public void handleMatch(StringBuffer buffer, MatchResult result, FilterContext context) RenderEngine engine = context.getRenderContext().getRenderEngine();
} else if (command.startsWith("!")) { RenderEngine engine = context.getRenderContext().getRenderEngine(); if (engine instanceof IncludeRenderEngine) { String include = ((IncludeRenderEngine) engine).include(command.substring(1));
XWikiContext xcontext = ((XWikiRadeoxRenderEngine) rcontext.getRenderEngine()).getXWikiContext(); VelocityContext vcontext = (VelocityContext) xcontext.get("vcontext"); XWikiDocument doc = xcontext.getDoc();
.getRenderEngine(); if (engine instanceof IncludeRenderEngine)
.getRenderEngine(); if (engine instanceof IncludeRenderEngine)
public String render(String content, XWikiDocument contentdoc, XWikiDocument contextdoc, XWikiContext context) { Util util = context.getUtil(); // Remove the content that is inside "{pre}" PreTagSubstitution preTagSubst = new PreTagSubstitution(util, isRemovePre()); content = preTagSubst.substitute(content); RenderContext rcontext = (RenderContext) context.get("rcontext"); if (rcontext == null) { rcontext = new BaseRenderContext(); // This is needed as otherwise some macros throw exceptions rcontext.setParameters(new HashMap()); rcontext.set("xcontext", context); } if (rcontext.getRenderEngine() == null) { XWikiRadeoxRenderEngine radeoxengine = new XWikiRadeoxRenderEngine(this.initialRenderContext, this.filterPipe, context); rcontext.setRenderEngine(radeoxengine); } // If global placeholders are not enabled, then use local placeholders. boolean useLocalPlaceholders = !Utils.arePlaceholdersEnabled(context); if (useLocalPlaceholders) { Utils.enablePlaceholders(context); } String result = rcontext.getRenderEngine().render(content, rcontext); if (useLocalPlaceholders) { result = Utils.replacePlaceholders(result, context); Utils.disablePlaceholders(context); } return preTagSubst.insertNonWikiText(result); }