gtoolkit
gtoolkit copied to clipboard
`GtSearchNullFilter` should override `gtAreAllGtSearchMethodsFilterKind` to return `true`
The two below queries are logically the same yet the one that uses GtSearchNullFilter doesn't display the By Package and By Class views. Overriding the above method that returns false in a superclass resolves this.
GtSearchFilter allSubclasses
inject: GtSearchFilter gtMethodsInClass
into: [ :acc :each | acc | each gtMethodsInClass ]
GtSearchFilter withAllSubclasses
inject: GtSearchNullFilter new
into: [ :acc :each | acc | each gtMethodsInClass ]
The null filter could be used also in other cases when showing those views would not make sense. Another way would be to add a null filter for methods ( GtSearchNullMethodFilter) and do something like GtSearchNullFilter forMethods
The null filter could be used also in other cases when showing those views would not make sense. Another way would be to add a null filter for methods (
GtSearchNullMethodFilter) and do something likeGtSearchNullFilter forMethods
Oh true, I misremembered the view logic checking all the filters but it only checks the first one. The proposed solution makes sense to me.