Is there an easy way to capture types? I can't seem to do basic things like use variable expressions side by side, such as $mapType$$mapEnd$
to do a simple replacement. Is there any reason this might be? That is, if I have a single expression, say .*\s*.*abc
, and I break it into two variables, .*\s*
and .*abc
, the expression does not match any text. What could be going wrong?
Example template:
$var1$ = $impl$
Example second template:
$var1$ = $type$$implEnd$
If $impl$
is a full regular expression, placing $type$
and $implEnd$
together with half of the matching regex causes patterns not to match. What could be going wrong?
I'm trying to do this transformation:
List<String,Object> list = new ArrayList<String,Object>();
List<String,Object> list = Lists.newArrayList();
Clearly, I need to capture "Array" somehow, as well as only those types which have no arguments.