Skip to content

Commit

Permalink
Make Plaintext assets editable
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Dec 14, 2023
1 parent 119dd9a commit b9ebe9a
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ui
transformAndMaterializeVersion: anObject in: aWorkingCopy ifFail: aBlock
self materialize: (self transformVersion: anObject ifFail: [^ aBlock value]) in: aWorkingCopy.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"printWithoutPathOn:" : "mad 11/7/2023 12:51",
"readVersionFrom:" : "mad 9/20/2023 14:18",
"space:" : "mad 11/7/2023 12:52",
"transformAndMaterializeVersion:in:ifFail:" : "mad 12/14/2023 17:19",
"transformVersion:ifFail:" : "mad 10/17/2023 12:30",
"uncheckedMoveTo:in:" : "mad 11/21/2023 16:45",
"versionAsMorph:" : "mad 9/20/2023 14:19",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
instance creation
newWithMapper: aPlaintextMapper workingCopy: aWorkingCopy
^ self new
mapper: aPlaintextMapper;
workingCopy: aWorkingCopy;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
getText
^ self mapper loadVersionFromImage: self workingCopy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
mapper: aPlaintextMapper
mapper := aPlaintextMapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
mapper
^ mapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
setText: aText
self mapper
transformAndMaterializeVersion: aText asString
in: self workingCopy
ifFail: [].
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
updating
update: anObject
super update: anObject.
anObject = #materialized ifTrue: [self changed: #getText].
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
workingCopy: aWorkingCopy
workingCopy ifNotNil: [workingCopy removeDependent: self].
workingCopy := aWorkingCopy.
aWorkingCopy ifNotNil: [aWorkingCopy addDependent: self].
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
workingCopy
^ workingCopy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"class" : {
"newWithMapper:workingCopy:" : "mad 12/14/2023 17:23" },
"instance" : {
"getText" : "mad 12/14/2023 17:14",
"mapper" : "mad 12/14/2023 17:13",
"mapper:" : "mad 12/14/2023 17:13",
"setText:" : "mad 12/14/2023 17:22",
"update:" : "mad 12/14/2023 18:26",
"workingCopy" : "mad 12/14/2023 17:13",
"workingCopy:" : "mad 12/14/2023 18:03" } }
15 changes: 15 additions & 0 deletions src/Squot.package/SquotPlaintextImageModel.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"category" : "Squot-Mapper-Plaintext",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"mapper",
"workingCopy" ],
"name" : "SquotPlaintextImageModel",
"pools" : [
],
"super" : "Object",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
toolbuilder
buildVersionFromImage: aWorkingCopy with: builder
^ builder pluggableTextSpec new
model: (SquotPlaintextImageModel
newWithMapper: self
workingCopy: aWorkingCopy);
getText: #getText;
setText: #setText:;
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"validEncodings" : "mad 11/7/2023 12:45" },
"instance" : {
"aboutToStyle:with:requestor:at:" : "mad 11/7/2023 14:42",
"buildVersionFromImage:with:" : "mad 12/14/2023 17:23",
"canReadVersionFrom:" : "mad 11/16/2023 13:10",
"changeSetClass" : "mad 11/7/2023 13:37",
"copyOf:withSources:notifying:ifFail:" : "mad 11/7/2023 14:49",
Expand Down

0 comments on commit b9ebe9a

Please sign in to comment.