I tried reproducing (Win2k sp1, IDEA 637) what you want by copying the soutm template, and pasting in the text I suggested in my previous message. I then when to my editor, typed the abbreviation, hit TAB, and it expanded correctly and placed the cursor in the try block. I then tried typing something and that worked correctly as well.
Do you have "Skip if Defined" checked for the $CLASS_NAME$ and $METHOD_NAME$ variables? You should. Otherwise, IDEA will walk you through each variable so you can define them before finally placing the cursor at the $END$ marker. chris "Daniel Rabe" <[EMAIL PROTECTED]> wrote in message ahplsu$3h1$[EMAIL PROTECTED]">news:ahplsu$3h1$[EMAIL PROTECTED]... > Thanks, that helped a lot! > > I would argue that there's still a bug in there somewhere (related to #2), > since what I type is going somewhere other than where the cursor is > positioned. > > "Chris Bartley" <[EMAIL PROTECTED]> wrote in message > ahninq$qhm$[EMAIL PROTECTED]">news:ahninq$qhm$[EMAIL PROTECTED]... > > First, change your template text to: > > > > try > > { > > $END$ > > } > > catch ( Throwable ex ) > > { > > System.out.println("$CLASS_NAME$.$METHOD_NAME$"); > > } > > > > ...that should fix your second problem. Next, to fix the first problem, > > click on the "Edit variables" button (it's immediately below the text area > > where you edit your template text) and add "className()" for the > Expression > > for CLASS_NAME and "methodName()" for the Expression for METHOD_NAME (you > > can right-click in the Expression area for a listing of all possible > > expression functions). > > > > An alternate (and perhaps easier) way of doing all this would be to just > > copy the soutm template by selecting the soutm template and then clicking > on > > the "Copy..." button to the right of the Live Templates listing--that'll > > duplicate soutm and you can then just modify it for your needs. > > > > Hope that helps. > > > > chris > > > > > > "Daniel Rabe" <[EMAIL PROTECTED]> wrote in message > > ahnbpj$lhu$[EMAIL PROTECTED]">news:ahnbpj$lhu$[EMAIL PROTECTED]... > > > I have a live template whose template text is as follows (I based it on > > the > > > built-in "soutm" template): > > > > > > try > > > { > > > } > > > catch ( Throwable ex ) > > > { > > > System.out.println("$CLASS_NAME$.$METHOD_NAME$"); > > > } > > > > > > Two problems: > > > > > > First, the class name and method name don't get filled in (they *do* if > I > > > use "soutm" in the same context). > > > > > > Second, after the template expands, I click just after the "{" of the > > "try", > > > and hit Enter. I expect to get a new line inside the try block. Instead, > > > everything after the try gets indented and the cursor is repositioned > > inside > > > the println(). > > > > > > > > > > > > > > > _______________________________________________ Eap-bugs mailing list [EMAIL PROTECTED] http://lists.jetbrains.com/mailman/listinfo/eap-bugs
