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

Fix FixCorrectionProposal to properly handle IMultiFix cleanups #829

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

jjohnstn
Copy link
Contributor

  • new split of proposals into jdt.core.manipulation changed the computeNumberOfFixesForCleanUp() method to be passed an ICleanUpCore that is wrappered to be an ICleanUp but this code looks for an IMultiFix which gets lost in wrapping
  • change computeNumberOfFixesForClean() to use the fCleanUp field that is already stored and is an ICleanUp
  • fix getCleanUp() to return fCleanUp
  • fix AbstractAnnotationHover.createCompletionProposalsList() to just call proposal.getCleanUp() and don't do any wrapping

What it does

Fixes regression so multiple NLS fixes will be offered for the whole file.

How to test

See issue.

Author checklist

- new split of proposals into jdt.core.manipulation changed the
  computeNumberOfFixesForCleanUp() method to be passed an ICleanUpCore
  that is wrappered to be an ICleanUp but this code looks for an
  IMultiFix which gets lost in wrapping
- change computeNumberOfFixesForClean() to use the fCleanUp field
  that is already stored and is an ICleanUp
- fix getCleanUp() to return fCleanUp
- fix AbstractAnnotationHover.createCompletionProposalsList() to
  just call proposal.getCleanUp() and don't do any wrapping
@jjohnstn jjohnstn self-assigned this Sep 25, 2023
@jjohnstn jjohnstn added the regression Regression defect label Sep 25, 2023
@jjohnstn jjohnstn added this to the 4.30 M1 milestone Sep 25, 2023
@jjohnstn jjohnstn merged commit 31839df into eclipse-jdt:master Sep 25, 2023
7 checks passed
@jjohnstn jjohnstn deleted the nlsregression branch September 25, 2023 21:57
jjohnstn added a commit to jjohnstn/eclipse.jdt.ui-1 that referenced this pull request Sep 27, 2023
jjohnstn added a commit that referenced this pull request Sep 28, 2023
* Revert "Mark newly split packages with mandatory directives (#833)"

This reverts commit cd6cf28.

* Revert "Javadoc error fix for CUCorrectionProposal.setDelegate()"

This reverts commit 819ec65.

* Revert "Fix FixCorrectionProposal to properly handle IMultiFix cleanups (#829)"

This reverts commit 31839df.

* Revert "Add back some missing methods to FixCorrectionProposal (#827)"

This reverts commit 6f79122.

* Revert "Proposals branch (#815)"

This reverts commit 816a5d2.

- fixes #835
jjohnstn added a commit to jjohnstn/eclipse.jdt.ui-1 that referenced this pull request Sep 29, 2023
…pse-jdt#829)

- new split of proposals into jdt.core.manipulation changed the
  computeNumberOfFixesForCleanUp() method to be passed an ICleanUpCore
  that is wrappered to be an ICleanUp but this code looks for an
  IMultiFix which gets lost in wrapping
- change computeNumberOfFixesForClean() to use the fCleanUp field
  that is already stored and is an ICleanUp
- fix getCleanUp() to return fCleanUp
- fix AbstractAnnotationHover.createCompletionProposalsList() to
  just call proposal.getCleanUp() and don't do any wrapping
robstryker pushed a commit to robstryker/eclipse.jdt.ui that referenced this pull request Oct 4, 2023
…pse-jdt#829)

- new split of proposals into jdt.core.manipulation changed the
  computeNumberOfFixesForCleanUp() method to be passed an ICleanUpCore
  that is wrappered to be an ICleanUp but this code looks for an
  IMultiFix which gets lost in wrapping
- change computeNumberOfFixesForClean() to use the fCleanUp field
  that is already stored and is an ICleanUp
- fix getCleanUp() to return fCleanUp
- fix AbstractAnnotationHover.createCompletionProposalsList() to
  just call proposal.getCleanUp() and don't do any wrapping
robstryker pushed a commit to robstryker/eclipse.jdt.ui that referenced this pull request Oct 9, 2023
…pse-jdt#829)

- new split of proposals into jdt.core.manipulation changed the
  computeNumberOfFixesForCleanUp() method to be passed an ICleanUpCore
  that is wrappered to be an ICleanUp but this code looks for an
  IMultiFix which gets lost in wrapping
- change computeNumberOfFixesForClean() to use the fCleanUp field
  that is already stored and is an ICleanUp
- fix getCleanUp() to return fCleanUp
- fix AbstractAnnotationHover.createCompletionProposalsList() to
  just call proposal.getCleanUp() and don't do any wrapping
robstryker pushed a commit to robstryker/eclipse.jdt.ui that referenced this pull request Oct 9, 2023
…pse-jdt#829)

- new split of proposals into jdt.core.manipulation changed the
  computeNumberOfFixesForCleanUp() method to be passed an ICleanUpCore
  that is wrappered to be an ICleanUp but this code looks for an
  IMultiFix which gets lost in wrapping
- change computeNumberOfFixesForClean() to use the fCleanUp field
  that is already stored and is an ICleanUp
- fix getCleanUp() to return fCleanUp
- fix AbstractAnnotationHover.createCompletionProposalsList() to
  just call proposal.getCleanUp() and don't do any wrapping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant