Skip to content
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

Add quick fixes for problems relating to sealed classes. #2265

Merged

Conversation

rgrunber
Copy link
Contributor

@rgrunber rgrunber commented Oct 7, 2022

This takes advantage of the refactorings done in eclipse-jdt/eclipse.jdt.ui#288 & eclipse-jdt/eclipse.jdt.ui#294.

quick-fix-permit-subtype-for-sealed-class

declare-as-superclass-of-permitted

Signed-off-by: Roland Grunberg rgrunber@redhat.com

@rgrunber rgrunber marked this pull request as draft October 7, 2022 20:11
@rgrunber rgrunber force-pushed the permit-subtype-in-sealed-class branch 2 times, most recently from fcc376b to 3ee93e1 Compare October 19, 2022 23:11
@rgrunber rgrunber marked this pull request as ready for review October 20, 2022 03:11
@rgrunber
Copy link
Contributor Author

re-test this please.

1 similar comment
@rgrunber
Copy link
Contributor Author

re-test this please.

@rgrunber
Copy link
Contributor Author

rgrunber commented Oct 20, 2022

Looks like updating the TP somehow disturbs the order of MoveHandlerTests#testMoveMultiFiles. I'll have to fix this here before merging. It seems really inconsistent though.

@rgrunber rgrunber force-pushed the permit-subtype-in-sealed-class branch from 3ee93e1 to b08c6f4 Compare October 21, 2022 15:59
- Add quick-fix for permitting subtype of a sealed class.
- Add quick-fix for inheriting from a permitting sealed class/interface.
- Add test cases
- Fix MoveHandlerTest#testMoveMultiFiles to avoid relying on order of
  text edits for separate files

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@rgrunber rgrunber force-pushed the permit-subtype-in-sealed-class branch from b08c6f4 to f5e40e1 Compare October 21, 2022 18:57
@rgrunber rgrunber merged commit 716faa3 into eclipse-jdtls:master Oct 21, 2022
@rgrunber rgrunber changed the title Add quick-fix for permitting subtype of a sealed class. Add quick fixes for prob lems relating to sealed classes. Oct 21, 2022
@rgrunber rgrunber deleted the permit-subtype-in-sealed-class branch October 21, 2022 19:25
@rgrunber rgrunber added this to the End October milestone Oct 25, 2022
@rgrunber rgrunber changed the title Add quick fixes for prob lems relating to sealed classes. Add quick fixes for problems relating to sealed classes. Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant