Skip to content

Commit

Permalink
Merge pull request #512 from tesonep/Inspector-sorting-on-collections
Browse files Browse the repository at this point in the history
Inspector-sorting-on-collections
  • Loading branch information
MarcusDenker authored May 4, 2023
2 parents fa5ce86 + 18d8916 commit f6867d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/NewTools-Inspector-Extensions/Bag.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ Bag >> inspectionItems: aBuilder [
title: 'Items';
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each key ];
beNotExpandable;
beSortable;
yourself);
addColumn: (SpStringTableColumn new
title: 'Occurences';
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: (self occurrencesOf: each key) ];
beSortable;
yourself);
items: contents associations;
yourself
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Inspector-Extensions/Collection.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Collection >> inspectionItems: aBuilder [
addColumn: (SpStringTableColumn new
title: 'Value';
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each ];
sortFunction: #printString ascending;
beSortable;
yourself);
items: self asOrderedCollection;
yourself
Expand Down

0 comments on commit f6867d1

Please sign in to comment.