Skip to content

Commit 5eb7170

Browse files
Fixed undeclared variables caused by batch renaming of classes to change prefix.
1 parent c82b9c3 commit 5eb7170

14 files changed

+54
-54
lines changed

Lieutenant-ContactBook-Extensions/CmContactBookPresenter.extension.st

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ Extension { #name : #CmContactBookPresenter }
44
CmContactBookPresenter class >> changePhoneCommandWith: presenter forRootGroup: aCmCommandsGroup [
55
<lieutenantExtension>
66
(aCmCommandsGroup / 'Edition') "Inject an additional command in 'Edition' group."
7-
register: (LtChangePhoneCommand forSpec context: presenter)
7+
register: (CmChangePhoneCommand forSpec context: presenter)
88
]
99

1010
{ #category : #'*Lieutenant-ContactBook-Extensions' }
1111
CmContactBookPresenter class >> extraCommandsWith: presenter forRootGroup: aCmCommandsGroup [
1212
<lieutenantExtension>
1313
aCmCommandsGroup
14-
register: ((LtCommandsGroup named: 'Extra') asSpecGroup
14+
register: ((CmCommandsGroup named: 'Extra') asSpecGroup
1515
basicDescription: 'Extra commands to help during development.';
1616
"Below is an example of reusing the same command for 2 different purposes."
17-
register: ((LtInspectCommand forSpec context: [ presenter selectedContact ]) "Here context is computed at the moment the command is executed."
17+
register: ((CmInspectCommand forSpec context: [ presenter selectedContact ]) "Here context is computed at the moment the command is executed."
1818
"The name and description can be adapted for its specific usage."
1919
basicName: 'Inspect contact';
2020
basicDescription: 'Open an inspector on the selected contact.';
2121
yourself);
22-
register: ((LtInspectCommand forSpec context: [ presenter contactBook ])
22+
register: ((CmInspectCommand forSpec context: [ presenter contactBook ])
2323
basicName: 'Inspect contact book';
2424
basicDescription: 'Open an inspector on the contact book.';
2525
yourself);

Lieutenant-ContactBook/CmContactBook.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ CmContactBook class >> reset [
4444
{ #category : #accessing }
4545
CmContactBook >> add: contactName phone: phone [
4646
| contact |
47-
contact := LtContact named: contactName phone: phone.
47+
contact := CmContact named: contactName phone: phone.
4848
self addContact: contact.
4949
^contact
5050
]

Lieutenant-ContactBook/CmContactBookPresenter.class.st

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Class {
1717

1818
{ #category : #commands }
1919
CmContactBookPresenter class >> buildAddingGroupWith: presenterIntance [
20-
^ (LtCommandsGroup named: 'Adding') asSpecGroup
20+
^ (CmCommandsGroup named: 'Adding') asSpecGroup
2121
basicDescription: 'Commands related to contact addition.';
22-
register: (LtAddContactCommand forSpec context: presenterIntance);
22+
register: (CmAddContactCommand forSpec context: presenterIntance);
2323
beDisplayedAsGroup;
2424
yourself
2525
]
@@ -34,26 +34,26 @@ CmContactBookPresenter class >> buildCommandsGroupWith: presenterIntance forRoot
3434

3535
{ #category : #commands }
3636
CmContactBookPresenter class >> buildEditionGroupWith: presenterIntance [
37-
^ (LtCommandsGroup named: 'Edition') asSpecGroup
37+
^ (CmCommandsGroup named: 'Edition') asSpecGroup
3838
basicDescription: 'Commands related to contact edition.';
39-
register: (LtRenameContactCommand forSpec context: presenterIntance);
39+
register: (CmRenameContactCommand forSpec context: presenterIntance);
4040
beDisplayedAsGroup;
4141
yourself
4242
]
4343

4444
{ #category : #commands }
4545
CmContactBookPresenter class >> buildRemovingGroupWith: presenterIntance [
46-
^ (LtCommandsGroup named: 'Removing') asSpecGroup
46+
^ (CmCommandsGroup named: 'Removing') asSpecGroup
4747
basicDescription: 'Command related to contact removal.';
48-
register: (LtRemoveContactCommand forSpec context: presenterIntance);
48+
register: (CmRemoveContactCommand forSpec context: presenterIntance);
4949
beDisplayedAsGroup;
5050
yourself
5151
]
5252

5353
{ #category : #examples }
5454
CmContactBookPresenter class >> coworkersExample [
5555
<example>
56-
^ (self on: LtContactBook coworkers) openWithSpec
56+
^ (self on: CmContactBook coworkers) openWithSpec
5757
]
5858

5959
{ #category : #examples }
@@ -68,7 +68,7 @@ CmContactBookPresenter class >> defaultSpec [
6868
{ #category : #examples }
6969
CmContactBookPresenter class >> familyExample [
7070
<example>
71-
^ (self on: LtContactBook family) openWithSpec
71+
^ (self on: CmContactBook family) openWithSpec
7272
]
7373

7474
{ #category : #accessing }
@@ -110,7 +110,7 @@ CmContactBookPresenter >> newContact [
110110
(splitted size = 2 and: [ splitted allSatisfy: #isNotEmpty ])
111111
ifFalse: [ InvalidUserInput signal: 'Please enter contact name and phone (split by comma)' ].
112112

113-
^ LtContact new
113+
^ CmContact new
114114
name: splitted first;
115115
phone: splitted second;
116116
yourself

Lieutenant-Spec-Tests/CmMenuPresenterBuilderTest.class.st

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ Class {
1414
{ #category : #running }
1515
CmMenuPresenterBuilderTest >> setUp [
1616
super setUp.
17-
menuBuilder := LtMenuPresenterBuilder new.
17+
menuBuilder := CmMenuPresenterBuilder new.
1818

19-
commandsGroup := (LtCommandsGroup named: 'root') asSpecGroup beRoot
20-
register: (LtBlockCommand new
19+
commandsGroup := (CmCommandsGroup named: 'root') asSpecGroup beRoot
20+
register: (CmBlockCommand new
2121
basicName: 'c1';
2222
block: [ ];
2323
yourself) asSpecCommand;
24-
register: ((LtCommandsGroup named: 'sub1') asSpecGroup
25-
register: (LtBlockCommand new
24+
register: ((CmCommandsGroup named: 'sub1') asSpecGroup
25+
register: (CmBlockCommand new
2626
basicName: 'c2';
2727
block: [ ];
2828
yourself) asSpecCommand;
29-
register: (LtBlockCommand new
29+
register: (CmBlockCommand new
3030
basicName: 'c3';
3131
block: [ ];
3232
yourself) asSpecCommand);
33-
register: (LtBlockCommand new
33+
register: (CmBlockCommand new
3434
basicName: 'c4';
3535
block: [ ];
3636
yourself) asSpecCommand;
@@ -43,7 +43,7 @@ CmMenuPresenterBuilderTest >> testVisitLtCommand [
4343
evaluationResult := nil.
4444
self assert: menuBuilder menuPresenter defaultGroup menuItems isEmpty.
4545

46-
(LtBlockCommand new
46+
(CmBlockCommand new
4747
basicName: 'c';
4848
basicDescription: 'desc';
4949
context: [ 41 ];
@@ -65,7 +65,7 @@ CmMenuPresenterBuilderTest >> testVisitLtCommand [
6565
CmMenuPresenterBuilderTest >> testVisitLtCommandThatCantBeRun [
6666
self assert: menuBuilder menuPresenter defaultGroup menuItems isEmpty.
6767

68-
(LtBlockCommand new
68+
(CmBlockCommand new
6969
basicName: 'c';
7070
basicDescription: 'desc';
7171
context: [ 41 ];

Lieutenant-Spec-Tests/CmSpecCommandTest.class.st

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Class {
1010
{ #category : #running }
1111
CmSpecCommandTest >> setUp [
1212
super setUp.
13-
command := LtSpecCommand new
13+
command := CmSpecCommand new
1414
]
1515

1616
{ #category : #test }
@@ -44,7 +44,7 @@ CmSpecCommandTest >> testIconName [
4444

4545
{ #category : #test }
4646
CmSpecCommandTest >> testShortcutKey [
47-
self should: [ command shortcutKey ] raise: LtNoShortcutIsDefined.
47+
self should: [ command shortcutKey ] raise: CmNoShortcutIsDefined.
4848

4949
command shortcutKey: $a asKeyCombination.
5050

Lieutenant-Spec/CmCommand.extension.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Extension { #name : #CmCommand }
33
{ #category : #'*Lieutenant-Spec' }
44
CmCommand >> asSpecCommand [
55
"Subclasses might override this method to define default icon and shortcut."
6-
^ self decorateWith: LtSpecCommand
6+
^ self decorateWith: CmSpecCommand
77
]
88

99
{ #category : #'*Lieutenant-Spec' }

Lieutenant-Spec/CmCommandsGroup.extension.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Extension { #name : #CmCommandsGroup }
33
{ #category : #'*Lieutenant-Spec' }
44
CmCommandsGroup >> asSpecGroup [
55
"Subclasses might override this method to define default icon."
6-
^ self decorateWith: LtSpecCommandGroup
6+
^ self decorateWith: CmSpecCommandGroup
77
]
88

99
{ #category : #'*Lieutenant-Spec' }

Lieutenant-Spec/CmSpecCommand.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ CmSpecCommand >> initialize [
7676

7777
{ #category : #accessing }
7878
CmSpecCommand >> shortcutKey [
79-
^ shortcutKey ifNil: [ LtNoShortcutIsDefined signalCommand: self ]
79+
^ shortcutKey ifNil: [ CmNoShortcutIsDefined signalCommand: self ]
8080
]
8181

8282
{ #category : #accessing }

Lieutenant-Spec/CmSpecCommandGroup.class.st

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Class {
1818

1919
{ #category : #default }
2020
CmSpecCommandGroup class >> defaultDisplayStrategy [
21-
^ LtSpecDisplayAsSubMenu new
21+
^ CmSpecDisplayAsSubMenu new
2222
]
2323

2424
{ #category : #default }
@@ -28,19 +28,19 @@ CmSpecCommandGroup class >> defaultIconName [
2828

2929
{ #category : #converting }
3030
CmSpecCommandGroup >> asMenuPresenter [
31-
^ LtMenuPresenterBuilder new
31+
^ CmMenuPresenterBuilder new
3232
visit: self;
3333
menuPresenter
3434
]
3535

3636
{ #category : #configuring }
3737
CmSpecCommandGroup >> beDisplayedAsGroup [
38-
self displayStrategy: LtSpecDisplayAsGroup new
38+
self displayStrategy: CmSpecDisplayAsGroup new
3939
]
4040

4141
{ #category : #configuring }
4242
CmSpecCommandGroup >> beDisplayedAsSubMenu [
43-
self displayStrategy: LtSpecDisplayAsSubMenu new
43+
self displayStrategy: CmSpecDisplayAsSubMenu new
4444
]
4545

4646
{ #category : #configuring }
@@ -83,7 +83,7 @@ CmSpecCommandGroup >> initialize [
8383

8484
{ #category : #'as yet unclassified' }
8585
CmSpecCommandGroup >> installShortcutsIn: aPresenter [
86-
LtShortcutInstaller new
86+
CmShortcutInstaller new
8787
presenter: aPresenter;
8888
visit: self
8989
]

Lieutenant-Spec/ComposablePresenter.extension.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ComposablePresenter class >> buildCommandsGroupWith: presenter forRoot: aCmComma
1212
{ #category : #'*Lieutenant-Spec' }
1313
ComposablePresenter class >> buildRootCommandsGroupFor: presenterIntance [
1414
| rootCommandGroup |
15-
rootCommandGroup := LtCommandsGroup forSpec beRoot.
15+
rootCommandGroup := CmCommandsGroup forSpec beRoot.
1616
"Register default commands."
1717
self buildCommandsGroupWith: presenterIntance forRoot: rootCommandGroup.
1818

Lieutenant-Tests/CmCommandDecoratorTest.class.st

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Class {
1414
{ #category : #running }
1515
CmCommandDecoratorTest >> setUp [
1616
super setUp.
17-
commandToBeDecorated := LtCommand new.
17+
commandToBeDecorated := CmCommand new.
1818

1919
commandToBeDecorated
2020
basicName: 'command for test';
2121
basicDescription: 'This command is only cerated for the purpose of unit tests.';
2222
context: Object new.
2323

24-
decorator := LtCommandDecorator decorate: commandToBeDecorated
24+
decorator := CmCommandDecorator decorate: commandToBeDecorated
2525
]
2626

2727
{ #category : #test }
@@ -36,7 +36,7 @@ CmCommandDecoratorTest >> testContext [
3636

3737
{ #category : #tests }
3838
CmCommandDecoratorTest >> testDecorate [
39-
self assert: decorator class equals: LtCommandDecorator.
39+
self assert: decorator class equals: CmCommandDecorator.
4040
self assert: decorator decoratedCommand equals: commandToBeDecorated
4141
]
4242

Lieutenant-Tests/CmCommandTest.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Class {
1010
{ #category : #running }
1111
CmCommandTest >> setUp [
1212
super setUp.
13-
command := LtFakeCommand new.
13+
command := CmFakeCommand new.
1414
]
1515

1616
{ #category : #test }

Lieutenant-Tests/CmCommandsGroupTest.class.st

+15-15
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ Class {
1717
{ #category : #running }
1818
CmCommandsGroupTest >> setUp [
1919
super setUp.
20-
group := LtCommandsGroup named: 'main group'.
21-
firstCommand := LtBlockCommand new
20+
group := CmCommandsGroup named: 'main group'.
21+
firstCommand := CmBlockCommand new
2222
basicName: 'first command';
2323
block: [ :x | x ];
2424
context: [ 1 ];
2525
yourself.
2626

2727

28-
subCommand1 := LtBlockCommand new
28+
subCommand1 := CmBlockCommand new
2929
basicName: 'sub command 1';
3030
block: [ :x | x ];
3131
context: [ 11 ];
3232
yourself.
3333

34-
subGroup1 := (LtCommandsGroup named: 'sub group 1')
34+
subGroup1 := (CmCommandsGroup named: 'sub group 1')
3535
register: subCommand1;
3636
yourself.
3737

38-
subGroup2 := LtCommandsGroup named: 'sub group 2'. "Empty on purpose."
38+
subGroup2 := CmCommandsGroup named: 'sub group 2'. "Empty on purpose."
3939

4040
group
4141
register: firstCommand;
@@ -77,7 +77,7 @@ CmCommandsGroupTest >> testGroups [
7777

7878
{ #category : #test }
7979
CmCommandsGroupTest >> testHasCommand [
80-
self deny: (group hasCommand: LtCommand new).
80+
self deny: (group hasCommand: CmCommand new).
8181

8282
self assert: (group hasCommand: firstCommand)
8383
]
@@ -94,9 +94,9 @@ CmCommandsGroupTest >> testHasEntryNamed [
9494
{ #category : #test }
9595
CmCommandsGroupTest >> testInitialize [
9696
| newGroup |
97-
newGroup := LtCommandsGroup new.
97+
newGroup := CmCommandsGroup new.
9898

99-
self assert: newGroup basicName equals: LtCommandsGroup defaultName.
99+
self assert: newGroup basicName equals: CmCommandsGroup defaultName.
100100
self assert: newGroup entries isEmpty
101101
]
102102

@@ -105,7 +105,7 @@ CmCommandsGroupTest >> testRegisterCommandWithContext [
105105
| secondCommand |
106106
self deny: (group hasEntryNamed: 'second command').
107107

108-
secondCommand := LtBlockCommand new
108+
secondCommand := CmBlockCommand new
109109
basicName: 'second command';
110110
block: [ :x | x ];
111111
context: 42;
@@ -122,7 +122,7 @@ CmCommandsGroupTest >> testRegisterCommandWithContextBlock [
122122
| secondCommand secondCommandWithSameName |
123123
self deny: (group hasEntryNamed: 'second command').
124124

125-
secondCommand := LtBlockCommand new
125+
secondCommand := CmBlockCommand new
126126
basicName: 'second command';
127127
block: [ :x | x ];
128128
context: [ 42 ];
@@ -132,15 +132,15 @@ CmCommandsGroupTest >> testRegisterCommandWithContextBlock [
132132
self assert: (group hasEntryNamed: 'second command').
133133
self assert: (group commandOrGroupNamed: 'second command') equals: secondCommand.
134134

135-
secondCommandWithSameName := LtBlockCommand new
135+
secondCommandWithSameName := CmBlockCommand new
136136
basicName: 'second command';
137137
block: [ :x | x ];
138138
context: [ ];
139139
yourself.
140140

141141
self
142142
should: [ group register: secondCommandWithSameName]
143-
raise: LtDuplicatedEntryName
143+
raise: CmDuplicatedEntryName
144144
withExceptionDo: [ :error |
145145
self assert: error entryName equals: 'second command' ]
146146
]
@@ -150,15 +150,15 @@ CmCommandsGroupTest >> testRegisterSubRegister [
150150
| subGroup3 |
151151
self deny: (group hasEntryNamed: 'sub group 3').
152152

153-
subGroup3 := LtCommandsGroup named: 'sub group 3'.
153+
subGroup3 := CmCommandsGroup named: 'sub group 3'.
154154
group register: subGroup3.
155155

156156
self assert: (group hasEntryNamed: 'sub group 3').
157157
self assert: (group commandOrGroupNamed: 'sub group 3') equals: subGroup3.
158158

159159
self
160-
should: [ group register: (LtCommandsGroup named: 'sub group 3') ]
161-
raise: LtDuplicatedEntryName
160+
should: [ group register: (CmCommandsGroup named: 'sub group 3') ]
161+
raise: CmDuplicatedEntryName
162162
withExceptionDo: [ :error |
163163
self assert: error entryName equals: 'sub group 3' ]
164164
]

Lieutenant/CmCommandsGroup.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ CmCommandsGroup class >> named: aString [
3939
{ #category : #accessing }
4040
CmCommandsGroup >> allCommands [
4141
| visitor |
42-
visitor := LtCommandsCollector new.
42+
visitor := CmCommandsCollector new.
4343
self acceptVisitor: visitor.
4444
^ visitor commandsCollected
4545
]

0 commit comments

Comments
 (0)