Skip to content
Merged
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
9 changes: 5 additions & 4 deletions src/Spec2-Code/SpCodePresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,17 @@ SpCodePresenter >> doBrowseHierarchy [

{ #category : 'commands' }
SpCodePresenter >> doBrowseImplementors [

| variableOrClassName variable |

variableOrClassName := self selectedSelector ifNil: [ ^ nil ].
variable := self lookupEnvironment lookupVar: variableOrClassName.

"For global and class variables, implementors-of browses the class of the value of the variable,
for classes this means it browses the class"
(variable isNotNil and: [variable isGlobalVariable or: [variable isClassVariable]])
(variable isNotNil and: [ variable isGlobalVariable or: [ variable isClassVariable ] ])
ifTrue: [ self systemNavigation browse: variable value ]
ifFalse: [ self systemNavigation browseAllImplementorsOf: variableOrClassName ]
ifFalse: [
(Smalltalk tools toolNamed: #messageList) browseImplementorsOfAll: { variableOrClassName } from: self interactionModel behavior ]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right fix should be to pass though system navigation here, as it was before.

If we need to add an argument for the origin class, that should be extended there too.
And maybe we need to support the old method too for some time as a compatibility measure.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the cause of the failing tests:

  • SpCodePresenterTest testDoBrowseSenders
  • SpCodePresenterTest testDoBrowseSendersOfClassNameShouldNotFindIfNotInEnvironment
  • SpCodePresenterTest testDoBrowseSendersOfClassNameWhenInPlaygroundButNotAvailable
  • SpCodePresenterTest testDoBrowseSendersOfClassPoolVariableShouldSelectClassPoolVariableUsersWhenInDebuggerButNotAvailable
  • SpCodePresenterTest testDoBrowseSendersOfClassVariableShouldSelectClassVariableUsersWhenInDebuggerButNotAvailable
  • SpCodePresenterTest testDoBrowseSendersOfClassVariableShouldSelectClassVariableUsersWhenInStaticContextButNotAvailable

]

{ #category : 'commands' }
Expand Down
Loading