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.
- Loading branch information
Showing
116 changed files
with
594 additions
and
261 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
toolbuilder | ||
addLane | ||
|
||
| lane laneJson prompt | | ||
prompt := FillInTheBlank request: 'Enter a lane name' initialAnswer:''. | ||
prompt = '' ifTrue: [^ self]. | ||
laneJson := self provider createColumn: prompt. | ||
lane := SPBLane newFrom: laneJson. | ||
| lane prompt| | ||
prompt := FillInTheBlankMorph request: 'Enter a lane name' initialAnswer:''. | ||
prompt = '' ifTrue: [^ self]. | ||
lane := self provider createColumn: prompt. | ||
lane | ||
board: self; | ||
provider: self provider. | ||
provider: self provider; | ||
changeProvider: self changeProvider. | ||
self lanes add: lane. | ||
lane jsonCards: {} asOrderedCollection. | ||
self updateLanesWithCards. |
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
5 changes: 5 additions & 0 deletions
5
Squello-Core.package/SPBBoard.class/instance/changeProvider..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 @@ | ||
accessing | ||
changeProvider: anSPBChangeProvider | ||
|
||
changeProvider := anSPBChangeProvider. | ||
self changeProvider addDependent: self. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBBoard.class/instance/changeProvider.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 | ||
changeProvider | ||
|
||
^ changeProvider. |
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,5 @@ | ||
accessing | ||
createLanes | ||
|
||
self lanes: self provider queryColumns. | ||
self lanes: self provider queryColumns. | ||
self lanes do: [:lane | lane changeProvider: self changeProvider]. |
5 changes: 0 additions & 5 deletions
5
Squello-Core.package/SPBBoard.class/instance/getProjectNames.st
This file was deleted.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
Squello-Core.package/SPBBoard.class/instance/loadProject..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,19 @@ | ||
initialize-release | ||
loadProject: aString | ||
|
||
| chosenProject projectNames projects | | ||
(aString includesSubstring: '/projects') | ||
ifTrue: | ||
[self provider parseInputBoardUrl: aString] | ||
ifFalse: | ||
[projects := (self provider getProjects: aString). | ||
(projects isArray) ifFalse: | ||
[^ UserDialogBoxMorph inform: 'Invalid repository url' asString title: 'Operation canceled']. | ||
projectNames := projects collect: [:each | each at: 'name']. | ||
chosenProject := UIManager default chooseFrom: projectNames values: projects title: 'Choose your project:'. | ||
chosenProject ifNil: [^self]. | ||
self provider | ||
projectID: (chosenProject at: 'id'); | ||
projectTitle: (chosenProject at: 'name')]. | ||
|
||
self changeProvider projectId: self provider projectID. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Squello-Core.package/SPBBoard.class/instance/update.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,14 @@ | ||
updating | ||
update: aSymbol with: aDictionary | ||
|
||
| lane | | ||
aSymbol = #board ifFalse: [^ self]. | ||
|
||
((aDictionary at: 'action') = #create) ifTrue: | ||
[lane := SPBLane newFrom: aDictionary. | ||
lane | ||
board: self; | ||
provider: self provider; | ||
changeProvider: self changeProvider. | ||
self lanes add: lane. | ||
self updateLanesWithCards]. |
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,3 +1,4 @@ | ||
accessing | ||
window: anObject | ||
window := anObject | ||
|
||
window := anObject. |
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,3 +1,4 @@ | ||
accessing | ||
window | ||
^ window | ||
|
||
^ window. |
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
5 changes: 5 additions & 0 deletions
5
Squello-Core.package/SPBCard.class/instance/changeProvider..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 @@ | ||
accessing | ||
changeProvider: anSPBGithubChangeProvider | ||
|
||
changeProvider := anSPBGithubChangeProvider. | ||
changeProvider addDependent: self. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBCard.class/instance/changeProvider.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 | ||
changeProvider | ||
|
||
^ changeProvider. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
Squello-Core.package/SPBCard.class/instance/update.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,43 @@ | ||
updating | ||
update: aSymbol with: aDictionary | ||
|
||
| board newLane label assignee | | ||
aSymbol = #card ifFalse: [^ self]. | ||
(self id = (aDictionary at: 'id') or: [self issueId = (aDictionary at: 'id')]) ifFalse: [^ self]. | ||
|
||
((aDictionary at: 'action') = #move) ifTrue: | ||
[board := self lane board. | ||
newLane := board lanes detect: [:lane | lane id = (aDictionary at: 'laneId')]. | ||
self openInWorld. | ||
newLane removeFromOldLane: self. | ||
newLane pasteup addMorph: self. | ||
(aDictionary at: 'after') | ||
ifNil: [newLane cards addFirst: self] | ||
ifNotNil: [newLane cards add: self after: (newLane cards detect: [:card | card id = (aDictionary at: 'after')])]. | ||
newLane resizeToFitCards. | ||
self lane alignCards. | ||
newLane alignCards. | ||
self lane: newLane]. | ||
((aDictionary at: 'action') = #delete) ifTrue: | ||
[self lane deleteCard: self]. | ||
((aDictionary at: 'action') = #edit) ifTrue: | ||
[self updateTitle: (aDictionary at: 'title'). | ||
self updateDescription: (aDictionary at: 'body')]. | ||
((aDictionary at: 'action') = #label) ifTrue: | ||
[label := SPBLabel newFrom: (aDictionary at: 'label'). | ||
self labels add: label. | ||
self updateLabelIcons]. | ||
((aDictionary at: 'action') = #unlabel) ifTrue: | ||
[label := SPBLabel newFrom: (aDictionary at: 'label'). | ||
self labels remove: label. | ||
self updateLabelIcons]. | ||
((aDictionary at: 'action') = #assign) ifTrue: | ||
[assignee := SPBAssignee newFrom: (aDictionary at: 'assignee'). | ||
self assignees add: assignee. | ||
self updateAssigneeCount]. | ||
((aDictionary at: 'action') = #unassign) ifTrue: | ||
[assignee := SPBAssignee newFrom: (aDictionary at: 'assignee'). | ||
self assignees remove: assignee. | ||
self updateAssigneeCount]. | ||
|
||
self lane board activeCard = self ifTrue: [self lane board changeActiveCardTo: self] |
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.