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.
added save on close for local boards
- Loading branch information
Showing
45 changed files
with
166 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
...ocalBoardProvider.class/instance/repo..st → ...ractBoardProvider.class/instance/repo..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,3 +1,4 @@ | ||
accessing | ||
repo: anObject | ||
repo := anObject | ||
|
||
repo := anObject. |
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
...ocalBoardProvider.class/instance/user..st → ...ractBoardProvider.class/instance/user..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,3 +1,4 @@ | ||
accessing | ||
user: anObject | ||
user := anObject | ||
|
||
user := anObject. |
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
...ge/SPBBoard.class/instance/localPrefix.st → ...ckage/SPBBoard.class/class/localPrefix.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 @@ | ||
initialize-release | ||
startup | ||
localPrefix | ||
|
||
^ 'local.'. |
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/class/openInBackground.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 @@ | ||
startup | ||
openInBackground | ||
|
||
^ [self open] fork. |
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,7 @@ | ||
startup | ||
openLocal: aString | ||
|
||
| localFile | | ||
localFile := SPBBoardSaver load: aString. | ||
localFile ifNotNil: [:file|^ file window openInWorld]. | ||
^ self newLocalWith: aString. |
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: 1 addition & 5 deletions
6
Squello-Core.package/SPBBoard.class/instance/parseLocalRepoFromUrl..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 @@ | ||
initialize-release | ||
parseLocalRepoFromUrl: aString | ||
|
||
| repoNum | | ||
(aString beginsWith: self localPrefix) ifFalse: [^ self error]. | ||
repoNum := aString allButFirst: self localPrefix size. | ||
|
||
self boardProvider repo: repoNum asInteger. | ||
self boardProvider repo: aString. |
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 | ||
saveBoard | ||
|
||
SPBBoardSaver save: self as: self boardProvider repo. |
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
Empty file.
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 | ||
boards: anObject | ||
|
||
boards := 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
accessing | ||
boards | ||
|
||
boards ifNil: [self boards: Dictionary new]. | ||
^ boards. |
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 @@ | ||
save/load | ||
clear | ||
|
||
self boards removeAll. |
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 @@ | ||
save/load | ||
delete: anObject | ||
|
||
self boards removeKey: anObject ifAbsent: []. |
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 @@ | ||
save/load | ||
load: anObject | ||
|
||
^ (self boards at: anObject ifAbsent: nil) veryDeepCopy. |
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 @@ | ||
save/load | ||
save: anObject as: anotherObject | ||
|
||
self boards at: anotherObject put: anObject veryDeepCopy. |
10 changes: 10 additions & 0 deletions
10
Squello-Core.package/SPBBoardSaver.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,10 @@ | ||
{ | ||
"class" : { | ||
"boards" : "FP 5/27/2024 15:39", | ||
"boards:" : "FP 5/27/2024 15:39", | ||
"clear" : "FP 5/27/2024 17:17", | ||
"delete:" : "FP 5/27/2024 16:21", | ||
"load:" : "FP 5/27/2024 16:18", | ||
"save:as:" : "FP 5/27/2024 16:15" }, | ||
"instance" : { | ||
} } |
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" : [ | ||
"boards" ], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "SPBBoardSaver", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } |
4 changes: 0 additions & 4 deletions
4
Squello-Core.package/SPBGithubBoardProvider.class/instance/repo..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
Squello-Core.package/SPBGithubBoardProvider.class/instance/user..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
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
3 changes: 0 additions & 3 deletions
3
Squello-Core.package/SPBLocalBoardProvider.class/instance/repo.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
Squello-Core.package/SPBLocalBoardProvider.class/instance/user.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
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 was deleted.
Oops, something went wrong.
Empty file.
4 changes: 4 additions & 0 deletions
4
Squello-Tests.package/SPBLocalSaveTests.class/instance/copyableObject.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 @@ | ||
values | ||
copyableObject | ||
|
||
^ Object new. |
4 changes: 4 additions & 0 deletions
4
Squello-Tests.package/SPBLocalSaveTests.class/instance/defaultKey.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 @@ | ||
values | ||
defaultKey | ||
|
||
^ #superLongTestSymbolTheUserWillOnlyUseStrings. |
4 changes: 4 additions & 0 deletions
4
Squello-Tests.package/SPBLocalSaveTests.class/instance/defaultValue.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 @@ | ||
values | ||
defaultValue | ||
|
||
^ #somethingThatWeWantToSave. |
4 changes: 4 additions & 0 deletions
4
Squello-Tests.package/SPBLocalSaveTests.class/instance/setUp.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 @@ | ||
setup | ||
setUp | ||
|
||
SPBBoardSaver delete: self defaultKey. |
4 changes: 4 additions & 0 deletions
4
Squello-Tests.package/SPBLocalSaveTests.class/instance/tearDown.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 @@ | ||
setup | ||
tearDown | ||
|
||
SPBBoardSaver delete: self defaultKey. |
7 changes: 7 additions & 0 deletions
7
Squello-Tests.package/SPBLocalSaveTests.class/instance/testDeleteReturnsNil.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,7 @@ | ||
tests | ||
testDeleteReturnsNil | ||
"the delete happens in setUp" | ||
|
||
| loadedValue | | ||
loadedValue := SPBBoardSaver load: self defaultKey. | ||
self assert: loadedValue isNil. |
8 changes: 8 additions & 0 deletions
8
Squello-Tests.package/SPBLocalSaveTests.class/instance/testLoadCreatesCopy.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,8 @@ | ||
tests | ||
testLoadCreatesCopy | ||
|
||
| obj1 obj2 | | ||
SPBBoardSaver save: self copyableObject as: self defaultKey. | ||
obj1 := SPBBoardSaver load: self defaultKey. | ||
obj2 := SPBBoardSaver load: self defaultKey. | ||
self assert: (obj1 hash = obj2 hash) not. |
9 changes: 9 additions & 0 deletions
9
Squello-Tests.package/SPBLocalSaveTests.class/instance/testLoadIsCopyOfSave.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 @@ | ||
tests | ||
testLoadIsCopyOfSave | ||
|
||
| insertedObject loadedObject | | ||
insertedObject := self copyableObject. | ||
SPBBoardSaver save: insertedObject as: self defaultKey. | ||
loadedObject := SPBBoardSaver load: self defaultKey. | ||
|
||
self assert: (insertedObject hash = loadedObject hash) not. |
8 changes: 8 additions & 0 deletions
8
Squello-Tests.package/SPBLocalSaveTests.class/instance/testSaveIsSameAsLoad.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,8 @@ | ||
tests | ||
testSaveIsSameAsLoad | ||
|
||
| valueAfterInsertion| | ||
SPBBoardSaver save: self defaultValue as: self defaultKey. | ||
valueAfterInsertion := SPBBoardSaver load: self defaultKey. | ||
|
||
self assert: valueAfterInsertion = self defaultValue. |
13 changes: 13 additions & 0 deletions
13
Squello-Tests.package/SPBLocalSaveTests.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,13 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"copyableObject" : "FP 5/27/2024 16:03", | ||
"defaultKey" : "FP 5/27/2024 15:57", | ||
"defaultValue" : "FP 5/27/2024 15:57", | ||
"setUp" : "FP 5/27/2024 16:16", | ||
"tearDown" : "FP 5/27/2024 16:17", | ||
"testDeleteReturnsNil" : "FP 5/27/2024 16:17", | ||
"testLoadCreatesCopy" : "FP 5/27/2024 16:18", | ||
"testLoadIsCopyOfSave" : "FP 5/27/2024 16:17", | ||
"testSaveIsSameAsLoad" : "FP 5/27/2024 16:17" } } |
14 changes: 14 additions & 0 deletions
14
Squello-Tests.package/SPBLocalSaveTests.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-Tests", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "SPBLocalSaveTests", | ||
"pools" : [ | ||
], | ||
"super" : "TestCase", | ||
"type" : "normal" } |