Eliot Miranda uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-kks.109.mcz==================== Summary ====================
Name: HelpSystem-Core-kks.109
Author: kks
Time: 11 March 2019, 5:53:49.057526 pm
UUID: 8af65911-c2ec-496a-ad84-87fdfb32339a
Ancestors: HelpSystem-Core-pre.108
Method topics are now linked to their definitions on both Instance and Class side. When you notice methods without comments, adding them in just one click away.
=============== Diff against HelpSystem-Core-pre.108 ===============
Item was changed:
----- Method: ClassAPIHelpBuilder>>buildMethodTopicsOn:for: (in category 'private building') -----
buildMethodTopicsOn: topic for: aClass
+ topic contents: (MethodListHelpTopic forClass: aClass) contents!
- topic contents: (String streamContents: [ :stream |
- aClass selectors sort do: [ :selector |
- stream
- nextPutAll: aClass name;
- nextPutAll: '>>';
- nextPutAll: selector asString;
- cr;
- nextPutAll: (
- (aClass commentsAt: selector)
- at: 1
- ifAbsent: [ 'Method has no comment.' ]);
- cr; cr ] ])!
Item was changed:
AbstractHelpTopic subclass: #MethodListHelpTopic
instanceVariableNames: 'theClass'
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Core-Model'!
+
+ !MethodListHelpTopic commentStamp: 'kks 3/11/2019 17:41' prior: 0!
+ I list all the methods along with their comments in a given class with the methods linked to their definitions.!
Item was added:
+ ----- Method: MethodListHelpTopic class>>forClass: (in category 'instance creation') -----
+ forClass: aClass
+ "Create a new method list for a given class or metaclass.
+
+ (MethodListHelpTopic forClass: Behavior class) contents edit
+ "
+
+ ^(self new)
+ theClass: aClass;
+ yourself!
Item was changed:
----- Method: MethodListHelpTopic>>contents (in category 'accessing') -----
contents
+ ^Text new in: [ :sections |
-
- ^ (String streamContents: [ :stream |
self theClass selectors sort do: [ :selector |
+ sections
+ append: (self headingFor: selector inClass: theClass);
+ append: Character cr;
+ append: ((self theClass commentsAt: selector)
- stream
- nextPutAll: self theClass name;
- nextPutAll: '>>';
- nextPutAll: selector asString;
- cr;
- nextPutAll: (
- (self theClass commentsAt: selector)
at: 1
ifAbsent: [ '-' ]);
+ append: Character cr;
+ append: Character cr ].
+ sections]!
- cr; cr ] ])!
Item was added:
+ ----- Method: MethodListHelpTopic>>headingFor:inClass: (in category 'private') -----
+ headingFor: aSelector inClass: aClass
+ | att |
+ att := TextLink new classAndMethod: aClass name, '>>', aSelector.
+ ^(Text fromString: att info) addAttribute: att.!