gtoolkit icon indicating copy to clipboard operation
gtoolkit copied to clipboard

`GtSearchNullFilter` should override `gtAreAllGtSearchMethodsFilterKind` to return `true`

Open botwhytho opened this issue 8 months ago • 2 comments

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 ]

Image

GtSearchFilter withAllSubclasses
	inject: GtSearchNullFilter new
	into: [ :acc :each | acc | each gtMethodsInClass ]

Image

botwhytho avatar Apr 01 '25 07:04 botwhytho

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

chisandrei avatar Apr 01 '25 17:04 chisandrei

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

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.

botwhytho avatar Apr 01 '25 20:04 botwhytho