The Trunk: HelpSystem-Core-ct.123.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: HelpSystem-Core-ct.123.mcz

commits-2
Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-ct.123.mcz

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

Name: HelpSystem-Core-ct.123
Author: ct
Time: 13 October 2019, 9:04:08.373932 pm
UUID: dec7ceca-320f-d945-8d2a-c2f6a5e49a52
Ancestors: HelpSystem-Core-ct.120

Refactors HelpBrowser menu: Move menu stuff from HelpBrowser into HelpTopic hierarchy in favor of a better object design

Thanks again, Marcel :-)

=============== Diff against HelpSystem-Core-mt.116 ===============

Item was added:
+ ----- Method: AbstractHelpTopic>>browseTopicFromParent: (in category 'tools') -----
+ browseTopicFromParent: parentTopic
+
+ self canBrowseTopic
+ ifTrue: [^ self browseTopic].
+ parentTopic canBrowseSubtopic
+ ifTrue: [^ parentTopic browseSubtopic: self].
+ !

Item was added:
+ ----- Method: AbstractHelpTopic>>canBrowseSubtopic (in category 'testing') -----
+ canBrowseSubtopic
+
+ ^ false!

Item was added:
+ ----- Method: AbstractHelpTopic>>canBrowseTopic (in category 'testing') -----
+ canBrowseTopic
+
+ ^ false!

Item was added:
+ ----- Method: AbstractHelpTopic>>canBrowseTopicFromParent: (in category 'testing') -----
+ canBrowseTopicFromParent: parentTopic
+
+ ^ self canBrowseTopic or: [
+ parentTopic ifNotNil: #canBrowseSubtopic ifNil: [false]]!

Item was added:
+ ----- Method: AbstractHelpTopic>>topicMenu:parentTopic: (in category 'menus') -----
+ topicMenu: aMenu parentTopic: parentTopic
+
+ aMenu
+ add: 'Inspect (i)' translated target: self action: #inspect;
+ add: 'Explore (I)' translated target: self action: #explore.
+ (self canBrowseTopicFromParent: parentTopic)
+ ifTrue: [
+ aMenu add: 'Browse (b)' translated
+ target: self
+ selector: #browseTopicFromParent:
+ argumentList: {parentTopic} ].
+
+ ^ aMenu!

Item was added:
+ ----- Method: AbstractHelpTopic>>topicMenuKey:fromParent: (in category 'menus') -----
+ topicMenuKey: aChar fromParent: parentTopic
+
+ aChar
+ caseOf: {
+ [$b] -> [(self canBrowseTopicFromParent: parentTopic)
+ ifTrue: [ self browseTopicFromParent: parentTopic ]].
+ [$i] -> [self inspect].
+ [$I] -> [self explore] }
+ otherwise: [^ false].
+ ^ true!

Item was added:
+ ----- Method: ClassAPIHelpTopic>>browseTopic (in category 'tools') -----
+ browseTopic
+
+ ^ self theClass theMetaClass browse!

Item was added:
+ ----- Method: ClassAPIHelpTopic>>canBrowseTopic (in category 'testing') -----
+ canBrowseTopic
+
+ ^ true!

Item was added:
+ ----- Method: ClassBasedHelpTopic>>browseSubtopic: (in category 'tools') -----
+ browseSubtopic: aTopic
+
+ ^ ToolSet browse: self helpClass theMetaClass selector: aTopic key!

Item was added:
+ ----- Method: ClassBasedHelpTopic>>browseTopic (in category 'tools') -----
+ browseTopic
+
+ ^ self helpClass theMetaClass browse!

Item was added:
+ ----- Method: ClassBasedHelpTopic>>canBrowseSubtopic (in category 'testing') -----
+ canBrowseSubtopic
+
+ ^ true!

Item was added:
+ ----- Method: ClassBasedHelpTopic>>canBrowseTopic (in category 'testing') -----
+ canBrowseTopic
+
+ ^ true!

Item was added:
+ ----- Method: DirectoryBasedHelpTopic>>browseTopic (in category 'tools') -----
+ browseTopic
+
+ ^ FileList openOn: self directoryEntry asFileDirectory!

Item was added:
+ ----- Method: DirectoryBasedHelpTopic>>canBrowseTopic (in category 'testing') -----
+ canBrowseTopic
+
+ ^ true!

Item was added:
+ ----- Method: FileBasedHelpTopic>>browseTopic (in category 'tools') -----
+ browseTopic
+
+ ^ FileList openOn: self fileEntry containingDirectory!

Item was added:
+ ----- Method: FileBasedHelpTopic>>canBrowseTopic (in category 'testing') -----
+ canBrowseTopic
+
+ ^ true!

Item was changed:
  ----- Method: HelpBrowser>>buildTreeWith: (in category 'toolbuilder') -----
  buildTreeWith: builder
 
  ^ builder pluggableTreeSpec new
  model: self;
  nodeClass: HelpTopicListItemWrapper;
  roots: #toplevelTopics;
+ menu: #treeMenu:;
+ keyPress: #treeKey:from:event:;
  getSelected: #currentTopic;
  setSelected: #currentTopic:;
  getSelectedPath: #currentTopicPath;
  setSelectedParent: #currentParentTopic:;
  autoDeselect: false;
  frame: (LayoutFrame
  fractions: (0@0 corner: 0.3@1)
  offsets: (0@ (Preferences standardDefaultTextFont height * 2) corner: 0@0));
  yourself!

Item was added:
+ ----- Method: HelpBrowser>>treeKey:from:event: (in category 'menus') -----
+ treeKey: aChar from: aView event: anEvent
+
+ anEvent anyModifierKeyPressed ifFalse: [^ false].
+ ^ (self currentTopic topicMenuKey: aChar fromParent: self currentParentTopic)!

Item was added:
+ ----- Method: HelpBrowser>>treeListMenu: (in category 'menus') -----
+ treeListMenu: aMenu
+ <treeListMenu>
+
+ ^ self currentTopic
+ ifNil: [aMenu]
+ ifNotNil: [:topic | topic
+ topicMenu: aMenu
+ parentTopic: self currentParentTopic]!

Item was added:
+ ----- Method: HelpBrowser>>treeMenu: (in category 'menus') -----
+ treeMenu: aMenu
+
+ ^ self menu: aMenu for: #(treeListMenu)!

Item was added:
+ ----- Method: MethodListHelpTopic>>browseTopic (in category 'tools') -----
+ browseTopic
+
+ ^ self theClass browse!

Item was added:
+ ----- Method: MethodListHelpTopic>>canBrowseTopic (in category 'testing') -----
+ canBrowseTopic
+
+ ^ true!

Item was added:
+ ----- Method: PackageAPIHelpTopic>>browseTopic (in category 'tools') -----
+ browseTopic
+
+ ^ (PackageInfo named: packageName) browse!

Item was added:
+ ----- Method: PackageAPIHelpTopic>>canBrowseTopic (in category 'testing') -----
+ canBrowseTopic
+
+ ^ true!