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

fixes of issues 625/626 #632

Merged
merged 2 commits into from
Jul 13, 2018
Merged

fixes of issues 625/626 #632

merged 2 commits into from
Jul 13, 2018

Conversation

ybayk
Copy link

@ybayk ybayk commented Jul 12, 2018

Fixes of
#625
#626

When a method being completed has a trailing closure and CLOSURE_NOPARENS preference is set, the following behavior is honored:

  1. Regardless of CLOSURE_BRACKETS setting true or false, the proposed parameter for the trailing closure is going to be empty code block { } instead of { it } or argument name respectively.
  2. Trailing closure parameter does not take part in the parameter switching (the linked mode).
  3. For single-argument methods, the caret automatically moves inside the closure code block rather than to the end of replacement statement
  4. For multi-argument methods, quitting the linked mode moves the caret automatically inside the closure code block rather than to the end of replacement statement

Note that behavior stays the same as before:

  • for non-trailing closure parameters
  • when CLOSURE_NOPARENS is off
  • when closure completion is triggered by '{' character

@eric-milles eric-milles merged commit d1fd5ef into groovy:master Jul 13, 2018
@eric-milles
Copy link
Member

Looks great. I made some minor style edits. I'm going to close 603, 625 and 626. If you want an additional change, would you be available for chat on Slack?

@ybayk
Copy link
Author

ybayk commented Jul 13, 2018

Sure I am always on slack. Could you give me specific details on the channel to use?
By the way, I noticed that you work at Thomson Reuters. I used to be TR employee, was a part of IP & Science which got sold to private investors a year ago to form Clarivate Analytics.

@eric-milles
Copy link
Member

eric-milles commented Jul 23, 2018 via email

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

Successfully merging this pull request may close these issues.

2 participants