-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when renaming overridden method in enum constant #389
Comments
After #390 has been fixed, the exact same behaviour exists if |
By the way, when I work with this enum class, sometimes I get the following exception from Eclipse:
Any idea? |
I have a fix for that in testing. That is part of the reason this bug exists.
|
Be advised, renames originating from anonymous inner classes (and probably traits) are not working, but you should be able to rename if you navigate to the base class. And it may not get fixed for some time due to the complexity of moving Groovy model data into the Java model and then back again in this situation. |
I see. So, isn't it just a "if the method is an override, then perform the action on the overridden method"? |
|
Fixes ClassCastException: org.eclipse.jdt.internal.core.SourceType cannot be cast to org.eclipse.jdt.core.IMethod -- due to passing enclosing type instead of enclosing method during source visitation
Type hierarchy is not resolving. When it is available, rename will work. |
- supports rename refactor, type hierarchy, etc.
Ready to test |
Seems to work well in 3.1.0.xx-201809202224-e48, thank you! 👍 |
This was (in part) GRECLIPSE-1538.
Consider the following:
Now, select
getFoo
in eitherA
orB
definition and hit Ctrl+Shift+R to rename. Change it togetBar
and hit enter: the following error dialog is shown:However, if you issue the same refactoring from the base
getFoo()
declaration, it works correctly.The text was updated successfully, but these errors were encountered: