Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/BaselineOfNewTools/BaselineOfNewTools.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ BaselineOfNewTools >> baseline: spec [
'NewTools-Spotter-Processors-Tests' );

group: 'SystemReporter' with: #( 'Core' 'NewTools-SystemReporter' );

group: 'Methods' with: #( 'Core' 'NewTools-SpTextPresenterDecorators' 'NewTools-MethodBrowsers' );
group: 'Methods' with: #( 'Core' 'NewTools-SpTextPresenterDecorators' 'NewTools-MethodBrowsers' 'NewTools-MethodBrowsers-Tests');
"Not in the image for the moment, we need a pass on them"

group: 'CritiqueBrowser' with: #( 'NewTools-CodeCritiques' 'NewTools-CodeCritiques-Tests' );
Expand Down
43 changes: 43 additions & 0 deletions src/NewTools-MethodBrowsers-Tests/StMessageBrowserTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Class {
#name : 'StMessageBrowserTest',
#superclass : 'TestCase',
#instVars : [
'presenter'
],
#category : 'NewTools-MethodBrowsers-Tests',
#package : 'NewTools-MethodBrowsers-Tests'
}

{ #category : 'running' }
StMessageBrowserTest >> setUp [
super setUp.

presenter := StMessageBrowser new.
]

{ #category : 'running' }
StMessageBrowserTest >> tearDown [

presenter ifNotNil: [ presenter delete ].
super tearDown.
]

{ #category : 'tests' }
StMessageBrowserTest >> testCanOpenBrowserOnImplementors [

presenter browse: #asString implementors asImplementorsOf: #asString.

self assert: presenter messages notEmpty.
self assert: (presenter window title beginsWith: 'Implementors of #asString [').
self assert: presenter messages size > 30
]

{ #category : 'tests' }
StMessageBrowserTest >> testCanOpenBrowserOnSenders [

presenter browse: #asString senders asSendersOf: #asString.

self assert: presenter messages notEmpty.
self assert: (presenter window title beginsWith: 'Senders of #asString [').
self assert: presenter messages size > 1500
]
37 changes: 25 additions & 12 deletions src/NewTools-MethodBrowsers/StMessageBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,15 @@ StMessageBrowser class >> browse: aCollection [

{ #category : 'instance creation' }
StMessageBrowser class >> browse: aCollection asImplementorsOf: aSymbol [
"Special Version that sets the correct refreshing Block for Implentors Browser"

^ self new
setRefreshingBlockForImplementorsOf: aSymbol;
messages: aCollection;
title: 'Implementors of ', aSymbol printString;
open
browse: aCollection asImplementorsOf: aSymbol
]

{ #category : 'instance creation' }
StMessageBrowser class >> browse: aCollection asSendersOf: aSymbol [
"Special Version that sets the correct refreshing Block for Senders Browser"

^ self new
setRefreshingBlockForSendersOf: aSymbol;
highlight: aSymbol;
messages: aCollection;
title: 'Senders of ', aSymbol printString;
open
^ self browse: aCollection asSendersOf: aSymbol
]

{ #category : 'instance creation' }
Expand Down Expand Up @@ -160,6 +150,29 @@ StMessageBrowser >> addHighlightedSegments [
yourself)
]

{ #category : 'api' }
StMessageBrowser >> browse: aCollection asImplementorsOf: aSymbol [
"Special Version that sets the correct refreshing Block for Implementors Browser"

^ self
setRefreshingBlockForImplementorsOf: aSymbol;
messages: aCollection;
title: 'Implementors of ', aSymbol printString;
open
]

{ #category : 'api' }
StMessageBrowser >> browse: aCollection asSendersOf: aSymbol [
"Special Version that sets the correct refreshing Block for Senders Browser"

^ self
setRefreshingBlockForSendersOf: aSymbol;
highlight: aSymbol;
messages: aCollection;
title: 'Senders of ', aSymbol printString;
open
]

{ #category : 'announcements' }
StMessageBrowser >> classRenamed: anAnnouncement [
"this method forces the announcement to be handled in the UI process"
Expand Down
Loading