Community
Participate
Working Groups
Build Identifier: The initial implementation of pull-out refactoring does not support pulling out of abstract / interface methods. When such methods are being pulled out, they will cause compile errors in the resulting code. A way to handle this case could be as follows: - provide an option in the wizard to enable/allow pulling abstract methods - if the option is not enabled report an error/warning when abstract methods are selected for pull-out. - if the option is enabled, do not report an error, but pull the method out, removing the abstract keyword and provide a stub implementation in the refactored code. Reproducible: Always
Created attachment 175106 [details] Patch: implementing this feature + tests I'm attaching a patch that imlements pulling out support for abstract and interface methods. Does the following: a) when we do not select the "generate abstract method stubs" option - produce warnings for any abstract or interface methods - if you refactor anyway - ads abstract+public keyword to interface methods that don't already have it - create an "abstract" itd that will cause compile errors that user can then look at and address. b) when we *do* select generate abstract method stubs - removes abstract keyword - adds a method stub that throws an Error when called
Created attachment 175107 [details] Update: remove some dead/unused code from previous patch
Patch is applied and committed. It looks like this bug should be closed. No?
Yes. Thanks for committing the patch
Reopening. It looks like my patch contained a broken test case. Something must have gone wrong when I created the patch, it seems to contain an older, broken version of the testcase from my local history. I'm attaching a patch that fixes the test case.
Created attachment 175162 [details] Fixes a broken test case
Patch is applied.
committed.