Skip to content

Commit

Permalink
distinguish between coder and filter search filters [feenkcom/gtoolki…
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajKubelka committed Oct 22, 2024
1 parent efc4c7a commit a939c14
Showing 1 changed file with 83 additions and 24 deletions.
107 changes: 83 additions & 24 deletions src/GToolkit-Coder-UI/GtFilterDefaultSearchFilters.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,121 @@ Class {
#traits : 'TGtUniqueInstance',
#classTraits : 'TGtUniqueInstance classTrait',
#instVars : [
'searchFilters'
'coderSearchFilters',
'filterSearchFilters'
],
#classInstVars : [
'uniqueInstance'
],
#category : #'GToolkit-Coder-UI-Filters - Support'
}

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters class >> addSearchFilter: aSearchFilter [
self default addSearchFilter: aSearchFilter
GtFilterDefaultSearchFilters class >> addCoderSearchFilter: aSearchFilter [
self default addCoderSearchFilter: aSearchFilter
]

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters class >> addCoderSearchFilters: aCollectionOfSearchFilters [
self default addCoderSearchFilters: aCollectionOfSearchFilters
]

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters class >> addSearchFilters: aCollectionOfSearchFilters [
self default addSearchFilters: aCollectionOfSearchFilters
GtFilterDefaultSearchFilters class >> addFilterSearchFilter: aSearchFilter [
self default addFilterSearchFilter: aSearchFilter
]

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters class >> addFilterSearchFilters: aCollectionOfSearchFilters [
self default addFilterSearchFilters: aCollectionOfSearchFilters
]

{ #category : #accessing }
GtFilterDefaultSearchFilters class >> searchFilters [
^ self default searchFilters
GtFilterDefaultSearchFilters class >> coderSearchFilters [
^ self default coderSearchFilters
]

{ #category : #accessing }
GtFilterDefaultSearchFilters class >> searchFilters: aCollectionOfSearchFilters [
self default searchFilters: aCollectionOfSearchFilters
GtFilterDefaultSearchFilters class >> coderSearchFilters: aCollectionOfSearchFilters [
self default coderSearchFilters: aCollectionOfSearchFilters
]

{ #category : #accessing }
GtFilterDefaultSearchFilters class >> filterSearchFilters [
^ self default filterSearchFilters
]

{ #category : #accessing }
GtFilterDefaultSearchFilters class >> filterSearchFilters: aCollectionOfSearchFilters [
self default filterSearchFilters: aCollectionOfSearchFilters
]

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters >> addCoderSearchFilter: aSearchFilter [
coderSearchFilters := self coderSearchFilters copyWith: aSearchFilter
]

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters >> addSearchFilter: aSearchFilter [
searchFilters := self searchFilters copyWith: aSearchFilter
GtFilterDefaultSearchFilters >> addCoderSearchFilters: aCollectionOfSearchFilters [
coderSearchFilters := self coderSearchFilters copyWithAll: aCollectionOfSearchFilters
]

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters >> addSearchFilters: aCollectionOfSearchFilters [
searchFilters := self searchFilters copyWithAll: aCollectionOfSearchFilters
GtFilterDefaultSearchFilters >> addFilterSearchFilter: aSearchFilter [
filterSearchFilters := self filterSearchFilters copyWith: aSearchFilter
]

{ #category : #'add / remove' }
GtFilterDefaultSearchFilters >> addFilterSearchFilters: aCollectionOfSearchFilters [
filterSearchFilters := self filterSearchFilters copyWithAll: aCollectionOfSearchFilters
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> coderSearchFilters [
^ coderSearchFilters ifNil: [ coderSearchFilters := self collectCoderSearchFilters ]
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> coderSearchFilters: aCollectionOfSearchFilters [
coderSearchFilters := aCollectionOfSearchFilters
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> collectSearchFilters [
^ self pragmaSearchFilters
GtFilterDefaultSearchFilters >> collectCoderSearchFilters [
^ self pragmaCoderSearchFilters
collect: [ :eachPragma | self perform: eachPragma methodSelector ]
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> pragmaSearchFilters [
GtFilterDefaultSearchFilters >> collectFilterSearchFilters [
^ self pragmaFilterSearchFilters
collect: [ :eachPragma | self perform: eachPragma methodSelector ]
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> filterSearchFilters [
^ filterSearchFilters ifNil: [ filterSearchFilters := self collectFilterSearchFilters ]
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> filterSearchFilters: aCollectionOfSearchFilters [
filterSearchFilters := aCollectionOfSearchFilters
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> pragmaCoderSearchFilters [
^ Pragma
allNamed: #gtDefaultSearchFilter:
allNamed: #gtCoderSearchFilter:
from: self class
to: GtFilterDefaultSearchFilters
sortedByArgument: 1
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> searchFilters [
^ searchFilters ifNil: [ searchFilters := self collectSearchFilters ]
]

{ #category : #accessing }
GtFilterDefaultSearchFilters >> searchFilters: aCollectionOfSearchFilters [
searchFilters := aCollectionOfSearchFilters
GtFilterDefaultSearchFilters >> pragmaFilterSearchFilters [
^ Pragma
allNamed: #gtFilterSearchFilter:
from: self class
to: GtFilterDefaultSearchFilters
sortedByArgument: 1
]

0 comments on commit a939c14

Please sign in to comment.