I created a structured search and replace, using this search string:
protected $FieldType$ $FieldName$;
and this replace string:
private $FieldType$ $FieldName$;
to replace, for example, this:
@Autowired
protected JdbcTemplate jdbcTemplate;
with:
@Autowired
private JdbcTemplate jdbcTemplate;
However, the result is this:
private JdbcTemplate jdbcTemplate;
That is, the annotation goes away. How do I avoid this? The code base has many protected fields with various annotations, and I want to leave them untouched whatever they are.