Skip to content

Commit

Permalink
Keeping only one protocol of the same name in the debugger protocol c…
Browse files Browse the repository at this point in the history
…hooser Fixes #1018
  • Loading branch information
StevenCostiou committed Feb 27, 2025
1 parent ba33ec6 commit 000ae58
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,20 @@ StDebuggerMethodImplementorExtension >> addProtocols: protocols [
]

{ #category : 'private - actions' }
StDebuggerMethodImplementorExtension >> addProtocolsFrom: aClassOrTrait [
StDebuggerMethodImplementorExtension >> addProtocolsFrom: aClassOrTrait [

| allProtocolsWithDuplicates |
aClassOrTrait ifNil: [ ^ self ].

self addProtocols: (aClassOrTrait isTrait
ifTrue: [ aClassOrTrait protocols ]
ifFalse: [
((aClassOrTrait withAllSuperclasses copyWithoutAll: {Object. ProtoObject})
flatCollect: #protocols) asSet])
allProtocolsWithDuplicates := Dictionary new.
(aClassOrTrait isTrait
ifTrue: [ aClassOrTrait protocols ]
ifFalse: [
(aClassOrTrait withAllSuperclasses copyWithoutAll: {
Object.
ProtoObject }) flatCollect: #protocols ]) do: [ :protocol |
allProtocolsWithDuplicates at: protocol name put: protocol ].
self addProtocols: allProtocolsWithDuplicates values
]

{ #category : 'debugger extension' }
Expand Down

0 comments on commit 000ae58

Please sign in to comment.