[squeak-dev] Merge Request: decoupleShout.1.cs
Marcel Taeumel
marcel.taeumel at hpi.de
Fri Nov 26 14:19:58 UTC 2021
Merged.
Am 06.11.2021 21:47:13 schrieb christoph.thiede at student.hpi.uni-potsdam.de <christoph.thiede at student.hpi.uni-potsdam.de>:
==================== Summary ====================
Change Set: decoupleShout
Date: 2 November 2021
Author: Christoph Thiede
This changeset complements the refactoring from System-mt.1240 intended to decouple the base system from Shout. In various places, there were still hard-coded references to SHTextStylerST80 that did not use the new TextStyler abstraction. These accesses are redirected correctly with this changeset. Furthermore, the TextStyler interface is updated to not automatically set a styler if it has been set to nil manually. This makes it possible to opt-out to styling via ShoutCore-ct.88.
=============== Diff ===============
PBClassPreferenceView>>initialize {initialize-release} · ct 11/1/2021 23:25 (changed)
initialize
super initialize.
- styler := (Smalltalk classNamed: 'SHTextStylerST80') ifNotNil: [:s | s new].
- completionController := (Smalltalk classNamed: 'OController') ifNotNil: [:oc | oc model: self].
+ styler := (TextStyler for: #Smalltalk) ifNotNil: [:s | s new].
+ completionController := (Smalltalk classNamed: #OController) ifNotNil: [:oc | oc model: self].
PluggableCodePaneSpec>>stylerClass {accessing} · ct 11/1/2021 23:21 (changed)
stylerClass
- ^ super stylerClass ifNil: [Smalltalk classNamed: 'SHTextStylerST80']
+ ^ super stylerClass ifNil: [TextStyler for: #Smalltalk]
SmalltalkEditor>>styleSelection {do-its} · ct 11/1/2021 23:30 (changed)
styleSelection
| styler |
self lineSelectAndEmptyCheck: [^ ''].
- styler := self styler ifNil: [(TextStyler for: #Smalltalk) new].
+ styler := self styler ifNil: [(TextStyler for: #Smalltalk) ifNotNil: [:c | c new]].
^ styler styledTextFor: self selection
TextStyler class>>defaultFor: {accessing} · ct 11/1/2021 23:30 (changed)
defaultFor: syntax
- ^ default
- at: syntax
- ifAbsent: [self askForDefaultFor: syntax]
+ ^ self defaultOrNilFor: syntax
---
Sent from Squeak Inbox Talk [https://github.com/hpi-swa-lab/squeak-inbox-talk]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211126/2cb72eae/attachment.html>
More information about the Squeak-dev
mailing list
|