Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-jar.1246.mcz
==================== Summary ====================
Name: System-jar.1246
Author: jar
Time: 12 November 2021, 10:29:31.63687 pm
UUID: 89decfa1-5dbe-6341-8638-c070b5a29f17
Ancestors: System-eem.1245
Allow empty credentials (user name and password) when composing a mail message.
Currently, the MailSender class forces users to use non empty usernames and passwords. This prevents applications fro using a simple no authentication SMTP server - e.g. the Squeak Inbox Talk tool (ct). Together with Network-jar.250 modification of the SMTPClient login method this change will allow using No Auth SMTP server for sending mail messages from Squeak.
=============== Diff against System-eem.1245 ===============
Item was removed:
- ----- Method: MailSender class>>isUserNameSet (in category 'testing') -----
- isUserNameSet
- ^ UserName notNil and: [UserName notEmpty]
- !
Item was removed:
- ----- Method: MailSender class>>isUserPasswordSet (in category 'testing') -----
- isUserPasswordSet
- ^ UserPassword notNil and: [UserPassword notEmpty]
- !
Item was changed:
----- Method: MailSender class>>userName (in category 'accessing') -----
userName
+ "Answer the user name to be used for sending out messages. Leave empty if authentication not required."
- "Answer the user name to be used for sending out messages."
+ UserName ifNil: [self setUserName].
- self isUserNameSet ifFalse: [self setUserName].
-
- UserName isEmpty ifTrue: [ self error: 'no user name specified' ].
-
^UserName!
Item was changed:
----- Method: MailSender class>>userPassword (in category 'accessing') -----
userPassword
+ "Answer the user password to be used for sending out messages. Leave empty if authentication not required."
+ UserPassword ifNil: [self setUserPassword].
+ ^UserPassword!
- self isUserPasswordSet ifFalse: [self setUserPassword].
-
- UserPassword isEmpty ifTrue: [ self error: 'no user name specified' ].
-
- ^ UserPassword!
Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1253.mcz
==================== Summary ====================
Name: System-ct.1253
Author: ct
Time: 27 November 2021, 8:45:05.98852 pm
UUID: 8a8c31b3-799c-b447-8406-7778b3a40b49
Ancestors: System-ct.1250, System-jar.1246
Merges System-jar.1246 (allow empty credentials when composing a mail message).
Revision: Keep #isUserNameSet and #isUserPasswordSet as a part of the public protocol.
Note that currently, you will not be asked another time for your credentials after canceling the dialog. However, this is related to a disputable behavior of the UIManager (not answering nil on cancel) and not the fault of this patch.
=============== Diff against System-ct.1250 ===============
Item was changed:
----- Method: MailSender class>>isUserNameSet (in category 'testing') -----
isUserNameSet
+ ^ UserName notNil!
- ^ UserName notNil and: [UserName notEmpty]
- !
Item was changed:
----- Method: MailSender class>>isUserPasswordSet (in category 'testing') -----
isUserPasswordSet
+ ^ UserPassword notNil!
- ^ UserPassword notNil and: [UserPassword notEmpty]
- !
Item was changed:
----- Method: MailSender class>>setUserName (in category 'settings') -----
setUserName
(UIManager default
request: 'What is your user name on the SMTP server?' withCRs
+ initialAnswer: (UserName ifNil: ['']))
- initialAnswer: (UserName ifNil: [UserName := '']))
ifNotNil: [:answer | UserName := answer]!
Item was changed:
----- Method: MailSender class>>userName (in category 'accessing') -----
userName
+ "Answer the user name to be used for sending out messages. Leave empty if authentication not required."
- "Answer the user name to be used for sending out messages."
+ self isUserNameSet ifNil: [self setUserName].
- self isUserNameSet ifFalse: [self setUserName].
-
- UserName isEmpty ifTrue: [ self error: 'no user name specified' ].
-
^UserName!
Item was changed:
----- Method: MailSender class>>userPassword (in category 'accessing') -----
userPassword
+ "Answer the user password to be used for sending out messages. Leave empty if authentication not required."
+ self isUserPasswordSet ifNil: [self setUserPassword].
- self isUserPasswordSet ifFalse: [self setUserPassword].
-
- UserPassword isEmpty ifTrue: [ self error: 'no user name specified' ].
-
^ UserPassword!
Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.119.mcz
==================== Summary ====================
Name: PreferenceBrowser-mt.119
Author: mt
Time: 26 November 2021, 5:52:19.338058 pm
UUID: 690c159d-3ed5-c245-a63d-6bc8eb45593e
Ancestors: PreferenceBrowser-mt.118
Merges and revises pbKeyboard.1.cs. Thanks to Christoph (ct) for the idea!
Original comment: "This changeset improves keyboard shortcut for preference button in the PreferenceBrowser. You can now select a preference in the browser and press escape to trigger the menu or cmd + (m|b | n | i | c | C) to browse senders/implementors / inspect the preference, or copy its content, resp. Also fixes up a few Law of Demeter violations in PBPreferenceView and improves multilingual support."
Plus, the preference list now honors the #menuRequestUpdatesSelection preference. And yellow-click finally works and shows the preference menu.
Note that I kept the style of dispatching events from buttons to the browser as configured in #newPreferencesButtonFor:. So, I did not follow the changeset's idea of implementing #keyStroke: in PBPreferenceButtonMorph. If we wanted to actually refactor this tool, it would take longer.
Also note that MorphicEvent >> #wasHandled: is not public! It belongs to internal event-dispatching logic. Clients should never mess with this flag except when overwriting #handle*: methods.
Please restart your preference browser. :o)
=============== Diff against PreferenceBrowser-mt.118 ===============
Item was changed:
----- Method: PBPreferenceButtonMorph>>highlightOn (in category 'highlighting') -----
highlightOn
self color: ((UserInterfaceTheme current get: #selectionColor for: PluggableListMorph) ifNil: [Color gray alpha: 0.1]).
self label
color: ((UserInterfaceTheme current get: #selectionTextColor for: PluggableListMorph) ifNil: [Color black]);
font: (((UserInterfaceTheme current get: #font for: PluggableListMorph) ifNil: [TextStyle defaultFont])
emphasized: TextEmphasis bold emphasisCode).
+ self addExtraControls.
+
+ self currentHand newKeyboardFocus: self.!
- self addExtraControls.!
Item was changed:
----- Method: PBPreferenceView>>offerPreferenceNameMenu: (in category 'user interface') -----
offerPreferenceNameMenu: aPreferenceBrowser
"the user clicked on a preference name -- put up a menu"
| aMenu readableName |
readableName := self preference readableName.
aMenu := MenuMorph new
defaultTarget: self preference;
addTitle: readableName.
(Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue:
[aMenu
addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness;
+ balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project. If this item is checked, then this preference will be printed in bold and will have a separate value for each project' translated].
- balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project. If this item is checked, then this preference will be printed in bold and will have a separate value for each project'].
aMenu
addLine;
+ add: 'browse senders (n)' translated
+ action: #browseSenders;
+ balloonTextForLastItem: ('This will open a method-list browser on all methods that the send the preference "{1}".' translated format: {readableName}).
- add: 'browse senders' translated
- target: self systemNavigation
- selector: #browseAllSelect:name:autoSelect:
- argumentList: {
- [:m | self preference selectors anySatisfy: [:sel | m hasLiteral: sel]].
- 'Preference senders: {1}' translated format: {self preference name}.
- self preference selectors first };
- balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "'
- , readableName , '".'.
self preference provider ifNotNil: [
aMenu
+ add: 'browse implementation (m)' translated
+ action: #browse;
+ balloonTextForLastItem: ('This will open a browser on the method that stores the preference "{1}".' translated format: {readableName})].
- add: 'browse implementation' translated
- target: ToolSet
- selector: #browse:selector:
- argumentList: {
- self preference provider class.
- self preference selectors first };
- balloonTextForLastItem: 'This will open a browser on the method that stores the preference "' , readableName , '".'].
aMenu
+ add: 'inspect preference (i)' translated
+ action: #inspect;
+ balloonTextForLastItem: ('This will open an inspector on the preference "{1}".' translated format: {readableName}).
- add: 'inspect preference' translated
- target: self preference
- selector: #inspect;
- balloonTextForLastItem: 'This will open an Inspector on the preference "' , readableName , '".'.
aMenu
addLine;
+ add: 'show category (b)' translated
- add: 'show category'
target: aPreferenceBrowser
selector: #findCategoryFromPreference:
argument: self preference;
+ balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.' translated.
- balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.'.
Smalltalk isMorphic ifTrue:
[aMenu
+ add: 'hand me a button for this preference' translated
- add: 'hand me a button for this preference'
target: self
selector: #tearOffButton;
+ balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish' translated].
- balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish'].
aMenu
+ add: 'copy name to clipboard (c)' translated
+ action: #copyName;
+ balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere' translated.
- add: 'copy name to clipboard'
- target: self preference
- selector: #copyName;
- balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere'.
aMenu
+ add: 'copy code to clipboard (C)' translated
+ action: #copyCode;
+ balloonTextForLastItem: 'Copy the code to access the current preference value to the clipboard, so that you can paste into code somewhere' translated.
- add: 'copy code to clipboard'
- target: self preference
- selector: #copyCode;
- balloonTextForLastItem: 'Copy the code to access the current preference value to the clipboard, so that you can paste into code somewhere'.
aMenu popUpInWorld!
Item was changed:
----- Method: PreferenceBrowser>>findCategoryFromPreference: (in category 'find') -----
findCategoryFromPreference: aPreference
"Find all categories in which the preference occurs"
+ | categories menu |
+ categories := aPreference categoryList.
+ categories size = 0
+ ifTrue: [^ self].
+ categories size = 1
+ ifTrue: [^ self selectedCategory: categories first].
+
+ menu := MenuMorph new defaultTarget: self.
- | aMenu|
- aMenu := MenuMorph new defaultTarget: self.
aPreference categoryList do:
+ [:aCategory | menu add: aCategory target: self selector: #selectedCategory: argument: aCategory].
+ menu popUpInWorld!
- [:aCategory | aMenu add: aCategory target: self selector: #selectedCategory: argument: aCategory].
- aMenu popUpInWorld!
Item was removed:
- ----- Method: PreferenceBrowserMorph>>keyPressed: (in category 'event handling') -----
- keyPressed: anEvent
- self selectedCategory
- ifNil: [^self].
- anEvent keyValue = 30
- ifTrue: [^self upKeyPressed: anEvent].
- anEvent keyValue = 31
- ifTrue: [^self downKeyPressed: anEvent].
- anEvent keyValue = 1
- ifTrue: [^self homeKeyPressed: anEvent].
- anEvent keyValue = 4
- ifTrue: [^self endKeyPressed: anEvent].
- anEvent keyValue = 11
- ifTrue: [^self pageUpKeyPressed: anEvent].
- anEvent keyValue = 12
- ifTrue: [^self pageDownKeyPressed: anEvent].
- self basicKeyPressed: anEvent.!
Item was added:
+ ----- Method: PreferenceBrowserMorph>>keyPressedOn:event: (in category 'event handling') -----
+ keyPressedOn: aPreferenceView event: anEvent
+
+ anEvent commandKeyPressed
+ ifFalse: [
+ anEvent keyValue caseOf: {
+ [27] -> [aPreferenceView offerPreferenceNameMenu: self model].
+ [30] -> [self upKeyPressed: anEvent].
+ [31] -> [self downKeyPressed: anEvent].
+ [1] -> [self homeKeyPressed: anEvent].
+ [4] -> [self endKeyPressed: anEvent].
+ [11] -> [self pageUpKeyPressed: anEvent].
+ [12] -> [self pageDownKeyPressed: anEvent] }
+ otherwise: [self basicKeyPressed: anEvent].
+ ^ self].
+
+ anEvent keyCharacter
+ caseOf: {
+ [$b] -> [self model findCategoryFromPreference: aPreferenceView preference].
+ [$c] -> [aPreferenceView copyName].
+ [$C] -> [aPreferenceView copyCode].
+ [$i] -> [aPreferenceView preference inspect].
+ [$m] -> [aPreferenceView browse].
+ [$n] -> [aPreferenceView browseSenders]}
+ otherwise: [].!
Item was changed:
----- Method: PreferenceBrowserMorph>>mouseDownOn:event: (in category 'event handling') -----
mouseDownOn: aPreferenceView event: anEvent
+
- anEvent hand newKeyboardFocus: self preferenceList scroller.
anEvent yellowButtonPressed
+ ifTrue: [self selectedPreferenceButton preferenceView offerPreferenceNameMenu: self model].!
- ifTrue: [aPreferenceView offerPreferenceNameMenu: self model]!
Item was changed:
----- Method: PreferenceBrowserMorph>>newPreferenceButtonFor: (in category 'submorphs - preference list') -----
newPreferenceButtonFor: aPreference
| button |
button := PBPreferenceButtonMorph preference: aPreference model: self model.
button
on: #mouseDown
send: #value:
to:
[:anEvent |
+ (anEvent yellowButtonPressed not
+ or: [PluggableListMorph menuRequestUpdatesSelection
+ and: [button ~= self selectedPreferenceButton]])
+ ifTrue: [
+ anEvent hand newKeyboardFocus: button.
+ self selectedPreference: aPreference].
+ self mouseDownOn: button preferenceView event: anEvent];
+ on: #keyStroke
+ send: #value:
+ to: [:anEvent |self keyPressedOn: button preferenceView event: anEvent].
+
- self
- selectedPreference: aPreference;
- mouseDownOn: button preferenceView event: anEvent].
^button!
Item was changed:
----- Method: PreferenceBrowserMorph>>preferenceList (in category 'submorphs - preference list') -----
preferenceList
^preferenceList ifNil:
[preferenceList := ScrollPane new
vResizing: #spaceFill;
hResizing: #spaceFill;
layoutFrame: (LayoutFrame fractions: (0.25@0 corner: 1@1) offsets: (4@0 corner: 0@0)).
preferenceList scroller
- on: #keyStroke send: #keyPressed: to: self;
changeTableLayout.
preferenceList.]!
Item was changed:
----- Method: PreferenceBrowserMorph>>selectedPreferenceButton (in category 'submorphs - preference list') -----
selectedPreferenceButton
+ ^(self preferenceListInnerPanel submorphs at: self selectedPreferenceIndex ifAbsent: [nil])!
- ^(self preferenceListInnerPanel submorphs at: self selectedPreferenceIndex)!
Item was added:
+ ----- Method: PreferenceBrowserMorph>>yellowButtonActivity: (in category 'event handling') -----
+ yellowButtonActivity: shiftPressed
+ "Ignore. See mouseDownOn:event:."!
Item was added:
+ ----- Method: PreferenceView>>browse (in category 'user interface') -----
+ browse
+
+ ^ self preference browse!
Item was added:
+ ----- Method: PreferenceView>>browseSenders (in category 'user interface') -----
+ browseSenders
+
+ ^ self preference browseSenders!
Patrick Rein uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-pre.250.mcz
==================== Summary ====================
Name: Network-pre.250
Author: pre
Time: 26 November 2021, 2:55:43.296614 pm
UUID: 36dacd1d-414b-574d-b11b-ddac8ba64fb3
Ancestors: Network-eem.249
Categorizes two uncategorized methods.
=============== Diff against Network-eem.249 ===============
Item was changed:
+ ----- Method: RemoteFileStream>>padToEndWith: (in category 'read, write, position') -----
- ----- Method: RemoteFileStream>>padToEndWith: (in category 'as yet unclassified') -----
padToEndWith: aChar
"On the Mac, files do not truncate, so pad it with a harmless character. But Remote FTP files always replace, so no need to pad."
self atEnd ifFalse: [self inform: 'Why is this stream not at its end?'].!
Item was changed:
+ ----- Method: UUID>>makeUUID (in category 'private - initialize') -----
- ----- Method: UUID>>makeUUID (in category 'as yet unclassified') -----
makeUUID
self primMakeUUID ifNil: [
UUIDGenerator default generateBytes: self forVersion: 4 ]!
Marcel Taeumel uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-ct.89.mcz
==================== Summary ====================
Name: ShoutCore-ct.89
Author: ct
Time: 2 November 2021, 2:20:22.623566 pm
UUID: 9564b1cf-01d0-514a-9f7d-9829b7376c13
Ancestors: ShoutCore-mt.85
Makes sure to unregister the TextStyler correctly when unloading Shout. Opposite of #intialize.
=============== Diff against ShoutCore-mt.85 ===============
Item was added:
+ ----- Method: SHTextStylerST80 class>>unload (in category 'class initialization') -----
+ unload
+
+ TextStyler unregister: self for: #Smalltalk.!
Marcel Taeumel uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-ct.88.mcz
==================== Summary ====================
Name: ShoutCore-ct.88
Author: ct
Time: 2 November 2021, 2:19:23.507566 pm
UUID: 0945b74c-2a5d-204a-8da8-84c6af50f872
Ancestors: ShoutCore-mt.85
Forwards orphane preference #syntaxHighlightingAsYouType to 'TextStyler defaultFor: #Smalltalk'.
Note that not all places in the system use the TextStyler abstraction until now. I'm preparing a changeset that fixes this.
=============== Diff against ShoutCore-mt.85 ===============
Item was changed:
SHTextStyler subclass: #SHTextStylerST80
instanceVariableNames: 'classOrMetaClass workspace font parser formatAssignments environment sourceMap processedSourceMap pixelHeight attributesByPixelHeight parseAMethod context'
+ classVariableNames: 'SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment TextAttributesByPixelHeight'
- classVariableNames: 'SyntaxHighlightingAsYouType SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment TextAttributesByPixelHeight'
poolDictionaries: ''
category: 'ShoutCore-Styling'!
!SHTextStylerST80 commentStamp: 'tween 8/27/2004 10:55' prior: 0!
I style Smalltalk methods and expressions.
My 'styleTable' class instance var holds an array ofArrays which control how each token is styled/coloured. See my defaultStyleTable class method for its structure.
My styleTable can be changed by either modifying the defaultStyleTable class method and then executing SHTextStylerST80 initialize ; or by giving me a new styleTable through my #styleTable: class method.
My 'textAttributesByPixelSize' class instance var contains a dictionary of dictionaries.
The key is a pixelSize and the value a Dictionary from token type Symbol to TextAttribute array.
It is created/maintained automatically.
I also install these 3 preferences when my class initialize method is executed....
#syntaxHighlightingAsYouType - controls whether methods are styled in browsers
#syntaxHighlightingAsYouTypeAnsiAssignment - controls whether assignments are formatted to be :=
#syntaxHighlightingAsYouTypeLeftArrowAssignment - controls whether assignments are formatted to be _
I reimplement #unstyledTextFrom: so that TextActions are preserved in the unstyled text
!
Item was changed:
----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouType (in category 'preferences') -----
syntaxHighlightingAsYouType
<preference: 'syntaxHighlightingAsYouType'
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 defaultFor: #Smalltalk) = self!
- ^SyntaxHighlightingAsYouType ifNil: [true]!
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.!
- SyntaxHighlightingAsYouType := aBoolean.!
Marcel Taeumel uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-mt.90.mcz
==================== Summary ====================
Name: ShoutCore-mt.90
Author: mt
Time: 25 November 2021, 4:45:49.823354 pm
UUID: b976028e-e63c-5c40-b0d6-1ae06b21ca6a
Ancestors: ShoutCore-ct.88, ShoutCore-ct.89
Uses TextStyler abstraction to control #syntaxHighlightingAsYouType. This makes this preference actually functional again. :-)
Thanks to Christoph (ct) for the idea!
When the preference is toggled, try to update all open code tools automatically.
Also merges ShoutCore-ct.89, which fixes #unload in Shout.
=============== Diff against ShoutCore-mt.85 ===============
Item was changed:
SHTextStyler subclass: #SHTextStylerST80
instanceVariableNames: 'classOrMetaClass workspace font parser formatAssignments environment sourceMap processedSourceMap pixelHeight attributesByPixelHeight parseAMethod context'
+ classVariableNames: 'SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment TextAttributesByPixelHeight'
- classVariableNames: 'SyntaxHighlightingAsYouType SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment TextAttributesByPixelHeight'
poolDictionaries: ''
category: 'ShoutCore-Styling'!
!SHTextStylerST80 commentStamp: 'tween 8/27/2004 10:55' prior: 0!
I style Smalltalk methods and expressions.
My 'styleTable' class instance var holds an array ofArrays which control how each token is styled/coloured. See my defaultStyleTable class method for its structure.
My styleTable can be changed by either modifying the defaultStyleTable class method and then executing SHTextStylerST80 initialize ; or by giving me a new styleTable through my #styleTable: class method.
My 'textAttributesByPixelSize' class instance var contains a dictionary of dictionaries.
The key is a pixelSize and the value a Dictionary from token type Symbol to TextAttribute array.
It is created/maintained automatically.
I also install these 3 preferences when my class initialize method is executed....
#syntaxHighlightingAsYouType - controls whether methods are styled in browsers
#syntaxHighlightingAsYouTypeAnsiAssignment - controls whether assignments are formatted to be :=
#syntaxHighlightingAsYouTypeLeftArrowAssignment - controls whether assignments are formatted to be _
I reimplement #unstyledTextFrom: so that TextActions are preserved in the unstyled text
!
Item was changed:
----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouType (in category 'preferences') -----
syntaxHighlightingAsYouType
<preference: 'syntaxHighlightingAsYouType'
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!
- ^SyntaxHighlightingAsYouType ifNil: [true]!
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) 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" ]]].!
- SyntaxHighlightingAsYouType := aBoolean.!
Item was added:
+ ----- Method: SHTextStylerST80 class>>unload (in category 'class initialization') -----
+ unload
+
+ TextStyler unregister: self for: #Smalltalk.!