[Cuis-dev] Making assumptions about source code without checking #compilerClass

Juan Vuletich juan at jvuletich.org
Wed May 22 04:15:21 PDT 2019


On 5/22/2019 2:25 AM, Phil B via Cuis-dev wrote:
> A lot of the recent 'quality of life' improvements due to recent 
> changes have been great... when working with Smalltalk code.   On the 
> other hand, I'm working through some new issues re: OMeta as a result 
> of some of the recent updates and was wondering how to best handle them.
>
> One specific example appears to be recent autoselect enhancements 
> which hard-codes the assumption that the AST will match what the user 
> is seeing on screen... often not the case with OMeta code.  (usually, 
> it's not even valid Smalltalk code when in source view)  The way we've 
> handled this sort of issue previously is to always check 
> #compilerClass and have hooks on it for things like #textStylerClass.  
> I'm not sure if we could/should wedge the autoselect code into 
> #textStylerClass or if a #codeWalkerClass type of solution might be 
> more appropriate.  But if we could do something that works via 
> #compilerClass, as opposed to hard coding the assumptions in the 
> editor, it would be greatly appreciated.   That way I can either 
> override or disable as appropriate for OMeta.
>
> While my immediate concern is OMeta code, it also seems worth 
> providing a more general solution as it makes the text editing code 
> more flexible for everyone should someone else want to do the same 
> sort of thing for text/HTML/whatever editors.

Hi Phil,

Can you please provide a specific example, with instructions detailed 
enough for someone who knows almost nothing about OMeta to see what 
annoys you?

We have, for example, SmalltalkEditor and SmalltalkCompleter. All editor 
behavior that is specific for Smalltalk code should be in these or other 
Smalltalk specific classes. Then tools could use alternative objects for 
other kinds of text.

I could really use a good example to understand better where and how we 
need to fix stuff.

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list