PackageDescription: RBHierarchicalMethods


RB Hierarchical Methods

Last published: January 27, 2014 by 'chaider'

Defines 0 Classes
Extends 6 Classes


Orders and indents method lists according to the class hierarchy.

The alphabetically sorted methods of each class are ordered by
1. class methods
2. instance methods
3. class variable initializers.
At last, all namespace variable initializers are listed.


Implementation
The code depends only on the refactoring browser and runs in a vanilla visual.im.

Compatible with versions from at least VW 7.4.1 up to 7.10 (current).
Therefore, I did not use new features of VW like symbols as blocks or in-place sorting.

Known problem
When a method is removed from the list (menu item "Remove From List"), the indents of the items are adjusted properly:
i.e. methods of subclasses are less indented when the last method of a superclass is removed from the list.
This, unfortunately, does not work when the method is removed from the image (menu item "Remove"),
because the browser does not update its state and leaves the deleted method in its internal list (which is used to calculate the indentation).
Therefore, the indentation does not change and becomes inconsistent.


Examples

(Refactory.Browser.BrowserEnvironment new implementorsOf: #name) openEditor
(Refactory.Browser.BrowserEnvironment new referencesTo: #when:send:to:) openEditor
(Refactory.Browser.BrowserEnvironment new instVarRefsTo: 'handle' in: Smalltalk.Graphics.DisplaySurface) openEditor
(Refactory.Browser.BrowserEnvironment new instVarReadersTo: 'handle' in: Smalltalk.Graphics.DisplaySurface) openEditor
(Refactory.Browser.BrowserEnvironment new instVarWritersTo: 'handle' in: Smalltalk.Graphics.DisplaySurface) openEditor