diff --git a/src/Spec2-Code/SpCodePresenter.class.st b/src/Spec2-Code/SpCodePresenter.class.st index 03af35a33..ed698b763 100644 --- a/src/Spec2-Code/SpCodePresenter.class.st +++ b/src/Spec2-Code/SpCodePresenter.class.st @@ -258,18 +258,23 @@ SpCodePresenter >> contextMenu [ { #category : #commands } SpCodePresenter >> doBrowseClass [ - | result | + | result selector | result := self evaluate: self selectedTextOrLine onCompileError: [ ^ self ] onError: [ :e | ^ self ]. + (result isKindOf: Symbol) ifTrue: [ - | classToBrowse | + | classToBrowse | classToBrowse := self class environment at: result ifAbsent: [ nil ]. classToBrowse ifNotNil: [ ^ self systemNavigation browse: classToBrowse ]. ^ self systemNavigation browseAllImplementorsOf: result ]. - + self selectedTextOrLine first isUppercase + ifTrue: [ ^ self systemNavigation browse: result ]. + selector := self selectedSelector ifNil: [ ^ nil ]. + selector ifNotNil: [ + ^ self systemNavigation browseAllImplementorsOf: selector ]. ^ self systemNavigation browse: result ]