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 assist to convert if/else if/else pattern instanceof to switch #1978

Open
jjohnstn opened this issue Jan 24, 2025 · 0 comments · May be fixed by #1980
Open

Add quick assist to convert if/else if/else pattern instanceof to switch #1978

jjohnstn opened this issue Jan 24, 2025 · 0 comments · May be fixed by #1980
Assignees
Labels
enhancement New feature or request noteworthy Noteworthy feature
Milestone

Comments

@jjohnstn
Copy link
Contributor

This complements the new cleanup that converts such if blocks to switch statements/switch expressions. See #1919

@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 added a commit to jjohnstn/eclipse.jdt.ui-1 that referenced this issue Jan 24, 2025
- 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 linked a pull request Jan 24, 2025 that will close this issue
3 tasks
@jjohnstn jjohnstn moved this to Pending review in Java Tooling Jan 24, 2025
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 a pull request may close this issue.

1 participant