Suggestion: expandAbbreviation could cancel auto completion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Suggestion: expandAbbreviation could cancel auto completion

Steve Alan Waring
Hi Andy and Blair,

I use Joseph Pelrine's very handy Abbreviations package a fair bit. By
habit I have found myself expanding an abbreviation and then
immediately replacing it by inadvertently choosing an auto completion.

Since they are complementary systems, could
SmalltalkWorkspace>>expandAbbreviation be modified to send
#cancelAutoCompletion?

Thanks,
Steve
--
Steve Waring


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: expandAbbreviation could cancel auto completion

Blair McGlashan-4
<[hidden email]> wrote in message
news:[hidden email]...

> Hi Andy and Blair,
>
> I use Joseph Pelrine's very handy Abbreviations package a fair bit. By
> habit I have found myself expanding an abbreviation and then
> immediately replacing it by inadvertently choosing an auto completion.
>
> Since they are complementary systems, could
> SmalltalkWorkspace>>expandAbbreviation be modified to send
> #cancelAutoCompletion?
>

Yes, it will be in the next patch.

I did originally intend to integrate abbreviations into the autocompletion
mechanism so that the abbreviations appeared in the auto-completion list,
but it didn't make the cut.

Thanks Steve, and regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: expandAbbreviation could cancel auto completion

Steve Alan Waring
Hi Blair,

> I did originally intend to integrate abbreviations into the autocompletion
> mechanism so that the abbreviations appeared in the auto-completion list,
> but it didn't make the cut.

This would be nice!

Wandering a bit off topic:

I have abbreviations setup for things like 'cc' => 'createComponents
super createComponents.' , 'ovo' => 'onViewOpened super onViewOpened.'
, csw => ... etc etc. I think cases like these are always going to be
faster as abbreviations than auto completion.

I have been able to retire a few of my abbreviations in favor of auto
completion, but for example:  'ds' => 'displayString' is still faster
than auto completion, for which you have to almost type the full
selector before it is selected.

A recent post by TimM about Eclipse/IntelliJ in the "Home key doesn't
work in method search box" thread, made me realize that most of my
abbreviations (and a fair proportion of the default abbreviations) are
the "camel humps" ie the first character of a selector and the
subsequent capitals.

In addition to Tim's idea of using the "camel humps" to find classes
...  autocompletion based on the selector's first character + capitals
might be a fast way to get to selectors with common prefixes like;
'create*' , 'add*' , 'display*' , 'next*' etc. It is hard to know if
this would be useful without actually using it, and the
SmalltalkWorkspace auto completion methods are a bit complex ... so I
thought I would take the easy way out and just mention it!

Steve
--
Steve Waring


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: expandAbbreviation could cancel auto completion

Blair McGlashan-4
<[hidden email]> wrote in message
news:[hidden email]...

> Hi Blair,
>
>> I did originally intend to integrate abbreviations into the
>> autocompletion
>> mechanism so that the abbreviations appeared in the auto-completion list,
>> but it didn't make the cut.
>
> This would be nice!
>
> Wandering a bit off topic:
>
> I have abbreviations setup for things like 'cc' => 'createComponents
> super createComponents.' , 'ovo' => 'onViewOpened super onViewOpened.'
> , csw => ... etc etc. I think cases like these are always going to be
> faster as abbreviations than auto completion.

Don't forget you can also get a valid stub using the "Override" refactoring.
The stub includes the supersend (otherwise it wouldn't be a refactoring).
This won't necessarily be as fast (in terms of UI operations) as specific
abbreviations, but it works for all selectors.

>
> I have been able to retire a few of my abbreviations in favor of auto
> completion, but for example:  'ds' => 'displayString' is still faster
> than auto completion, for which you have to almost type the full
> selector before it is selected.
>
> A recent post by TimM about Eclipse/IntelliJ in the "Home key doesn't
> work in method search box" thread, made me realize that most of my
> abbreviations (and a fair proportion of the default abbreviations) are
> the "camel humps" ie the first character of a selector and the
> subsequent capitals.
>
> In addition to Tim's idea of using the "camel humps" to find classes
> ...  autocompletion based on the selector's first character + capitals
> might be a fast way to get to selectors with common prefixes like;
> 'create*' , 'add*' , 'display*' , 'next*' etc. It is hard to know if
> this would be useful without actually using it, and the
> SmalltalkWorkspace auto completion methods are a bit complex ... so I
> thought I would take the easy way out and just mention it!

Yes, its a good suggestion. I'm not sure how practical it would be in terms
of speed to match the camel humps, but it sounds worth investigating.

Regards

Blair