[squeak-dev] The Inbox: Collections-kfr.1011.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 4 18:11:45 UTC 2022


A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-kfr.1011.mcz

==================== Summary ====================

Name: Collections-kfr.1011
Author: kfr
Time: 4 June 2022, 8:11:42.249458 pm
UUID: af4717d3-2d27-864f-9c26-7aebb4444811
Ancestors: Collections-ct.1010

Open a HelpBrowser with TextLink.
Example:
TerseGuideHelp Help
Select text, press Alt+5 (CMD on Mac) and select 'Link to help on class'
(A link of this format: 'My Link<TerseGuideHelp Help>' will hide the part between < & > )

=============== Diff against Collections-ct.1010 ===============

Item was changed:
  ----- Method: TextLink>>validate: (in category 'initialize-release') -----
  validate: specString
  	"Can this string be decoded to be Class space Method (or Comment, Definition, Hierarchy)? If so, return it in valid format, else nil" 
  
  	| list first mid last |
  	list := specString findTokens: ' 	.|'.
  	list isEmpty ifTrue: [ ^nil ].
  	last := list last.
  	last first isUppercase ifTrue: [
+ 		(#('Comment' 'Definition' 'Hierarchy' 'Help') includes: last) ifFalse: [^ nil].
- 		(#('Comment' 'Definition' 'Hierarchy') includes: last) ifFalse: [^ nil].
  		"Check for 'Rectangle Comment Comment' and remove last one"
  		(list at: list size - 1 ifAbsent: [^nil]) = last ifTrue: [list := list allButLast]].
  	list size > 3 ifTrue: [^ nil].
  	list size < 2 ifTrue: [^ nil].
  	first := Symbol lookup: list first.
  	first ifNil: [^ nil].
  	Smalltalk at: first ifAbsent: [^ nil].
  	mid := list size = 3 
  		ifTrue: [(list at: 2) = 'class' ifTrue: ['class '] ifFalse: [^ nil]]
  		ifFalse: [''].
  	"OK if method name is not interned -- may not be defined yet"
  	^ first, ' ', mid, last!



More information about the Squeak-dev mailing list