smalltalksqueak

Squeak Smalltalk find method by author


In Squeak, each method has author initials and names at the bottom of the browser window. Is it possible to show all contribution of one author, either by his/her initials or name?


Solution

  • While the precise behavior that you describe currently does not exist as a specific button, there are a couple of ways how you can achieve this:

    Option A: Browse all methods and filter by author

    1. Do the following:

      self systemNavigation browseAllSelect: [:m | true]
      
    2. Yellow-click into the message list, select more... > filter message list... > messages authored by me.

    (Note that you can use these filters from any other message list as well, such as implementors or senders lists.)

    Option B: Programmatically filter methods using SystemNavigation

    Do the following:

    CurrentReadOnlySourceFiles cacheDuring:
        [self systemNavigation browseAllSelect: [:method |
            (method timeStamp ifEmpty: ['']) beginsWith: Utilities authorInitials]]
    

    Option C: Browse the current change set

    If you are not working with multiple change sets/projects or if you would like to retrieve changes from your current change set only, this method is simpler:

    In the world main docking bar, press the changes title (centered in the middle of the bar, HomeProject by default) and choose Browse changed methods. You can also choose Browse current change set instead to get a structured overview of your changes by class in a change sorter.