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

Better expose the feature: Invert condition #1230

Closed
jdneo opened this issue Oct 23, 2019 · 0 comments · Fixed by #1231
Closed

Better expose the feature: Invert condition #1230

jdneo opened this issue Oct 23, 2019 · 0 comments · Fixed by #1231

Comments

@jdneo
Copy link
Contributor

jdneo commented Oct 23, 2019

Currently the Invert Condition refactoring can only be triggered if the user selects a valid boolean expression, which is not very convenient to use.

We can better expose it actually:

  • If the selection in context is more than 0, we follow the current implementation.
  • If the selection in context is 0, we can try to find the highest boolean expression node in the AST Tree which contains the covering node.

I can send out a PR for this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants