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

Making inline refactoring's confirmation message more clear #11006

Conversation

carolahp
Copy link
Contributor

Fixes #10994 .
This solution improves the confirmation message for user's clarity.
The refactoring is working well and the buttons 'yes' and 'no' do their job, but this is hard to see because the inline refactoring formats the code, making it hard for the user to see the difference between the two options

refactoring setOption: #inlineExpression toUse: [ :ref :aString | self confirm: ('Do you want to inline the expression ''<1s>'' in the current method?' expandMacrosWith: aString) ] .
refactoring setOption: #inlineExpression toUse: [ :ref :aString |
(self confirm: ('Do you want to extract the expression ''<1s>'' into a variable in method ''',
ref sourceSelector,''' ?' expandMacrosWith: aString)) not ] .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem, should use expandMacros

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed a fix

refactoring setOption: #inlineExpression toUse: [ :ref :aString | self confirm: ('Do you want to inline the expression ''<1s>'' in the current method?' expandMacrosWith: aString) ] .
refactoring setOption: #inlineExpression toUse: [ :ref :aString |
(self confirm: ('Do you want to extract the expression ''<1s>'' into a variable in method ''',
ref sourceSelector,''' ?' expandMacrosWith: aString)) not ] .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem, should use expandMacros

@tesonep tesonep merged commit be26660 into pharo-project:Pharo10 Mar 17, 2022
@carolahp carolahp deleted the 10994-inline-senders-refactor-not-working branch March 17, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline senders refactor is not working with multiple parameters
3 participants