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

Parenthesis around autocompleted keyword message after a keyword message #2635

Closed
jecisc opened this issue Feb 18, 2019 · 4 comments
Closed
Labels

Comments

@jecisc
Copy link
Member

jecisc commented Feb 18, 2019

Migrated case from Manuscript.

Original case: https://pharo.fogbugz.com/f/cases/19419
Status: Work Needed
Project: Usability
Original Author: CyrilFerlicot
Date: 2 December 2016 3:35:18 pm

Description:

I am not sure this is wanted in all cases but I think this feature can be cool:

The idea is to check when we auto complete a method if this method come after another keyword. In that case it should be surrounded by parenthesis in most cases.

For example if I want to add to a collection an element I will call the method #add:. But if I want to add the result of another method, and this method is a keyword it will not be valid.

self add: aCollection collect: #something

To be valid we need parenthesis

self add: (aCollection collect: #something)

Maybe Pharo can be smart and directly add those parenthesis. :)

@macta
Copy link
Contributor

macta commented Feb 20, 2019

Thats a cool idea - I had been thinking about ways to select the correct code afterward (like cmd-2) so you could add the brackets easily - but its tricky that way because its hard to differntiate which nodes to highlight. In this suggestion you can infer that right after completion.

@stale
Copy link

stale bot commented Aug 19, 2019

To limit bug bankruptcy (see https://www.joelonsoftware.com/2012/07/09/software-inventory/) this issue has been automatically marked as stale because it has not had any activity in 6 months. It will be closed in 1 month if no further activity occurs. If this issue remains important to you, please comment to reactivate the issue. Thank you for your contributions.

Joel on Software
Imagine, for a moment, that you came upon a bread factory for the first time. At first it just looks like a jumble of incomprehensible machinery with a few people buzzing around. As your eyes adjus…

@stale stale bot added the stale label Aug 19, 2019
@macta
Copy link
Contributor

macta commented Aug 19, 2019

I’m still very interested in improving this.

It occurs to me however, that sometimes I want to re-autocomplete on a multi-keyword message (eg : #select:thenCollect: if I originally completed on #select: and want to add the second keyword).

I think it’s still possible given the idea above - if the new completion matches a multi keyword do that second keyword completion, otherwise add the bracket and complete as suggested

@stale stale bot removed the stale label Aug 19, 2019
@guillep
Copy link
Member

guillep commented Jan 27, 2023

This is a pretty big "issue", not easily actionable, more like a big feature project.
But if nobody actively works on it, it would be nicer to move it maybe to a wiki page with project ideas.

@guillep guillep closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants