Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Java template within a string
Java template within a string [message #300574] Sun, 12 March 2006 23:58 Go to next message
Eclipse UserFriend
Originally posted by: relaxedrob.remove.this.optusnet.com.au

Hi All,

I use WSAD 5.1 at work and I have the following Java template (Windows >
Preferences > Java > Editor > Templates) defined:

[" + ${cursor} + "]

This is great for me to break up a string easily and insert some
variable.. It provides a shortcut for doing something like this:

System.println("Value of x is [" + x + "].");

My problem is that under Eclipse 3.1.1, I can't use Java templates from
within a string anymore! Is this something I can control with a setting
somewhere? It is a shame to drop this template just cos' I am in a string!

Any help most appreciated!

Rob
:)
Re: Java template within a string [message #300599 is a reply to message #300574] Mon, 13 March 2006 11:03 Go to previous message
Eclipse UserFriend
Templates are not available in strings. However, you can do what you
want by using "Quick Assist": select the string you want to extract and
press Ctrl+1, then choose "Pick out selected part of the string".

-tom

Robert Mark Bram wrote:
> Hi All,
>
> I use WSAD 5.1 at work and I have the following Java template (Windows >
> Preferences > Java > Editor > Templates) defined:
>
> [" + ${cursor} + "]
>
> This is great for me to break up a string easily and insert some
> variable.. It provides a shortcut for doing something like this:
>
> System.println("Value of x is [" + x + "].");
>
> My problem is that under Eclipse 3.1.1, I can't use Java templates from
> within a string anymore! Is this something I can control with a setting
> somewhere? It is a shame to drop this template just cos' I am in a string!
>
> Any help most appreciated!
>
> Rob
> :)
>
Previous Topic:Unused imports are not reported correctly by 3.1.2
Next Topic:Avoid duplicate menu items
Goto Forum:
  


Current Time: Fri Sep 12 01:52:21 EDT 2025

Powered by FUDForum. Page generated in 0.03819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top