I have some legacy code and I want to mark all of them and all of their methods @Deprecated
so that as we go and touch them we can remove these annotations so we can keep track of what has been modernized and what still is bad.
I am trying to use the Structural Search/Replace
and can't seem to get the correct template going.
Search Template
class $Class$ {
$ReturnType$ $MethodName$($ParameterType$ $Parameter$) { $Stmt$; }
}
Replace Template
@Deprecated
class $Class$ {
@Deprecated
$ReturnType$ $MethodName$($ParameterType$ $Parameter$) { $Stmt$; }
}
But this removes everything else that is in the class.
@Deprecated
class OldAndCrusty {
@Deprecated
( );
}
This strips off all the visibility modifiers and final modifiers of all the classes it matches.