Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

AdT Code-Templates - using them without ${word_selection} ?

joachimrees1
Active Contributor
0 Likes
1,289

I'd like an "insert only" template, but have the following problems:

1. If nothing is highlighted, CTRL-+space does nothing.

2. If I do highlight e.g. an empty line, I get the template list, however, templates that don't contain the ${word_selection} don't show up there.

I worked around this by putting ${word_selection} at the start of my template, but I really have the feeling that I might be using the wrong tool for my task...

is that the case? What would be a better Tool?

Thanks

Joachim

1 ACCEPTED SOLUTION
Read only

Armin_Beil
Product and Topic Expert
Product and Topic Expert
1,022

Hi Joachim,

to use code templates that are not surrounding a selection but instead are entering something completely new you can do it this way:

Start typing the name of the template (first 2-3 characters) just as if it was code and press ctrl-space. This should bring up the list of suggestions that also contains templates. Once a template is chosen the previously entered characters (beginning of template name) are replaced with the content of the template.

Best regards,
Armin

3 REPLIES 3
Read only

joachimrees1
Active Contributor
0 Likes
1,022

Sorry, the Initial lines where missing: (and I cant Edit because of "

An Internal error has occurred and we are sorry for the inconvenience.")

I read Thomas' Blog on Code-Templates, and I do get an idea iof how powerfull the are.

However, they seem mainly be made for "surrounding" one's code, right?

Read only

Armin_Beil
Product and Topic Expert
Product and Topic Expert
1,023

Hi Joachim,

to use code templates that are not surrounding a selection but instead are entering something completely new you can do it this way:

Start typing the name of the template (first 2-3 characters) just as if it was code and press ctrl-space. This should bring up the list of suggestions that also contains templates. Once a template is chosen the previously entered characters (beginning of template name) are replaced with the content of the template.

Best regards,
Armin

Read only

0 Likes
1,022

Hey Armin,

ok, that works fine!

Thanks!

Joachim