author | Jan Vrany <jan.vrany@labware.com> |
Tue, 11 Jul 2023 12:13:27 +0100 | |
branch | jv |
changeset 1173 | e3dd2050492e |
parent 1145 | ee708f06f612 |
permissions | -rw-r--r-- |
1145
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
1 |
" |
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
2 |
COPYRIGHT (c) 2021 LabWare |
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
3 |
" |
840 | 4 |
"{ Package: 'stx:goodies/monticello' }" |
5 |
||
992
f46203ad6470
.mcz reading/writing: change indentation of method source to respect platform's convention
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
866
diff
changeset
|
6 |
"{ NameSpace: Smalltalk }" |
f46203ad6470
.mcz reading/writing: change indentation of method source to respect platform's convention
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
866
diff
changeset
|
7 |
|
840 | 8 |
Object subclass:#MCStXSnapshotTransformation |
9 |
instanceVariableNames:'original transformed' |
|
10 |
classVariableNames:'' |
|
11 |
poolDictionaries:'' |
|
12 |
category:'SCM-Monticello-St/X Storing' |
|
13 |
! |
|
14 |
||
15 |
!MCStXSnapshotTransformation class methodsFor:'documentation'! |
|
16 |
||
1145
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
17 |
copyright |
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
18 |
" |
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
19 |
COPYRIGHT (c) 2021 LabWare |
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
20 |
|
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
21 |
|
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
22 |
" |
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
23 |
! |
ee708f06f612
Use (newer) `#spacesToTabs` and `#tabsToSpaces` in St/X transformation
Jan Vrany <jan.vrany@labware.com>
parents:
1099
diff
changeset
|
24 |
|
840 | 25 |
documentation |
26 |
" |
|
27 |
An abstract superclass to snapshot tranformations. Used to alter MCSnaphot data |
|
28 |
to hide-out nasty differences between St/X and Squeak/Pharo package model so |
|
29 |
.mcz can be safely passed to from one environment to another without information |
|
30 |
loss. |
|
31 |
||
32 |
CAUTION: Tricky. |
|
33 |
||
34 |
[author:] |
|
35 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
36 |
||
37 |
[instance variables:] |
|
38 |
||
39 |
[class variables:] |
|
40 |
||
41 |
[see also:] |
|
42 |
MCStXSnapshotPreWriteTransformation |
|
43 |
MCStXSnapshotPostReadTransformation |
|
44 |
" |
|
45 |
! ! |
|
46 |
||
47 |
!MCStXSnapshotTransformation class methodsFor:'testing'! |
|
48 |
||
49 |
isAbstract |
|
50 |
^self == MCStXSnapshotTransformation |
|
51 |
||
52 |
"Created: / 29-05-2013 / 11:32:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
53 |
! ! |
|
54 |
||
55 |
!MCStXSnapshotTransformation class methodsFor:'transforming'! |
|
56 |
||
57 |
transform: anMCSnapshot |
|
58 |
"Returns a transformed **copy** of the original snapshot" |
|
59 |
||
60 |
^self new transform: anMCSnapshot. |
|
61 |
||
62 |
"Created: / 29-05-2013 / 11:36:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
63 |
! ! |
|
64 |
||
65 |
!MCStXSnapshotTransformation methodsFor:'accessing'! |
|
66 |
||
67 |
original |
|
68 |
^ original |
|
69 |
! |
|
70 |
||
71 |
transformed |
|
72 |
^ transformed |
|
73 |
! ! |
|
74 |
||
75 |
!MCStXSnapshotTransformation methodsFor:'transforming'! |
|
76 |
||
77 |
transform: anMCSnapshot |
|
78 |
"Returns a transformed **copy** of the original snapshot" |
|
79 |
||
80 |
original := anMCSnapshot. |
|
81 |
transformed := original copy. |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
82 |
|
840 | 83 |
"use #copy to allow modifications to definitions collection while |
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
84 |
transforming." |
840 | 85 |
transformed definitions copy reverseDo:[:definition| |
86 |
definition accept: self. |
|
87 |
]. |
|
88 |
^transformed. |
|
89 |
||
90 |
"Created: / 29-05-2013 / 11:40:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
91 |
"Modified: / 31-05-2013 / 00:10:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
840 | 92 |
! ! |
93 |
||
94 |
!MCStXSnapshotTransformation methodsFor:'visiting'! |
|
95 |
||
1099
df7f9c846b88
Fix source loading w.r.t. class comments
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
992
diff
changeset
|
96 |
visitClassComment: definition |
df7f9c846b88
Fix source loading w.r.t. class comments
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
992
diff
changeset
|
97 |
|
df7f9c846b88
Fix source loading w.r.t. class comments
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
992
diff
changeset
|
98 |
"Created: / 25-05-2020 / 12:40:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
df7f9c846b88
Fix source loading w.r.t. class comments
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
992
diff
changeset
|
99 |
! |
df7f9c846b88
Fix source loading w.r.t. class comments
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
992
diff
changeset
|
100 |
|
840 | 101 |
visitClassDefinition: definition |
102 |
||
103 |
"Modified: / 29-05-2013 / 12:07:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
104 |
! |
|
105 |
||
106 |
visitClassTraitDefinition: definition |
|
107 |
||
108 |
"Modified: / 29-05-2013 / 12:08:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
109 |
! |
|
110 |
||
111 |
visitMetaclassDefinition: definition |
|
112 |
||
113 |
"Modified: / 29-05-2013 / 12:08:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
114 |
! |
|
115 |
||
116 |
visitMethodDefinition: definition |
|
117 |
||
118 |
"Modified: / 29-05-2013 / 12:08:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
119 |
! |
|
120 |
||
121 |
visitOrganizationDefinition: defintion |
|
122 |
||
123 |
"Modified: / 29-05-2013 / 12:08:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
124 |
! |
|
125 |
||
126 |
visitTraitDefinition: definition |
|
127 |
||
128 |
"Modified: / 29-05-2013 / 12:08:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
129 |
! ! |
|
130 |
||
131 |
!MCStXSnapshotTransformation class methodsFor:'documentation'! |
|
132 |
||
133 |
version |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
134 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotTransformation.st,v 1.2 2013-05-30 23:35:33 vrany Exp $' |
840 | 135 |
! |
136 |
||
137 |
version_CVS |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
138 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotTransformation.st,v 1.2 2013-05-30 23:35:33 vrany Exp $' |
992
f46203ad6470
.mcz reading/writing: change indentation of method source to respect platform's convention
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
866
diff
changeset
|
139 |
! |
f46203ad6470
.mcz reading/writing: change indentation of method source to respect platform's convention
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
866
diff
changeset
|
140 |
|
f46203ad6470
.mcz reading/writing: change indentation of method source to respect platform's convention
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
866
diff
changeset
|
141 |
version_HG |
f46203ad6470
.mcz reading/writing: change indentation of method source to respect platform's convention
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
866
diff
changeset
|
142 |
|
f46203ad6470
.mcz reading/writing: change indentation of method source to respect platform's convention
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
866
diff
changeset
|
143 |
^ '$Changeset: <not expanded> $' |
840 | 144 |
! ! |
145 |