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.
Remove code duplication in cardBuilder and formatting methods
- Loading branch information
1 parent
d8c82ec
commit 2f1ab20
Showing
40 changed files
with
97 additions
and
117 deletions.
There are no files selected for viewing
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
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
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
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
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
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
10 changes: 10 additions & 0 deletions
10
Squello-Core.package/SPBCardBuilder.class/instance/buildCardWith..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,10 @@ | ||
building | ||
buildCardWith: anJsonObject | ||
|
||
^ self | ||
card: SPBCard new; | ||
setCardID: (anJsonObject at: 'id'); | ||
setupMouseEvents; | ||
buildContent: (anJsonObject at: 'content_url'); | ||
buildUI; | ||
buildIndicatorDetection. |
9 changes: 1 addition & 8 deletions
9
Squello-Core.package/SPBCardBuilder.class/instance/buildFromRemote.into..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,16 +1,9 @@ | ||
building | ||
buildFromRemote: aJsonObject into: anSPBLane | ||
|
||
self | ||
card: SPBCard new; | ||
setCardID: (aJsonObject at: 'id'); | ||
setupMouseEvents; | ||
buildContent: (aJsonObject at: 'content_url'); | ||
buildUI; | ||
buildIndicatorDetection. | ||
self buildCardWith: aJsonObject. | ||
self card boardProvider: self boardProvider. | ||
self card changeProvider: self changeProvider. | ||
self card openInWorld. | ||
self setCardLane: anSPBLane. | ||
|
||
^ self card. |
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
13 changes: 1 addition & 12 deletions
13
Squello-Core.package/SPBCardBuilder.class/instance/buildNew.atTop..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,17 +1,6 @@ | ||
building | ||
buildNew: aDictionary atTop: anSPBLane | ||
|
||
| cardJson | | ||
cardJson := self boardProvider createCard: aDictionary into: anSPBLane. | ||
self | ||
card: SPBCard new; | ||
setCardID: (cardJson at: 'id'); | ||
setupMouseEvents; | ||
buildContent: (cardJson at: 'content_url'); | ||
buildUI; | ||
buildIndicatorDetection. | ||
self card boardProvider: self boardProvider. | ||
self card changeProvider: self changeProvider. | ||
self card openInWorld. | ||
self buildNew: aDictionary with: anSPBLane. | ||
self setCardLaneAtTop: anSPBLane. | ||
^ self card. |
13 changes: 1 addition & 12 deletions
13
Squello-Core.package/SPBCardBuilder.class/instance/buildNew.into..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,17 +1,6 @@ | ||
building | ||
buildNew: aDictionary into: anSPBLane | ||
|
||
| cardJson | | ||
cardJson := self boardProvider createCard: aDictionary into: anSPBLane. | ||
self | ||
card: SPBCard new; | ||
setCardID: (cardJson at: 'id'); | ||
setupMouseEvents; | ||
buildContent: (cardJson at: 'content_url'); | ||
buildUI; | ||
buildIndicatorDetection. | ||
self card boardProvider: self boardProvider. | ||
self card changeProvider: self changeProvider. | ||
self card openInWorld. | ||
self buildNew: aDictionary with: anSPBLane. | ||
self setCardLane: anSPBLane. | ||
^ self card. |
9 changes: 9 additions & 0 deletions
9
Squello-Core.package/SPBCardBuilder.class/instance/buildNew.with..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,9 @@ | ||
building | ||
buildNew: aDictionary with: anSPBLane | ||
|
||
| cardJson | | ||
cardJson := self boardProvider createCard: aDictionary into: anSPBLane. | ||
self buildCardWith: cardJson. | ||
self card boardProvider: self boardProvider. | ||
self card changeProvider: self changeProvider. | ||
self card openInWorld. |
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
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
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
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: 2 additions & 2 deletions
4
Squello-Core.package/SPBIndicatorDetectionCard.class/instance/card..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 | ||
card: aSPBCard | ||
card: anSPBCard | ||
|
||
card := aSPBCard. | ||
card := anSPBCard. |
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
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
Oops, something went wrong.