I'm trying to create a Live-Template in Android Studio, which will speed up the creation somewhat findViewById(...)
Some of this is self-learning, and some are curious about creating such lively patterns.
I want to be able to enter the following ...
Button find + (enter)
... and this should create something like this ...
Button btnAdd = (Button) findViewById(R.id.btnAddition);
My current implementation has problems ...


... and these problems are related to use completeSmart(). Whenever you use completeSmart(), the template ignores everything after this call and finishes editing.
, CAST named-variable ( ID), , ID . , , btnAddition. ...findViewById(R.id.);
CAST , ; completeSmart() ( $END$ - 29 ), .
, ...

... . , . ?
, ...
1) , Button, , Button. !