[Pkg] The Trunk: HelpSystem-Core-mt.136.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Nov 19 14:16:09 UTC 2021
Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-mt.136.mcz
==================== Summary ====================
Name: HelpSystem-Core-mt.136
Author: mt
Time: 19 November 2021, 3:16:09.544971 pm
UUID: 8804b60d-2054-3f48-8532-60f3d0112165
Ancestors: HelpSystem-Core-eem.135
Move up #priority to be able to customize it for all hand-crafted HelpTopic instances, which can hold all kinds of help topics as their subtopics.
Extend SystemReference to also include a class' superclasses (see class-list menu entry "show all comments" or "browse documentation").
=============== Diff against HelpSystem-Core-eem.135 ===============
Item was changed:
Model subclass: #AbstractHelpTopic
+ instanceVariableNames: 'priority'
- instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Core-Model'!
!AbstractHelpTopic commentStamp: 'mt 3/24/2015 16:26' prior: 0!
A HelpTopic provides content information that can be used as a help to the user.
It can be labeled with a title and marked with an (optional) icon.
Help topics form a hierarchy since any topic is able to have zero or more
subtopics. !
Item was changed:
----- Method: AbstractHelpTopic>>priority (in category 'accessing') -----
priority
+ "A hint for tools to influence sort order. See commentary in #<=."
+
+ ^ priority!
-
- ^ nil!
Item was added:
+ ----- Method: AbstractHelpTopic>>priority: (in category 'accessing') -----
+ priority: anInteger
+
+ priority := anInteger.!
Item was changed:
----- Method: Behavior>>openHelpBrowser (in category '*HelpSystem-Core') -----
openHelpBrowser
"Set openHelpBrowser"
+ ^ HelpBrowser openOn: self asHelpTopic!
- HelpBrowser openOn: self asHelpTopic!
Item was changed:
----- Method: ClassBasedHelpTopic>>priority (in category 'accessing') -----
priority
+ "Overwritten to consider #helpClass if not already set."
+
+ ^ super priority ifNil: [self helpClass priority]!
-
- ^ self helpClass priority!
Item was changed:
AbstractHelpTopic subclass: #HelpTopic
+ instanceVariableNames: 'title key icon contents subtopics isEditable shouldStyle'
- instanceVariableNames: 'title key icon contents subtopics priority isEditable shouldStyle'
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Core-Model'!
!HelpTopic commentStamp: 'mt 3/25/2015 11:27' prior: 0!
This is a configurable version of a help topic. You can define its contents, title, icon, and subtopics manually.
Help builders make use of this.!
Item was removed:
- ----- Method: HelpTopic>>priority (in category 'accessing') -----
- priority
- "A hint for tools to influence sort order."
-
- ^ priority!
Item was removed:
- ----- Method: HelpTopic>>priority: (in category 'accessing') -----
- priority: anInteger
-
- priority := anInteger.!
Item was added:
+ ----- Method: MethodListHelpTopic>>initialize (in category 'initialization') -----
+ initialize
+
+ super initialize.
+ self priority: -999.!
Item was removed:
- ----- Method: MethodListHelpTopic>>priority (in category 'accessing') -----
- priority
-
- ^ -999!
Item was changed:
----- Method: SystemReference class>>forClass: (in category 'help topic creation') -----
forClass: aClass
+
+ | root |
+ root := HelpTopic named: 'System Reference for ' translated, aClass name.
+ aClass allSuperclasses withIndexDo: [:cls :index |
+ root addSubtopic: (ClassAPIHelpTopic new
+ priority: index negated;
+ theClass: cls;
+ withSubclasses: false;
+ withMethods: true;
+ yourself)].
+ root addSubtopic: (ClassAPIHelpTopic new
+ theClass: aClass;
+ withSubclasses: true;
+ withMethods: true;
+ subclassesAsSeparateTopic: false;
+ yourself).
- |root topic |
- root := HelpTopic named: 'System reference for ', aClass name.
- topic := ClassAPIHelpTopic new theClass: aClass; withSubclasses: true; withMethods: true;
- subclassesAsSeparateTopic: false.
- root addSubtopic: topic.
^root!
More information about the Packages
mailing list