Are there any plugins in eclipse based IDEs which can suggest a better way to refactor any particular statement (in Java), for example
Let's say you have the following code:
if ( someString.equals("whatImLookingFor") ) {
}
The plugin should offer to flip the equals to:
if ( "whatImLookingFor".equals( someString ) ) {
}
Such that, this helps in enforcing better coding practices
As per the one of the suggestions given below by @Peter Lawrey, it was possible in IntelliJ Idea IDE through Flip Commutative Method call, which as I searched was part of Intentions Power Pack plugins from Jetbrains (back in 2004).
Is there any equivalent of this plugin in Eclipse ?
Version of IDE I searched for plugin is : IBM Rational Software Architect 9.6.1, but nothing relevant was found