8000 Added <return:...> pragma to examples. · feenkcom/gtoolkit-remote@3ca094e · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 3ca094e

Browse files
committed
Added <return:...> pragma to examples.
1 parent fb1fcb7 commit 3ca094e

18 files changed

+808
-747
lines changed

src/GToolkit-RemoteGt-Lepiter/GtProxyRemoteInspectionExamples.class.st

Lines changed: 137 additions & 145 deletions
Large diffs are not rendered by default.

src/GToolkit-RemoteGt-Lepiter/LeProxyClassPageTypeExamples.class.st

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,59 +29,55 @@ LeProxyClassPageTypeExamples >> assertPageSerializationFor: aPage onSide: aProxy
2929
{ #category : #'examples - basic page' }
3030
LeProxyClassPageTypeExamples >> basicProxyPageLocalSide [
3131
<gtExample>
32+
<return: #LePage>
3233
| page |
33-
34-
page := LePage
35-
proxyClassName: #GtRemotePhlowDeclarativeTestInspectable
36-
proxyTypeName: #GtRemoteInspectionSimulation
37-
proxySide: LeProxyClassPageType localSide.
38-
34+
page := LePage
35+
proxyClassName: #GtRemotePhlowDeclarativeTestInspectable
36+
proxyTypeName: #GtRemoteInspectionSimulation
37+
proxySide: LeProxyClassPageType localSide.
38+
3939
self assertPageOnTestProxyFor: page.
4040
self assert: page type pageProxySide isLocalSide.
41-
41+
4242
^ page
4343
]
4444

4545
{ #category : #'examples - basic page' }
4646
LeProxyClassPageTypeExamples >> basicProxyPageLocalSide_serialisation [
4747
<gtExample>
48+
<return: #LePage>
4849
| page |
49-
5050
page := self basicProxyPageLocalSide.
51-
52-
self
53-
assertPageSerializationFor: page
54-
onSide: LeProxyClassPageType localSide.
55-
51+
52+
self assertPageSerializationFor: page onSide: LeProxyClassPageType localSide.
53+
5654
^ page
5755
]
5856

5957
{ #category : #'examples - basic page' }
6058
LeProxyClassPageTypeExamples >> basicProxyPageRemoteSide [
6159
<gtExample>
60+
<return: #LePage>
6261
| page |
63-
64-
page := LePage
65-
proxyClassName: #GtRemotePhlowDeclarativeTestInspectable
66-
proxyTypeName: #GtRemoteInspectionSimulation
67-
proxySide: LeProxyClassPageType remoteSide.
68-
62+
page := LePage
63+
proxyClassName: #GtRemotePhlowDeclarativeTestInspectable
64+
proxyTypeName: #GtRemoteInspectionSimulation
65+
proxySide: LeProxyClassPageType remoteSide.
66+
6967
self assertPageOnTestProxyFor: page.
7068
self assert: page type pageProxySide isRemoteSide.
71-
69+
7270
^ page
7371
]
7472

7573
{ #category : #'examples - basic page' }
7674
LeProxyClassPageTypeExamples >> basicProxyPageRemoteSide_serialisation [
7775
<gtExample>
76+
<return: #LePage>
7877
| page |
79-
8078
page := self basicProxyPageRemoteSide.
81-
82-
self
83-
assertPageSerializationFor: page
84-
onSide: LeProxyClassPageType remoteSide.
85-
79+
80+
self assertPageSerializationFor: page onSide: LeProxyClassPageType remoteSide.
81+
8682
^ page
8783
]

src/GToolkit-RemoteGt-LocalPhlow/GtRemotePhlowLocalViewWithRemoteColumnsExample.class.st

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,33 @@ Class {
1010
{ #category : #accessing }
1111
GtRemotePhlowLocalViewWithRemoteColumnsExample >> columnedViewElementHasCorrectFirstRowContent [
1212
<gtExample>
13-
| scripter |
14-
13+
<return: #BlScripter>
14+
| scripter |
1515
scripter := BlScripter new.
1616
scripter element: self phlowViewWithRemoteColumns asElement.
17-
17+
1818
scripter
1919
assertStep: [ :s |
2020
s
2121
on: GtPhlowCellElement index: 1;
2222
// #content;
23-
value: [ :aLabel | aLabel text asString ] equals: '1.00'].
24-
23+
value: [ :aLabel | aLabel text asString ] equals: '1.00' ].
24+
2525
scripter
2626
assertStep: [ :s |
2727
s
2828
on: GtPhlowCellElement index: 2;
2929
// #content;
30-
value: [ :aLabel | aLabel text asString ] equals: '1.01'].
31-
30+
value: [ :aLabel | aLabel text asString ] equals: '1.01' ].
31+
3232
^ scripter
3333
]
3434

3535
{ #category : #accessing }
3636
GtRemotePhlowLocalViewWithRemoteColumnsExample >> columnedViewElementHasNoErrors [
3737
<gtExample>
38-
39-
self assertObjectPhlowViewsFor: self class new
40-
41-
"| phlowView |
38+
<return: #GtRemotePhlowLocalViewWithRemoteColumnsExample>
39+
self assertObjectPhlowViewsFor: self class new "| phlowView |
4240
4341
phlowView := self phlowViewWithRemoteColumns.
4442
GtPhlowViewTester new
@@ -87,21 +85,21 @@ GtRemotePhlowLocalViewWithRemoteColumnsExample >> gtViewLocalWithRemoteColumnsFo
8785
{ #category : #accessing }
8886
GtRemotePhlowLocalViewWithRemoteColumnsExample >> phlowViewWithRemoteColumns [
8987
<gtExample>
90-
| view columns|
91-
92-
view := self gtViewLocalWithRemoteColumnsFor: GtPhlowView empty.
88+
<return: #GtPhlowColumnedListView>
89+
| view columns |
90+
view := self gtViewLocalWithRemoteColumnsFor: GtPhlowView empty.
9391
columns := view columns.
94-
92+
9593
self assert: columns size equals: 3.
9694
self assert: columns first title equals: 'Text'.
9795
self assert: columns second title equals: 'Number'.
9896
self assert: columns third title equals: 'Icon'.
99-
97+
10098
self assert: columns third backgroundComputation isNil.
10199
self assert: columns third localBackgroundComputation notNil.
102-
100+
103101
self assert: columns first cellWidth isNil.
104102
self assert: columns third localCellWidth notNil.
105-
103+
106104
^ view
107105
]

src/GToolkit-RemoteGt/GtRemotePhlowForwarderViewInspectionExamples.class.st

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,58 +37,62 @@ GtRemotePhlowForwarderViewInspectionExamples >> assertTransformedValueInListFor:
3737
{ #category : #accessing }
3838
GtRemotePhlowForwarderViewInspectionExamples >> computeObject [
3939
<gtExample>
40-
^ GtRemoteInspectionSimulation
40+
<return: #GtRemoteInspectionSimulation>
41+
^ GtRemoteInspectionSimulation
4142
openOn: GtRemotePhlowDeclarativeTestInspectable new
4243
]
4344

4445
{ #category : #examples }
4546
GtRemotePhlowForwarderViewInspectionExamples >> remoteForwardedViewToListView [
4647
<gtExample>
47-
| forwarderView |
48+
<return: #GtPhlowRemoteForwarderView>
49+
| forwarderView |
4850
forwarderView := GtPhlowRemoteForwarderView new
49-
title: 'Forward with send - to list';
50-
priority: 10;
51-
object: [ self computeObject ];
52-
view: #gtListFor:.
53-
54-
"Assertions before initializing forwarded phlow"
51+
title: 'Forward with send - to list';
52+
priority: 10;
53+
object: [ self computeObject ];
54+
view: #gtListFor:. "Assertions before initializing forwarded phlow"
5555
self assert: forwarderView title equals: 'Forward with send - to list'.
5656
self assert: forwarderView viewSymbol equals: #gtListFor:.
57-
57+
5858
self assertBasicForwarderView: forwarderView.
59-
59+
6060
self assert: forwarderView hasTransformation not.
61-
61+
6262
^ forwarderView
6363
]
6464

6565
{ #category : #examples }
6666
GtRemotePhlowForwarderViewInspectionExamples >> remoteForwardedViewWithLocalSendToListView [
6767
<gtExample>
68-
| forwarderView phlowView |
68+
<return: #GtPhlowRemoteForwarderView>
69+
| forwarderView phlowView |
6970
forwarderView := GtPhlowRemoteForwarderView new
70-
title: 'Forward with send - to list';
71-
priority: 10;
72-
object: [ self computeObject ];
73-
view: #gtListFor:;
74-
send: [ :each |
75-
{ each . each } ].
76-
77-
"Assertions before initializing forwarded phlow"
71+
title: 'Forward with send - to list';
72+
priority: 10;
73+
object: [ self computeObject ];
74+
view: #gtListFor:;
75+
send: [ :each |
76+
{each.
77+
each} ]. "Assertions before initializing forwarded phlow"
7878
self assert: forwarderView title equals: 'Forward with send - to list'.
7979
self assert: forwarderView viewSymbol equals: #gtListFor:.
80-
80+
8181
self assertBasicForwarderView: forwarderView.
82-
82+
8383
self assert: forwarderView hasTransformation.
84-
self assert: (forwarderView transformation
85-
transformedValueFrom: Object new selection: {1}) size equals: 2.
86-
87-
phlowView := forwarderView phlowView wait.
84+
self
85+
assert: (forwarderView transformation transformedValueFrom: Object new selection: {1})
86+
size
87+
equals: 2.
88+
89+
phlowView := forwarderView phlowView wait.
8890
self assert: phlowView hasTransformation.
89-
self assertTransformedValueInListFor: (phlowView transformation
90-
transformedValueFrom: GtRemotePhlowDataNode new selection: {1}).
91-
91+
self
92+
assertTransformedValueInListFor: (phlowView transformation
93+
transformedValueFrom: GtRemotePhlowDataNode new
94+
selection: {1}).
95+
9296
^ forwarderView
9397
]
9498

src/GToolkit-RemoteGt/GtRemotePhlowSimulationExamples.class.st

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ Class {
77
{ #category : #accessing }
88
GtRemotePhlowSimulationExamples >> simulationOnRemoteObject [
99
<gtExample>
10-
^ GtRemoteInspectionSimulation openOn: GtRemotePhlowDeclarativeTestInspectable new.
10+
<return: #GtRemoteInspectionSimulation>
11+
^ GtRemoteInspectionSimulation
12+
openOn: GtRemotePhlowDeclarativeTestInspectable new
1113
]

src/GToolkit-RemotePhlow-Examples/GtRemotePhlowActionSpecificationConversionExamples.class.st

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,86 +7,83 @@ Class {
77
{ #category : #examples }
88
GtRemotePhlowActionSpecificationConversionExamples >> convertButtonActionWithIcon [
99
"Demonstrate converting a button action to a declarative specification"
10+
1011
<gtExample>
12+
<return: #GtPhlowButtonActionSpecification>
1113
| phlowAction declarativeSpecification |
12-
1314
phlowAction := self createProtoActions button
14-
tooltip: 'Inspect objects';
15-
priority: 12;
16-
icon: (GtPhlowGlamorousVectorIconNameStencil new
17-
iconName: #playinspect).
18-
15+
tooltip: 'Inspect objects';
16+
priority: 12;
17+
icon: (GtPhlowGlamorousVectorIconNameStencil new iconName: #playinspect).
18+
1919
declarativeSpecification := phlowAction asGtDeclarativeAction.
2020

2121
self assert: declarativeSpecification tooltipText equals: 'Inspect objects'.
2222
self assert: declarativeSpecification label equals: nil.
23-
self
24-
assert: declarativeSpecification iconStencil
25-
equals: (GtPhlowGlamorousVectorIconNameStencil
26-
forIconName: #playinspect).
23+
self
24+
assert: declarativeSpecification iconStencil
25+
equals: (GtPhlowGlamorousVectorIconNameStencil forIconName: #playinspect).
2726
self assert: declarativeSpecification priority equals: 12.
28-
29-
self
30-
assert: declarativeSpecification asDictionaryForExport
27+
28+
self
29+
assert: declarativeSpecification asDictionaryForExport
3130
equals: self expectedButtonActionWithIconSpecification.
3231

33-
^ declarativeSpecification.
32+
^ declarativeSpecification
3433
]
3534

3635
{ #category : #examples }
3736
GtRemotePhlowActionSpecificationConversionExamples >> convertButtonActionWithIconAndLabel [
3837
"Demonstrate converting a button action to a declarative specification"
38+
3939
<gtExample>
40+
<return: #GtPhlowButtonActionSpecification>
4041
| phlowAction declarativeSpecification |
41-
4242
phlowAction := self createProtoActions button
43-
tooltip: 'Inspect objects';
44-
priority: 12;
45-
label: 'Inspect';
46-
icon: (GtPhlowGlamorousVectorIconNameStencil new
47-
iconName: #playinspect).
48-
43+
tooltip: 'Inspect objects';
44+
priority: 12;
45+
label: 'Inspect';
46+
icon: (GtPhlowGlamorousVectorIconNameStencil new iconName: #playinspect).
47+
4948
declarativeSpecification := phlowAction asGtDeclarativeAction.
5049

5150
self assert: declarativeSpecification tooltipText equals: 'Inspect objects'.
5251
self assert: declarativeSpecification label equals: 'Inspect'.
53-
self
54-
assert: declarativeSpecification iconStencil
55-
equals: (GtPhlowGlamorousVectorIconNameStencil
56-
forIconName: #playinspect).
52+
self
53+
assert: declarativeSpecification iconStencil
54+
equals: (GtPhlowGlamorousVectorIconNameStencil forIconName: #playinspect).
5755
self assert: declarativeSpecification priority equals: 12.
58-
59-
self
60-
assert: declarativeSpecification asDictionaryForExport
56+
57+
self
58+
assert: declarativeSpecification asDictionaryForExport
6159
equals: self expectedButtonActionWithIconAndLabelSpecification.
6260

63-
^ declarativeSpecification.
61+
^ declarativeSpecification
6462
]
6563

6664
{ #category : #examples }
6765
GtRemotePhlowActionSpecificationConversionExamples >> convertButtonActionWithLabelAndNoTooltip [
6866
"Demonstrate converting a button action to a declarative specification"
67+
6968
<gtExample>
69+
<return: #GtPhlowButtonActionSpecification>
7070
| phlowAction declarativeSpecification |
71-
7271
phlowAction := self createProtoActions button
73-
label: 'Inspect';
74-
priority: 12.
75-
72+
label: 'Inspect';
73+
priority: 12.
74+
7675
declarativeSpecification := phlowAction asGtDeclarativeAction.
7776

7877
self assert: declarativeSpecification tooltipText equals: nil.
7978
self assert: declarativeSpecification label equals: 'Inspect'.
80-
self
81-
assert: declarativeSpecification iconStencil
82-
equals: nil.
79+
self assert: declarativeSpecification iconStencil equals: nil.
8380
self assert: declarativeSpecification priority equals: 12.
84-
85-
self
86-
assert: declarativeSpecification asDictionaryForExport
81+
82+
self
83+
assert: declarativeSpecification asDictionaryForExport
8784
equals: self expectedButtonActionWithLabelAndNoTooltipSpecification.
8885

89-
^ declarativeSpecification.
86+
^ declarativeSpecification
9087
]
9188

9289
{ #category : #accessing }

0 commit comments

Comments
 (0)
0