[Cuis-dev] Refactoring the browser's "annotation" pane
Juan Vuletich
juan at jvuletich.org
Mon Jul 26 11:54:58 PDT 2021
On 7/25/2021 3:31 PM, Nahuel Garbezza via Cuis-dev wrote:
> Hi everyone!
>
> I was experimenting a little bit with the browser's annotation pane
> and I found that it is difficult to extend (adding new information to
> the annotation text) without overriding stuff in CodeProvider,
> particularly #annotationForSelector:ofClass:. That method is quite
> long currently and it will grow more as new "annotation requests" are
> added.
>
> Also, I think the annotation should not be a responsibility of a
> CodeProvider, the way I see it is more "UI" so it would be better in
> my opinion to be a separate object that can deal just with
> annotations. But I'm not entirely sure how to name it (I thought
> something like "AnnotationProvider" but I don't 100% like the
> "provider" word).
>
> Any ideas?
>
> Nahuel
I think that making annotationForSelector:ofClass: do `self perform:
aRequest` would be a great way to start modularizing that method.
Besides, I don't think that CodeProvider should decide on the
annotations to use (it is ok to ask that to Preferences), but I do think
it is it's business to provide the annotations themselves. It is a
CodeProvider, and all these are attributes of the Code. For example it
should implement #firstComment, #masterComment, #documentation, etc.
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