Skip to content

Commit

Permalink
rename GtFilterModelItem subclasses [feenkcom/gtoolkit#3983]
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajKubelka committed Sep 30, 2024
1 parent d3d62d4 commit 13258dd
Show file tree
Hide file tree
Showing 20 changed files with 103 additions and 101 deletions.
10 changes: 6 additions & 4 deletions src/GToolkit-Coder-Examples/GtFilterModelExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ GtFilterModelExamples >> itemsModel [
aModel
items: {self textModel.
self shortListModel.
self booleanModel}.
self assert: aModel items size equals: 3.
self booleanModel.
self invariableModel.
self toggleModel.}.
self assert: aModel items size equals: 5.

^ aModel
]
Expand Down Expand Up @@ -78,8 +80,8 @@ GtFilterModelExamples >> toggleModel [
aModel := GtFilterToggleModel new.
aModel label: 'Side'.
aModel
items: {GtFilterShortListInstanceSideItem new.
GtFilterShortListClassSideItem new}.
items: {GtFilterModelInstanceSideItem new.
GtFilterModelClassSideItem new}.
aModel selectFirstItem.

^ aModel
Expand Down
2 changes: 1 addition & 1 deletion src/GToolkit-Coder-UI/Class.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Extension { #name : #Class }

{ #category : #'*GToolkit-Coder-UI' }
Class >> asFilterModelItem [
^ GtFilterShortListModelClassItem new itemClass: self
^ GtFilterModelClassItem new itemClass: self
]
15 changes: 15 additions & 0 deletions src/GToolkit-Coder-UI/GtFilterModelAbstractMethodItem.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Class {
#name : #GtFilterModelAbstractMethodItem,
#superclass : #GtFilterModelMethodDefinitionItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #testing }
GtFilterModelAbstractMethodItem >> isSubclassResponsibilityMethod [
^ true
]

{ #category : #accessing }
GtFilterModelAbstractMethodItem >> label [
^ 'abstract'
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class {
#name : #GtFilterShortListModelClassItem,
#name : #GtFilterModelClassItem,
#superclass : #GtFilterModelItem,
#instVars : [
'itemClass'
Expand All @@ -8,28 +8,28 @@ Class {
}

{ #category : #accessing }
GtFilterShortListModelClassItem >> itemClass [
GtFilterModelClassItem >> itemClass [
^ itemClass
]

{ #category : #accessing }
GtFilterShortListModelClassItem >> itemClass: anObject [
GtFilterModelClassItem >> itemClass: anObject [
itemClass := anObject
]

{ #category : #accessing }
GtFilterShortListModelClassItem >> itemSymbol [
GtFilterModelClassItem >> itemSymbol [
^ self itemClass instanceSide name asSymbol
]

{ #category : #accessing }
GtFilterShortListModelClassItem >> label [
GtFilterModelClassItem >> label [
<return: #String>
^ self itemClass name
]

{ #category : #printing }
GtFilterShortListModelClassItem >> printOn: aStream [
GtFilterModelClassItem >> printOn: aStream [
super printOn: aStream.

aStream
Expand Down
10 changes: 10 additions & 0 deletions src/GToolkit-Coder-UI/GtFilterModelClassOriginItem.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Class {
#name : #GtFilterModelClassOriginItem,
#superclass : #GtFilterModelMethodOriginItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #accessing }
GtFilterModelClassOriginItem >> label [
^ 'non-trait'
]
10 changes: 10 additions & 0 deletions src/GToolkit-Coder-UI/GtFilterModelClassSideItem.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Class {
#name : #GtFilterModelClassSideItem,
#superclass : #GtFilterModelSideItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #accessing }
GtFilterModelClassSideItem >> label [
^ 'class'
]
10 changes: 10 additions & 0 deletions src/GToolkit-Coder-UI/GtFilterModelDefinedMethodItem.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Class {
#name : #GtFilterModelDefinedMethodItem,
#superclass : #GtFilterModelMethodDefinitionItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #testing }
GtFilterModelDefinedMethodItem >> label [
^ 'defined'
]
15 changes: 15 additions & 0 deletions src/GToolkit-Coder-UI/GtFilterModelInstanceSideItem.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Class {
#name : #GtFilterModelInstanceSideItem,
#superclass : #GtFilterModelSideItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #testing }
GtFilterModelInstanceSideItem >> isInstanceSideMethod [
^ true
]

{ #category : #accessing }
GtFilterModelInstanceSideItem >> label [
^ 'instance'
]
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Class {
#name : #GtFilterShortListModelMethodDefinitionItem,
#name : #GtFilterModelMethodDefinitionItem,
#superclass : #GtFilterModelItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #testing }
GtFilterShortListModelMethodDefinitionItem >> isSubclassResponsibilityMethod [
GtFilterModelMethodDefinitionItem >> isSubclassResponsibilityMethod [
^ false
]
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Class {
#name : #GtFilterShortListModelMethodOriginItem,
#name : #GtFilterModelMethodOriginItem,
#superclass : #GtFilterModelItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #testing }
GtFilterShortListModelMethodOriginItem >> isTraitOrigin [
GtFilterModelMethodOriginItem >> isTraitOrigin [
^ false
]
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Class {
#name : #GtFilterShortListSideItem,
#name : #GtFilterModelSideItem,
#superclass : #GtFilterModelItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #testing }
GtFilterShortListSideItem >> isInstanceSideMethod [
GtFilterModelSideItem >> isInstanceSideMethod [
^ false
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class {
#name : #GtFilterShortListModelStringItem,
#name : #GtFilterModelStringItem,
#superclass : #GtFilterModelItem,
#instVars : [
'string'
Expand All @@ -8,7 +8,7 @@ Class {
}

{ #category : #comparing }
GtFilterShortListModelStringItem >> = anObject [
GtFilterModelStringItem >> = anObject [
self == anObject ifTrue: [ ^ true ].

self class = anObject class ifFalse: [ ^ false ].
Expand All @@ -17,23 +17,23 @@ GtFilterShortListModelStringItem >> = anObject [
]

{ #category : #comparing }
GtFilterShortListModelStringItem >> hash [
GtFilterModelStringItem >> hash [
^ self class hash bitXor: self string hash
]

{ #category : #accessing }
GtFilterShortListModelStringItem >> itemValue [
GtFilterModelStringItem >> itemValue [
^ self string
]

{ #category : #accessing }
GtFilterShortListModelStringItem >> label [
GtFilterModelStringItem >> label [
<return: #String or: #BlText>
^ self string
]

{ #category : #printing }
GtFilterShortListModelStringItem >> printOn: aStream [
GtFilterModelStringItem >> printOn: aStream [
super printOn: aStream.

aStream
Expand All @@ -43,11 +43,11 @@ GtFilterShortListModelStringItem >> printOn: aStream [
]

{ #category : #accessing }
GtFilterShortListModelStringItem >> string [
GtFilterModelStringItem >> string [
^ string
]

{ #category : #accessing }
GtFilterShortListModelStringItem >> string: aString [
GtFilterModelStringItem >> string: aString [
string := aString
]
15 changes: 15 additions & 0 deletions src/GToolkit-Coder-UI/GtFilterModelTraitOriginItem.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Class {
#name : #GtFilterModelTraitOriginItem,
#superclass : #GtFilterModelMethodOriginItem,
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #testing }
GtFilterModelTraitOriginItem >> isTraitOrigin [
^ true
]

{ #category : #accessing }
GtFilterModelTraitOriginItem >> label [
^ 'trait'
]
10 changes: 0 additions & 10 deletions src/GToolkit-Coder-UI/GtFilterShortListClassSideItem.class.st

This file was deleted.

15 changes: 0 additions & 15 deletions src/GToolkit-Coder-UI/GtFilterShortListInstanceSideItem.class.st

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion src/GToolkit-Coder-UI/String.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Extension { #name : #String }

{ #category : #'*GToolkit-Coder-UI' }
String >> asFilterModelItem [
^ GtFilterShortListModelStringItem new string: self
^ GtFilterModelStringItem new string: self
]

0 comments on commit 13258dd

Please sign in to comment.