Is there a quick way to reorganize the entire codebase to accept another code agreement?

I got ownership of a code base that, although very well written, uses a rather strange convention:

public void someMethod(String pName, Integer pAge, Context pContext) 
{ 
    ... 
}

I would like to make the following two changes to the whole code:

public void someMethod(String name, Integer age, Context context) { ... }
  • Opening a parenthesis in the same line of a method declaration
  • Use the name camelCase for all method parameters without this weird prefix "p"

Can anyone help me here? I am looking, but I cannot find a way to rename all parameters in all method signatures to something more pleasant.

+4
source share
1 answer

Eclipse IDE, :

http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Fjava%2Fcodestyle%2Fref-preferences-formatter.htm

, , .


Eclipse regex.

> ... :

\b[p]([A-Z][a-z]+)\b

, . ...

\1

"" " ".

: , Eclipse \L , .


: , checkstyle - , , .

checkstyle ( '12)


, , , . .

java ? ( .10)

+3

All Articles