I am trying to use the Structural Replace to mark all closed fields as warnings, and then suggest replacing them with protected fields. (I know that many people may not agree with my choice of protection levels, but this is a separate issue)
I have the following:
class $Class$ { @Modifier("private") $FieldType$ $FieldName$ = $Init$; }

In the "Edit Variables ..." section, I have a "FieldName" for "This variable is a search object."
This correctly allocates variables marked as private. However, the replacement proposal is completely wrong:

How can I change my structural replacement options to suggest making field protection?
UPDATE
I changed the search / replace strings to the following, which work much better:

This allows me to replace field definitions such as private int foo=1 with protected int foo=1 . However, it does not work with private static final int foo=1 , which it replaces with protected int foo=1 Any suggestions?
source share