generated from hpi-swa-teaching/SWT-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring: Add null-object-pattern for card & fix red tests
- Loading branch information
Luke
committed
Jul 31, 2022
1 parent
f9f4b90
commit e238095
Showing
118 changed files
with
481 additions
and
216 deletions.
There are no files selected for viewing
Empty file.
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/addAssignee..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-remote | ||
addAssignee: anSPBAssignee | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/addAssigneeLocal..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-local | ||
addAssigneeLocal: anSPBAssignee | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/addLabel..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-remote | ||
addLabel: anSPBLabel | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/addLabelLocal..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-local | ||
addLabelLocal: anSPBLabel | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/assignees.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
assignees | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/description.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
description | ||
|
||
self subclassResponsibility. |
5 changes: 5 additions & 0 deletions
5
Squello-Core.package/SPBAbstractCard.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self color: Color gray. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/isRealCard.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
testing | ||
isRealCard | ||
|
||
^ false. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/labels.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
labels | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/removeAssignee..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-remote | ||
removeAssignee: anSPBAssignee | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/removeAssigneeLocal..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-local | ||
removeAssigneeLocal: anSPBAssignee | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/removeLabel..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-remote | ||
removeLabel: anSPBLabel | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/removeLabelLocal..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-local | ||
removeLabelLocal: anSPBLabel | ||
|
||
self subclassResponsibility. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
title | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/updateDescription..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-remote | ||
updateDescription: aString | ||
|
||
self subclassResponsibility. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBAbstractCard.class/instance/updateTitle..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating-remote | ||
updateTitle: aString | ||
|
||
self subclassResponsibility. |
20 changes: 20 additions & 0 deletions
20
Squello-Core.package/SPBAbstractCard.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"addAssignee:" : "lo 7/31/2022 17:03", | ||
"addAssigneeLocal:" : "lo 7/31/2022 17:03", | ||
"addLabel:" : "lo 7/31/2022 17:04", | ||
"addLabelLocal:" : "lo 7/31/2022 17:04", | ||
"assignees" : "lo 7/31/2022 16:04", | ||
"description" : "lo 7/31/2022 16:06", | ||
"initialize" : "lo 7/31/2022 16:02", | ||
"isRealCard" : "lo 7/31/2022 17:03", | ||
"labels" : "lo 7/31/2022 16:06", | ||
"removeAssignee:" : "lo 7/31/2022 17:04", | ||
"removeAssigneeLocal:" : "lo 7/31/2022 17:04", | ||
"removeLabel:" : "lo 7/31/2022 17:04", | ||
"removeLabelLocal:" : "lo 7/31/2022 17:04", | ||
"title" : "lo 7/31/2022 16:06", | ||
"updateDescription:" : "lo 7/31/2022 17:04", | ||
"updateTitle:" : "lo 7/31/2022 17:04" } } |
14 changes: 14 additions & 0 deletions
14
Squello-Core.package/SPBAbstractCard.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "Squello-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "SPBAbstractCard", | ||
"pools" : [ | ||
], | ||
"super" : "Morph", | ||
"type" : "normal" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
activeCard: anSPBCard | ||
activeCard: anSPBAbstractCard | ||
|
||
activeCard := anSPBCard. | ||
activeCard := anSPBAbstractCard. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
activeCard | ||
|
||
^ activeCard. | ||
^ activeCard ifNil: [activeCard := SPBNullCard new]. |
6 changes: 1 addition & 5 deletions
6
Squello-Core.package/SPBBoard.class/instance/activeCardAssigneeList.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
update sidebar | ||
activeCardAssigneeList | ||
|
||
self activeCard | ||
ifNil: [^ {}]. | ||
self activeCard assignees | ||
ifNil: [^ {#('---assigned---')}]. | ||
^ #('---assigned---') , self activeCard assignees. | ||
^ self activeCardAssigneeListHeader , self activeCard assignees. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBBoard.class/instance/activeCardAssigneeListHeader.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
update sidebar | ||
activeCardAssigneeListHeader | ||
|
||
^ #('---assigned---'). |
4 changes: 1 addition & 3 deletions
4
Squello-Core.package/SPBBoard.class/instance/activeCardDescription.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
update sidebar | ||
activeCardDescription | ||
|
||
self activeCard | ||
ifNil: [^ '']. | ||
^ self activeCard description ifNil: ['']. | ||
^ self activeCard description. |
6 changes: 1 addition & 5 deletions
6
Squello-Core.package/SPBBoard.class/instance/activeCardLabelList.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
update sidebar | ||
activeCardLabelList | ||
|
||
self activeCard | ||
ifNil: [^ {}]. | ||
self activeCard labels | ||
ifNil: [^ {#('---used labels---')}]. | ||
^ #('---used labels---'), self activeCard labels. | ||
^ self activeCardLabelListHeader, self activeCard labels. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBBoard.class/instance/activeCardLabelListHeader.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
update sidebar | ||
activeCardLabelListHeader | ||
|
||
^ #('---used labels---'). |
4 changes: 1 addition & 3 deletions
4
Squello-Core.package/SPBBoard.class/instance/activeCardTitle.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
update sidebar | ||
activeCardTitle | ||
|
||
self activeCard | ||
ifNil: [^ '']. | ||
^ self activeCard title ifNil: ['']. | ||
^ self activeCard title. |
6 changes: 3 additions & 3 deletions
6
Squello-Core.package/SPBBoard.class/instance/assigneeSelected..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
accessing | ||
assigneeSelected: anObject | ||
assigneeSelected: anSPBAssignee | ||
|
||
(anObject isKindOf: SPBAssignee) | ||
(anSPBAssignee isKindOf: SPBAssignee) | ||
ifFalse: [^ self]. | ||
assigneeSelected := anObject. | ||
assigneeSelected := anSPBAssignee. | ||
self changed: #assigneeSelected. |
4 changes: 2 additions & 2 deletions
4
Squello-Core.package/SPBBoard.class/instance/boardProvider..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
boardProvider: anObject | ||
boardProvider: anSPBGithubBoardProvider | ||
|
||
boardProvider := anObject. | ||
boardProvider := anSPBGithubBoardProvider. |
15 changes: 5 additions & 10 deletions
15
Squello-Core.package/SPBBoard.class/instance/dropOnAssignees.at..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
drag and drop | ||
dropOnAssignees: anSPBAssignee at: index | ||
|
||
| assignees | | ||
assignees := self activeCard assignees. | ||
(anSPBAssignee isKindOf: SPBAssignee) | ||
ifFalse: [^ self inform: 'Can only drop assignees']. | ||
(assignees | ||
anySatisfy: [:each | each = anSPBAssignee]) | ||
ifTrue: [^ self]. | ||
self activeCard assignees add: anSPBAssignee. | ||
self activeCard updateAssigneeCount. | ||
self changed: #potentialAssigneesList. | ||
self changed: #activeCardAssigneeList. | ||
self boardProvider addAssignee: anSPBAssignee toCard: self activeCard. | ||
|
||
self activeCard addAssignee: anSPBAssignee. | ||
self | ||
changed: #potentialAssigneesList; | ||
changed: #activeCardAssigneeList. |
15 changes: 5 additions & 10 deletions
15
Squello-Core.package/SPBBoard.class/instance/dropOnLabels.at..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
drag and drop | ||
dropOnLabels: anSPBLabel at: index | ||
|
||
| labels | | ||
labels := self activeCard labels. | ||
(anSPBLabel isKindOf: SPBLabel) | ||
ifFalse: [^ self inform: 'Can only drop labels']. | ||
(labels | ||
anySatisfy: [:each | each = anSPBLabel]) | ||
ifTrue: [^ self]. | ||
self activeCard labels add: anSPBLabel. | ||
self activeCard updateLabelIcons. | ||
self changed: #potentialLabelsList. | ||
self changed: #activeCardLabelList. | ||
self boardProvider addLabel: anSPBLabel toCard: self activeCard. | ||
|
||
self activeCard addLabel: anSPBLabel. | ||
self | ||
changed: #potentialLabelsList; | ||
changed: #activeCardLabelList. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
Squello-Core.package/SPBBoard.class/instance/labelSelected..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
accessing | ||
labelSelected: anObject | ||
labelSelected: anSPBLabel | ||
|
||
(anObject isKindOf: SPBLabel) | ||
(anSPBLabel isKindOf: SPBLabel) | ||
ifFalse: [^ self]. | ||
labelSelected := anObject. | ||
labelSelected := anSPBLabel. | ||
self changed: #labelSelected. |
6 changes: 3 additions & 3 deletions
6
Squello-Core.package/SPBBoard.class/instance/potentialAssigneeSelected..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
accessing | ||
potentialAssigneeSelected: anObject | ||
potentialAssigneeSelected: anSPBAssignee | ||
|
||
(anObject isKindOf: SPBAssignee) | ||
(anSPBAssignee isKindOf: SPBAssignee) | ||
ifFalse: [^ self]. | ||
potentialAssigneeSelected := anObject. | ||
potentialAssigneeSelected := anSPBAssignee. | ||
self changed: #potentialAssigneeSelected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBBoard.class/instance/potentialAssigneesListHeader.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
update sidebar | ||
potentialAssigneesListHeader | ||
|
||
^ #('---unassigned---'). |
6 changes: 3 additions & 3 deletions
6
Squello-Core.package/SPBBoard.class/instance/potentialLabelSelected..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
accessing | ||
potentialLabelSelected: anObject | ||
potentialLabelSelected: anSPBLabel | ||
|
||
(anObject isKindOf: SPBLabel) | ||
(anSPBLabel isKindOf: SPBLabel) | ||
ifFalse: [^ self]. | ||
potentialLabelSelected := anObject. | ||
potentialLabelSelected := anSPBLabel. | ||
self changed: #potentialLabelSelected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBBoard.class/instance/potentialLabelsListHeader.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
update sidebar | ||
potentialLabelsListHeader | ||
|
||
^ #('---not used labels---'). |
Oops, something went wrong.