[Cuis-dev] Sub-class Template Styling Fix
Gerald Klix
cuis.01 at klix.ch
Mon Jul 27 10:09:50 PDT 2020
Hi all,
Long time ago, I discovered that the browser's class pane menu action
named "More.. subclass template" does indeed create a nice code template.
Alas the template is rather purely styled. Here is simple fix for that
minor nuisance.
HTH,
Gerald
-------------- next part --------------
'From Cuis 5.0 [latest update: #4254] on 27 July 2020 at 7:00:37 pm'!
!Browser methodsFor: 'shout styling' stamp: 'KLG 7/27/2020 19:00:02'!
shouldStyle: text with: anSHTextStyler
"This is a notification that anSHTextStyler is about to re-style its text.
Set the classOrMetaClass in anSHTextStyler, so that identifiers
will be resolved correctly.
Answer true to allow styling to proceed, or false to veto the styling"
| type |
self isModeStyleable ifFalse: [^false].
type _ self editSelection.
(#(newMessage editMessage editClass newClass) includes: type) ifFalse:[^false].
anSHTextStyler classOrMetaClass: ((#(editClass newClass) includes: type) ifFalse:[
self selectedClassOrMetaClass]).
^true! !
More information about the Cuis-dev
mailing list