Let me reduce "good ide" to IntelliJ or Eclipse if that helps.
By "formal grammar" I mean that both Eclipse and IntelliJ have full Java parsers. So they can successfully rename a method on an interface, all its implementations and all its uses. This can be done if and only if the tool can correctly identify which text symbols represent a class, interface, variable declaration and method invocation, and further it can infer the type the variable in a method invocation using information from that variables declaration, even though it may be in another file.
That needs a parser. So you are correct in that you don't have to write a formal grammar to do it. You can hand role your parser. I used "formal grammar" to imply a level of complexity. Does vim have a tool of such complexity?