You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DongChunHao This move is a textual move which means it is a cut/paste operation without checking hierarchy, implementers, etc... I have created a patch that will restrict moving an interface method to anything other than another interface (something a user may reasonably want to do). IMO, this is a reasonable check as moving such a method declaration anywhere else makes no sense. As mentioned, there is no additional checking done (e.g. verifying that there aren't any implementers out there that will be broken when the method is moved).
jjohnstn
added a commit
to jjohnstn/eclipse.jdt.ui-1
that referenced
this issue
May 16, 2024
- fix
ReorgPolicyFactory.MoveSubCuElementsPolicy.validateDestination() to
restrict moving an interface member to anything other than another
interface
- add new test to MoveMemberTests
- fixeseclipse-jdt#1299
- fix
ReorgPolicyFactory.MoveSubCuElementsPolicy.validateDestination() to
restrict moving an interface member to anything other than another
interface
- add new test to MoveMemberTests
- fixes#1299
move interfaceMethod() to MyClass to classes causes compilation errors
interface MyInterface {
// move interfaceMethod() to MyClass;
void interfaceMethod();
}
class MyClass implements MyInterface {
}
Refactoring results:
The text was updated successfully, but these errors were encountered: