Skip to content

Commit

Permalink
Improving a bit more :) all tests pass.
Browse files Browse the repository at this point in the history
Now I would love to have such cool playground navigation in calypso pane. sweet dreams.
  • Loading branch information
Ducasse committed Aug 16, 2023
1 parent a8de67f commit 1ec2e74
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Spec2-Code/SpCodePresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
]

Expand Down

0 comments on commit 1ec2e74

Please sign in to comment.