Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.880.mcz==================== Summary ====================
Name: Tools-mt.880
Author: mt
Time: 3 September 2019, 9:03:13.138063 am
UUID: 334585e8-af9b-db41-b6bf-b8ac4d0a7128
Ancestors: Tools-mt.879
Adds very simple support for formatting the class hierachy labels in the code browser.
=============== Diff against Tools-mt.879 ===============
Item was changed:
----- Method: Browser>>flattenHierarchyTree:on:indent:by: (in category 'class list') -----
flattenHierarchyTree: classHierarchy on: col indent: indent by: indentChars
+ ^ self
+ flattenHierarchyTree: classHierarchy
+ on: col
+ indent: indent
+ by: ' '
+ format: [:class | class name]!
- "Recursively add to col the names in classHierarchy indenting to show the hierarchical relationship. Use indentChars to do the indenting: spaces, tabs, etc."
- | plusIndent |
- plusIndent := indentChars.
- classHierarchy do: [:assoc |
- | class childs |
- class := assoc key.
- col add: indent , class name.
- childs := assoc value.
- self
- flattenHierarchyTree: childs
- on: col
- indent: indent , plusIndent
- by: indentChars].
- ^ col!
Item was added:
+ ----- Method: Browser>>flattenHierarchyTree:on:indent:by:format: (in category 'class list') -----
+ flattenHierarchyTree: classHierarchy on: col indent: indent by: indentChars format: formatBlock
+ "Recursively add to col the names in classHierarchy indenting to show the hierarchical relationship. Use indentChars to do the indenting: spaces, tabs, etc."
+ | plusIndent |
+ plusIndent := indentChars.
+ classHierarchy do: [:assoc |
+ | class childs label |
+ class := assoc key.
+ label := formatBlock value: class.
+ label isText
+ ifTrue: [col add: indent asText, label]
+ ifFalse: [col add: indent, label].
+ childs := assoc value.
+ self
+ flattenHierarchyTree: childs
+ on: col
+ indent: indent , plusIndent
+ by: indentChars
+ format: formatBlock].
+ ^ col!