It doesn't look like live templates give the power to take $SELECTION$
and parse the selection for linebreaks so that you can go from selecting
the following:
select * from customer
where customer_id > 1
and deleted = 0
and transforming to the following:
"select * from customer "+
"where customer_id > 1 "+
"and deleted = 0 "
I guess JetBrains would have to implement using 'Code>Surround With' or
have to increase the power of live templating.
Jon Steelman wrote:
> I don't see a way to take a pasted in series of unquoted lines and make
> them a String expression-- to Stringify the text. Did I overlook this
> feature in IDEA? An example is after you work up a piece of SQL that you
> finish testing with direct execution (such as with SQLViewer!), and then
> you have the lines (example raw SQL below) that you want to make into a
> legitimate String expression for JDBC. Before I file a feature request,
> I'd like to know what folks think would be the best way to do this and
> where it would fit most naturally-- a live template by parsing through
> $SELECTION$, a new "Code > Surround With" option, some other approach?
>
> Thanks,
> Jon
>
>
> select a.customer_entity_id, customer_name, license_begin, license_end,
> (select
> count( *)
> from vw_customer_rep
> x
> where a.customer_entity_id = x.customer_entity_id
> and exists
> (select
> null
> from user_account
> y
> where x.user_account_id = y.user_account_id
> and y.deleted <> '1') ) as customer_rep_count
> from customer
> a,
> customer_license
> b
> where a.customer_entity_id = b.customer_entity_id
> order by
> customer_name
>
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features