handy things

From: Mike Schrag (mschra..dimension.com)
Date: Sat Mar 03 2007 - 07:29:15 EST

  • Next message: Mike Schrag: "wo tips"

    Kieran just posted about templates on his blog ( http://
    homepage.mac.com/kelleherk/iblog/C1281128591/E20070302212710/
    index.html ), but he doesn't allow comments, so I'll just use
    woproject as a blog comment :)

    I can't recall if i posted my sop template here before, but I love
    this one:
    name = sop
    context = java
    System.out.println("${enclosing_type}.${enclosing_method}: ${cursor}");

    (note there's a newline after that)
    So when you just want a quick debug line, you do sop<complete> and it
    will make a
    System.out.println("TheClassYourAreIn.theMethodYouAreIn: <cursor>

    I also have
    name = attr
    context = java
    System.out.println("${enclosing_type}.${enclosing_method}: ${name} =
    " + ${name});

    this is similar except you often want to just print out a variable or
    method, so this one automatically drops into into editing a templated
    variable and it changes in both places as you type (so it prints out
    the name of what you are printing as you type it -- like cmd-2 r).

    Kieran also mentioned a shortcut for the <webobject> tag ... If
    you're using wonder, you can also turn on the inline binding parser
    in Wonder with:

    ognl.helperFunctions=true
    ognl.inlineBindings=true

    (well that turns on inline bindings AND helpers, but both are cool)
    which gives you <wo name = "Whatever"></wo> which saves hundreds of
    virtual trees as well as things like <wo:if condition =
    "$whatever">...</wo>.

    ms



    This archive was generated by hypermail 2.0.0 : Sat Mar 03 2007 - 07:31:31 EST