Skip to content

Commit 81f961e

Browse files
authored
Merge pull request #26 from OpenSmock/stash_cleanup
cleanup
2 parents b72137b + 311ddae commit 81f961e

File tree

5 files changed

+45
-46
lines changed

5 files changed

+45
-46
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
Extension { #name : #BlAffineCompositeTransformation }
22

33
{ #category : #'*Bloc-Serialization-Stash' }
4-
BlAffineCompositeTransformation >> allSetterAndGettersForMyStash [
4+
BlAffineCompositeTransformation >> stashAccessors [
55

6-
^ self transformations flatCollect: [ :each | each allSetterAndGettersForMyStash ]
6+
<stashAccessors>
7+
^ self transformations flatCollect: [ :each |
8+
each allSetterAndGettersForMyStash ]
79
]
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
Extension { #name : #BlFlowLayout }
22

33
{ #category : #'*Bloc-Serialization-Stash' }
4-
BlFlowLayout >> allSetterAndGettersForMyStash [
4+
BlFlowLayout >> asStashConstructor [
5+
6+
self orientation isVertical ifTrue: [ ^ 'BlFlowLayout vertical' ].
7+
^ 'BlFlowLayout horizontal'
8+
]
9+
10+
{ #category : #'*Bloc-Serialization-Stash' }
11+
BlFlowLayout >> stashAccessors [
512

6-
"We ovverride this method to take into account the default value of alignment"
713
<stashAccessors>
814
| settersAndGetters |
915
settersAndGetters := OrderedCollection new.
10-
(verticalAlignment == self defaultVerticalAlignment and: [
11-
horizontalAlignment == self defaultHorizontalAlignment ]) ifFalse: [
12-
settersAndGetters addAll: self allSetterAndGettersForMyStashForMyTraits ].
1316
self direction == self defaultDirection ifFalse: [
1417
settersAndGetters add: #direction ].
1518
^ settersAndGetters
1619
]
17-
18-
{ #category : #'*Bloc-Serialization-Stash' }
19-
BlFlowLayout >> asStashConstructor [
20-
21-
self orientation isVertical ifTrue: [ ^ 'BlFlowLayout vertical' ].
22-
^ 'BlFlowLayout horizontal'
23-
]
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
Extension { #name : #BlLinearLayout }
22

33
{ #category : #'*Bloc-Serialization-Stash' }
4-
BlLinearLayout >> allSetterAndGettersForMyStash [
4+
BlLinearLayout >> asStashConstructor [
55

6+
self isVertical ifTrue: [ ^ 'BlLinearLayout vertical' ].
7+
^ 'BlLinearLayout horizontal'
8+
]
9+
10+
{ #category : #'*Bloc-Serialization-Stash' }
11+
BlLinearLayout >> stashAccessors [
612
"We ovverride this method to take into account the default value of alignment"
13+
714
<stashAccessors>
815
| settersAndGetters |
916
settersAndGetters := OrderedCollection new.
10-
(verticalAlignment == self defaultVerticalAlignment and: [
11-
horizontalAlignment == self defaultHorizontalAlignment ]) ifFalse: [
12-
settersAndGetters addAll: self allSetterAndGettersForMyStashForMyTraits ].
1317
cellSpacing == 0.0 ifFalse: [ settersAndGetters add: #cellSpacing ].
1418
interspace == 0.0 ifFalse: [ settersAndGetters add: #interspace ].
1519
self direction == self defaultDirection ifFalse: [
@@ -23,10 +27,3 @@ BlLinearLayout >> allSetterAndGettersForMyStash [
2327
settersAndGetters add: #weightSum ].
2428
^ settersAndGetters
2529
]
26-
27-
{ #category : #'*Bloc-Serialization-Stash' }
28-
BlLinearLayout >> asStashConstructor [
29-
30-
self isVertical ifTrue: [ ^ 'BlLinearLayout vertical' ].
31-
^ 'BlLinearLayout horizontal'
32-
]

src/Bloc-Serialization-Stash/BlTextElement.extension.st

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
Extension { #name : #BlTextElement }
22

3-
{ #category : #'*Bloc-Serialization-Stash' }
4-
BlTextElement >> allSetterAndGettersForMyStash [
5-
6-
^ super allSetterAndGettersForMyStash , { #text }
7-
]
8-
93
{ #category : #'*Bloc-Serialization-Stash' }
104
BlTextElement >> stashAccessors [
115

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
Extension { #name : #TBlAlignable }
22

33
{ #category : #'*Bloc-Serialization-Stash' }
4-
TBlAlignable >> allSetterAndGettersOfTraitForMyStash: anObject [
4+
TBlAlignable >> defaultStashAlignementTest [
55

6-
^ { ([ :alignement |
7-
| val |
8-
val := #alignNone.
9-
alignement isAlignTopLeft ifTrue: [ val := #alignTopLeft ].
10-
alignement isAlignTopCenter ifTrue: [ val := #alignTopCenter ].
11-
alignement isAlignTopRight ifTrue: [ val := #alignTopRight ].
12-
alignement isAlignCenterLeft ifTrue: [ val := #alignCenterLeft ].
13-
alignement isAlignCenter ifTrue: [ val := #alignCenter ].
14-
alignement isAlignCenterRight ifTrue: [ val := #alignCenterRight ].
15-
alignement isAlignBottomLeft ifTrue: [ val := #alignBottomLeft ].
16-
alignement isAlignBottomCenter ifTrue: [
17-
val := #alignBottomCenter ].
18-
alignement isAlignBottomRight ifTrue: [ val := #alignBottomRight ].
19-
val ] -> self) onlySetOnStash }
6+
^ (self verticalAlignment == self defaultVerticalAlignment and: [
7+
self horizontalAlignment == self defaultHorizontalAlignment ])
8+
]
9+
10+
{ #category : #'*Bloc-Serialization-Stash' }
11+
TBlAlignable >> stashAccessorForTBlAlignable [
12+
13+
<stashAccessors>
14+
self defaultStashAlignementTest ifTrue: [ ^ { } ].
15+
self isAlignTopLeft ifTrue: [ ^ { #alignTopLeft onlySetOnStash } ].
16+
self isAlignTopCenter ifTrue: [ ^ { #alignTopCenter onlySetOnStash } ].
17+
self isAlignTopRight ifTrue: [ ^ { #alignTopRight onlySetOnStash } ].
18+
self isAlignCenterLeft ifTrue: [
19+
^ { #alignCenterLeft onlySetOnStash } ].
20+
self isAlignCenter ifTrue: [ ^ { #alignCenter onlySetOnStash } ].
21+
self isAlignCenterRight ifTrue: [
22+
^ { #alignCenterRight onlySetOnStash } ].
23+
self isAlignBottomLeft ifTrue: [
24+
^ { #alignBottomLeft onlySetOnStash } ].
25+
self isAlignBottomCenter ifTrue: [
26+
^ { #alignBottomCenter onlySetOnStash } ].
27+
self isAlignBottomRight ifTrue: [
28+
^ { #alignBottomRight onlySetOnStash } ].
29+
^ { }
2030
]

0 commit comments

Comments
 (0)