Skip to content

I20210723-1800

@jjohnstn jjohnstn tagged this 23 Jul 19:20
- make PullUpRefactoringProcessor.checkFinalFields() method protected
  so it can be overridden
- add new checkFinalFields() method to ExtractSupertypeProcessor
  that doesn't do anything and succeeds
- add new code to ExtractSupertypeProcessor.createNecessaryConstructors
  method to keep track of any uninitialized non-static final fields
  that are being moved and to modify the constructors to pass and
  set these fields
- add new fixConstructorsWithFinalFieldInitialization to modify
  any constructors in the original type that initialize final fields
  that are moved to add the field arguments to a super constructor
  and remove any statements that set the fields
- add new tests to ExtractSupertypeTests and add support for
  extracting fields as well as methods

Change-Id: I9592e0d9a01d764531a88837cdb7a04ac23b30f0
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/183208
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
Assets 2
Loading