[Pkg] The Trunk: ShoutCore-mt.92.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Feb 14 09:30:22 UTC 2022
Marcel Taeumel uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-mt.92.mcz
==================== Summary ====================
Name: ShoutCore-mt.92
Author: mt
Time: 14 February 2022, 10:30:21.84781 am
UUID: e1a6deb3-9844-d546-8a8c-b125a4b4ea0f
Ancestors: ShoutCore-mt.91
Fill "Accessibility" preference category with more related preferences.
=============== Diff against ShoutCore-mt.91 ===============
Item was changed:
----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouType (in category 'preferences') -----
syntaxHighlightingAsYouType
<preference: 'syntaxHighlightingAsYouType'
+ categoryList: #(browsing Accessibility)
- category: 'browsing'
description: 'Enable, or disable, Shout - Syntax Highlighting As You Type. When enabled, code in Browsers and Workspaces is styled to reveal its syntactic structure. When the code is changed (by typing some characters, for example), the styling is changed so that it remains in sync with the modified code.'
type: #Boolean>
^ (TextStyler for: #Smalltalk) = self!
Item was changed:
----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouType: (in category 'preferences') -----
syntaxHighlightingAsYouType: aBoolean
self syntaxHighlightingAsYouType = aBoolean ifTrue: [^ self].
TextStyler
default: (aBoolean ifTrue: [self] ifFalse: [nil])
for: #Smalltalk.
"Update known tools that show Smalltalk source code."
(self environment classNamed: #PluggableTextMorphPlus) ifNotNil: [:widgetClass |
+ | stylerClass toolClass workspaceClass |
+ stylerClass := TextStyler for: #Smalltalk.
+ toolClass := self environment classNamed: #CodeHolder.
+ workspaceClass := self environment classNamed: #Workspace. "Actually a StringHolder but a code tool."
+ widgetClass allInstancesDo: [:widget |
+ ((widget model isKindOf: toolClass) and: [widget getTextSelector ~= #annotation])
+ ifTrue: [
+ widget styler: (stylerClass ifNotNil: [:c | c new view: widget]).
+ widget setText: widget text asString asText makeSelectorBold "drop text attributes; keep method signature styled" ].
+ (widget model isKindOf: workspaceClass)
+ ifTrue: [
+ widget styler: (stylerClass ifNotNil: [:c | c new view: widget]).
+ widget setText: widget text asString "drop text attributes"] ]].!
- | stylerClass toolClass workspaceClass |
- stylerClass := TextStyler for: #Smalltalk.
- toolClass := self environment classNamed: #CodeHolder.
- workspaceClass := self environment classNamed: #Workspace. "Actually a StringHolder but a code tool."
- widgetClass allInstancesDo: [:widget |
- (((widget model isKindOf: toolClass) or: [widget model isKindOf: workspaceClass])
- and: [widget getTextSelector ~= #annotation])
- ifTrue: [
- widget styler: (stylerClass ifNotNil: [:c | c new view: widget]).
- widget setText: widget text asString "drop text attributes" ]]].!
More information about the Packages
mailing list