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 new quick assist for pattern instanceof if chain to switch #1980

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

jjohnstn
Copy link
Contributor

What it does

See issue.

How to test

See new tests.

Author checklist

- modify PatternInstanceofToSwitchFixCore to add new static
  method createPatternInstanceofToSwitchFix()
- add new code to QuickAssistProcessor that looks to see if the
  cursor is in an if chain and see if it is using pattern instanceof
  and can be converted to switch
- add new test AssistQuickFixTest21
- fixes eclipse-jdt#1978
@jjohnstn jjohnstn self-assigned this Jan 24, 2025
@jjohnstn jjohnstn added enhancement New feature or request noteworthy Noteworthy feature labels Jan 24, 2025
@jjohnstn jjohnstn added this to the 4.35 M3 milestone Jan 24, 2025
@jjohnstn
Copy link
Contributor Author

Failed test is random failure and works fine locally.

@jjohnstn jjohnstn merged commit d76582e into eclipse-jdt:master Jan 27, 2025
7 of 10 checks passed
@jjohnstn jjohnstn deleted the patternassist branch January 27, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request noteworthy Noteworthy feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add quick assist to convert if/else if/else pattern instanceof to switch
1 participant