-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature request: immediately show selectors from "instance creation" after a class name #34
Comments
afaik this is already done at the moment? See I would be careful when making heuristic assumptions such as "'instance creation' selectors are most popular". Other users might use classes for other things - for example, I am using But some preferences for the behavior you propose might be interesting :) |
Well, afaik no completion ever pops up before typing at least one character. Moreover, I could not find my sought constructor after typing "o" because "on:withName:" did not even make it on the first page of the proposal. |
Unless you press space :-)
I can reproduce this. We already have some type-guessing logic, but the prioritization logic appears not to respect it, it only performs fuzzy matching. @MrModder Are we on the right track? Did you already have any plans to enhance this? |
Never saw that happen. Opening a new workspace, typing ToolBuilder<space>, nothing happens regarding Autocompletion. Pressing space a few more times also does not bring it up. |
Aw, sorry, I meant |
Cmd-space extends the text selection (word, line, in brackets, etc). Does not list anything useful for my described use case though. Only the variables of the receiver class. |
Well, I confused the preferences :-) |
Suggesting methods from the However, I am currently not using Squeak in my day to day work and don't have the time to implement a feature like that. If any of you want to create a PR for this, I'd of course be happy to review and merge it. Keep in mind performance considerations of adding another metric though. The Autocompletion can already take quite a while to open up, adding another weight function is likely to increase that time even further. So at least making it an option would be an absolute necessity. |
Maybe we should also provide a hook to overwrite weighs by a certain model. See also Create new trait in Browser. |
As a developer, when I type a concrete class name and press space, I would like to see the selectors from the "instance creation" protocol (class side) proposed immediately. It would save me opening a browser, selecting the class side, and looking up the names of those methods because I often forget them.
The more specific methods (further down in the class hierarchy), specialized constructors, should come first, then the more general ones. Proposing the constructors from Object (#new, #new:, #newFrom:) is obviously not so important. You could investigate about not showing the proposal if there are no specialized constructors.
More generally, all methods from the class side could be proposed immediately. But constructor selectors are probably the most common continuation after a class name.
The text was updated successfully, but these errors were encountered: