[Cuis-dev] Code completion

Juan Vuletich juan at cuis.st
Thu Dec 22 05:24:17 PST 2022


Hi Hilaire,

On 12/22/2022 5:37 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi,
>
> In the DrGSmalltalkSketchEditor (subclass of DialogPanel), to have 
> code completion on a given class (it is set in a preference depending 
> on the locale, to make code completion to methods translated in locale 
> language) I implemented the methods below:
>
> computeMessageEntriesIn: aDynamicTypingSmalltalkCompleter 
> ofTempVarNamed: aString
>
>     aDynamicTypingSmalltalkCompleter
>         computeMessageEntriesForClassOrNil: (DrGeoSystem preferences 
> at: #programmingCodeCompletion)
>
> autoCompleterClassFor: textGetter
>     
SmalltalkCompleter
>
> However the code completion is not limited to the class I want.
>
> I think it used to work -- or may be I was confused, which is likely too.
>
> Any idea?
>
> Thanks a lot
>
> Hilaire
>
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu

Take a look at the AutoCompleter hierarchy. See, for instance, 
ClassNameCompleter, added by Hernán some time ago. You can build your 
own in a similar fashion.

If you follow #computeEntries in SmalltalkCompleter, you'll see how the 
set of messages offered is restricted to the receiver, when we know 
about it.

Hope this helps.

Cheers,

-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221222/1f8ea2a7/attachment.htm>


More information about the Cuis-dev mailing list