Examples of RewriterContext


Examples of org.jruby.ast.visitor.rewriter.utils.ReWriterContext

 
  protected final ReWriterContext config;
  protected final ReWriterFactory factory;
 
  public ReWriteVisitor(Writer out, String source) {
    this(new ReWriterContext(new PrintWriter(out), source, new DefaultFormatHelper()));
  }
View Full Code Here

Examples of org.jruby.ast.visitor.rewriter.utils.ReWriterContext

  public ReWriteVisitor(Writer out, String source) {
    this(new ReWriterContext(new PrintWriter(out), source, new DefaultFormatHelper()));
  }

  public ReWriteVisitor(OutputStream out, String source) {
    this(new ReWriterContext(new PrintWriter(out, true), source, new DefaultFormatHelper()));
  }
View Full Code Here

Examples of org.jruby.ast.visitor.rewriter.utils.ReWriterContext

    return createCodeFromNode(node, document, new DefaultFormatHelper());
  }
 
  public static String createCodeFromNode(Node node, String document, FormatHelper helper){
    StringWriter writer = new StringWriter();
    ReWriterContext ctx = new ReWriterContext(writer, document, helper);
    ReWriteVisitor rewriter = new ReWriteVisitor(ctx);
    rewriter.visitNode(node);
    return writer.toString();
  }
View Full Code Here

Examples of ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter.RewriterContext

   */
  @Override
  protected String replaceImageUrl(final String cssUri, final String imageUrl) {
    //Can be null when using standalone context.
    final String contextPath = context.getRequest() != null ? context.getRequest().getContextPath() : null;
    final RewriterContext rewriterContext = new RewriterContext().setAggregatedFolderPath(
        context.getAggregatedFolderPath()).setProxyPrefix(getUrlPrefix()).setContextPath(contextPath);

    return new ImageUrlRewriter(rewriterContext).rewrite(cssUri, imageUrl);
  }
View Full Code Here

Examples of ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter.RewriterContext

    assertEquals(0, Context.countActive());
  }

  @Before
  public void setUp() {
    context = new RewriterContext();
    context.setProxyPrefix(DEFAULT_PREFIX);
    context.setContextPath(DEFAULT_CONTEXT_PATH);
    victim = new ImageUrlRewriter(context);
  }
View Full Code Here

Examples of ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter.RewriterContext

    victim = new ImageUrlRewriter(context);
  }

  @Test(expected = NullPointerException.class)
  public void cannotAcceptNullProxyPrefix() {
    final RewriterContext context = new RewriterContext();
    context.setContextPath(DEFAULT_CONTEXT_PATH);
    new ImageUrlRewriter(context);
  }
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.