author | Jan Vrany <jan.vrany@labware.com> |
Mon, 31 Jul 2023 16:35:49 +0100 | |
branch | jv |
changeset 1176 | 3d6cf8c6a926 |
parent 1174 | f0a16c301971 |
permissions | -rw-r--r-- |
429 | 1 |
"{ Package: 'stx:goodies/monticello' }"! |
2 |
||
1102
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
3 |
!AbstractSourceCodeManager class methodsFor:'accessing'! |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
4 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
5 |
monticelloVersionInfoForPackage: package |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
6 |
"Return Monticello version info (a kind og MCVersionInfo) |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
7 |
for given package. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
8 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
9 |
If this source code manager does not support exporting |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
10 |
to Monticello, throw an error. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
11 |
" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
12 |
self error: ('%1 does not know how to create Monticello version info for %2' |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
13 |
bindWith: self name |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
14 |
with: package) |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
15 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
16 |
"Created: / 29-06-2020 / 13:04:15 / Jan Vrany <jan.vrany@labware.com>" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
17 |
! ! |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
18 |
|
429 | 19 |
!Annotation class methodsFor:'instance creation'! |
395 | 20 |
|
21 |
mctimestamp: aString |
|
22 |
||
23 |
^MCTimestampAnnotation new timestamp: aString |
|
24 |
||
25 |
"Created: / 14-09-2010 / 15:35:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
26 |
! ! |
|
27 |
||
1131
79318af3b3c4
Use (specified) source code porter when writing .mcz
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
28 |
!AutomagicSourcePorter methodsFor:'porting-monticello'! |
79318af3b3c4
Use (specified) source code porter when writing .mcz
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
29 |
|
1164
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
30 |
visitClassDefinition: anMCClassDefinition |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
31 |
anMCClassDefinition className: (klassMap at: anMCClassDefinition className ifAbsent: [ anMCClassDefinition className ]). |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
32 |
anMCClassDefinition superclassName: (klassMap at: anMCClassDefinition superclassName ifAbsent: [ anMCClassDefinition superclassName ]). |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
33 |
anMCClassDefinition variables do: [:variable | |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
34 |
variable isPoolImport ifTrue: [ |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
35 |
variable name: (klassMap at: variable name ifAbsent: [ variable name ]). |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
36 |
]. |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
37 |
]. |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
38 |
|
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
39 |
"Created: / 20-09-2022 / 16:59:54 / Jan Vrany <jan.vrany@labware.com>" |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
40 |
! ! |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
41 |
|
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
42 |
!AutomagicSourcePorter methodsFor:'porting-monticello'! |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
43 |
|
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
44 |
visitMetaclassDefinition: aMCClassDefinition |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
45 |
! ! |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
46 |
|
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
47 |
!AutomagicSourcePorter methodsFor:'porting-monticello'! |
b2f0322f5c53
Use separate porters when writing out / reading in snapshots
Jan Vrany <jan.vrany@labware.com>
parents:
1148
diff
changeset
|
48 |
|
1165
777d77ca96cf
phase-divergent update to b2f0322f5c53:
Jan Vrany <jan.vrany@labware.com>
parents:
1164
diff
changeset
|
49 |
visitMethodDefinition: definition |
777d77ca96cf
phase-divergent update to b2f0322f5c53:
Jan Vrany <jan.vrany@labware.com>
parents:
1164
diff
changeset
|
50 |
source := definition source. |
777d77ca96cf
phase-divergent update to b2f0322f5c53:
Jan Vrany <jan.vrany@labware.com>
parents:
1164
diff
changeset
|
51 |
klass := definition actualClass. |
1131
79318af3b3c4
Use (specified) source code porter when writing .mcz
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
52 |
self rewrite. |
1165
777d77ca96cf
phase-divergent update to b2f0322f5c53:
Jan Vrany <jan.vrany@labware.com>
parents:
1164
diff
changeset
|
53 |
definition source: source. |
777d77ca96cf
phase-divergent update to b2f0322f5c53:
Jan Vrany <jan.vrany@labware.com>
parents:
1164
diff
changeset
|
54 |
definition className: (klassMap at: definition className ifAbsent: [ definition className ]) |
1131
79318af3b3c4
Use (specified) source code porter when writing .mcz
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
55 |
|
79318af3b3c4
Use (specified) source code porter when writing .mcz
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
56 |
"Created: / 03-07-2020 / 00:49:28 / Jan Vrany <jan.vrany@labware.com>" |
1165
777d77ca96cf
phase-divergent update to b2f0322f5c53:
Jan Vrany <jan.vrany@labware.com>
parents:
1164
diff
changeset
|
57 |
"Modified: / 22-09-2022 / 11:45:02 / Jan Vrany <jan.vrany@labware.com>" |
1131
79318af3b3c4
Use (specified) source code porter when writing .mcz
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
58 |
! ! |
79318af3b3c4
Use (specified) source code porter when writing .mcz
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
59 |
|
429 | 60 |
!Behavior methodsFor:'*monticello-squeakCompatibility'! |
395 | 61 |
|
62 |
traitCompositionString |
|
63 |
^ '{}' |
|
64 |
||
65 |
"Created: / 26-08-2009 / 12:43:23 / Jaroslav Havlin <havlij6@fel.cvut.cz>" |
|
66 |
! ! |
|
67 |
||
429 | 68 |
!Behavior methodsFor:'*monticello-squeakCompatibility'! |
150 | 69 |
|
70 |
typeOfClass |
|
395 | 71 |
"Answer a symbol uniquely describing the type of the receiver" |
72 |
"self instSpec = CompiledMethod instSpec ifTrue:[^#compiledMethod]." "Very special!!" |
|
73 |
self isBytes ifTrue:[^#bytes]. |
|
74 |
(self isWords and:[self isPointers not]) ifTrue:[^#words]. |
|
75 |
self isWeakPointers ifTrue:[^#weak]. |
|
76 |
self isVariable ifTrue:[^#variable]. |
|
77 |
^#normal. |
|
78 |
||
79 |
"Created: / 26-08-2009 / 12:45:50 / Jaroslav Havlin <havlij6@fel.cvut.cz>" |
|
80 |
! ! |
|
81 |
||
429 | 82 |
!Change methodsFor:'accessing'! |
395 | 83 |
|
84 |
mcDefinition |
|
85 |
||
86 |
^self objectAttributeAt: #mcDefinition |
|
87 |
||
88 |
"Created: / 08-11-2010 / 17:56:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
89 |
! ! |
|
90 |
||
429 | 91 |
!Change methodsFor:'accessing'! |
395 | 92 |
|
93 |
mcDefinition: aMCDefinition |
|
94 |
||
95 |
^self objectAttributeAt: #mcDefinition put: aMCDefinition |
|
96 |
||
97 |
"Created: / 08-11-2010 / 17:56:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
150 | 98 |
! ! |
136 | 99 |
|
436
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
100 |
!CharacterArray methodsFor:'*monticello-squeakCompatibility'! |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
101 |
|
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
102 |
asStringWithNativeLineEndings |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
103 |
|
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
104 |
^self copyReplaceAll:Character return with: Character cr |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
105 |
|
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
106 |
"Created: / 12-09-2010 / 16:00:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
107 |
"Modified: / 13-10-2010 / 17:27:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
108 |
! ! |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
109 |
|
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
110 |
!CharacterArray methodsFor:'*monticello-squeakCompatibility'! |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
111 |
|
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
112 |
asStringWithSqueakLineEndings |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
113 |
|
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
114 |
^self copyReplaceAll:Character cr with: Character return |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
115 |
|
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
116 |
"Created: / 12-09-2010 / 16:00:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
117 |
"Modified: / 13-10-2010 / 17:28:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
118 |
! ! |
436066f63a27
moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
429
diff
changeset
|
119 |
|
1108
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
120 |
!CharacterArray methodsFor:'special string converting'! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
121 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
122 |
spacesToTabs |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
123 |
"For each line, convert each leading sequence of `numSpaces` spaces |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
124 |
into a tab. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
125 |
Used to convert sources indentation from Smalltalk/X to Squeak-world. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
126 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
127 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
128 |
^ self spacesToTabs: 4 |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
129 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
130 |
"Created: / 10-08-2020 / 12:03:56 / Jan Vrany <jan.vrany@labware.com>" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
131 |
! ! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
132 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
133 |
!CharacterArray methodsFor:'special string converting'! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
134 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
135 |
spacesToTabs: numSpaces |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
136 |
"For each line, convert each leading sequence of `numSpaces` spaces |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
137 |
into a tab. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
138 |
Used to convert sources indentation from spaces to tabs. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
139 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
140 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
141 |
| sz pos out crlf | |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
142 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
143 |
crlf := String with: Character return with: Character linefeed. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
144 |
sz := self size. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
145 |
pos := 1. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
146 |
out := CharacterWriteStream new: self size. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
147 |
[ pos <= sz ] whileTrue: [ |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
148 |
| numSpacesFound end | |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
149 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
150 |
"/ Search for leading consecutive `numSpaces` spaces. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
151 |
numSpacesFound := 0. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
152 |
[ (pos + numSpacesFound) <= sz and:[(self at: pos + numSpacesFound) == Character space ] ] whileTrue: [ |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
153 |
numSpacesFound := numSpacesFound + 1. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
154 |
]. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
155 |
"/ Replace spaces with tabs |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
156 |
(numSpacesFound // numSpaces) timesRepeat: [ |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
157 |
out nextPut: Character tab. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
158 |
pos := pos + numSpaces. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
159 |
]. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
160 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
161 |
"/ And finally, put rest of the line (if any) |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
162 |
end := self indexOfAny: crlf startingAt: pos ifAbsent: sz. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
163 |
out nextPutAll: self startingAt: pos to: end. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
164 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
165 |
pos := end + 1. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
166 |
]. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
167 |
^ out contents. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
168 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
169 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
170 |
'hello' spacesToTabs: 4 |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
171 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
172 |
' hello world' spacesToTabs: 4 |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
173 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
174 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
175 |
"Created: / 06-08-2020 / 11:05:47 / Jan Vrany <jan.vrany@labware.com>" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
176 |
"Modified: / 10-08-2020 / 12:19:26 / Jan Vrany <jan.vrany@labware.com>" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
177 |
! ! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
178 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
179 |
!CharacterArray methodsFor:'special string converting'! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
180 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
181 |
tabsToSpaces |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
182 |
"For each line, convert each leading tab into 4 spaces. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
183 |
Used to convert sources from Squeak-world indentation to Smalltalk/X |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
184 |
indentation. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
185 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
186 |
^ self tabsToSpaces: 4 |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
187 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
188 |
"Created: / 10-08-2020 / 12:00:26 / Jan Vrany <jan.vrany@labware.com>" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
189 |
! ! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
190 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
191 |
!CharacterArray methodsFor:'special string converting'! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
192 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
193 |
tabsToSpaces: numSpaces |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
194 |
"For each line, convert each leading tab into `numSpaces` spaces. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
195 |
Used to convert sources indentation from tabs to spaces. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
196 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
197 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
198 |
| sz pos out crlf | |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
199 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
200 |
crlf := String with: Character return with: Character linefeed. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
201 |
sz := self size. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
202 |
pos := 1. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
203 |
out := CharacterWriteStream new: self size. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
204 |
[ pos <= sz ] whileTrue: [ |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
205 |
| end | |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
206 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
207 |
"/ Search and replace leading tabs with `numSpaces` spaces |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
208 |
[ pos <= sz and:[ (self at: pos) == Character tab ] ] whileTrue: [ |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
209 |
out next: numSpaces put: Character space. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
210 |
pos := pos + 1. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
211 |
]. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
212 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
213 |
"/ And finally, put rest of the line (if any) |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
214 |
end := self indexOfAny: crlf startingAt: pos ifAbsent: sz. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
215 |
out nextPutAll: self startingAt: pos to: end. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
216 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
217 |
pos := end + 1. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
218 |
]. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
219 |
^ out contents. |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
220 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
221 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
222 |
'hello' tabsToSpaces: 4 |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
223 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
224 |
(Character tab asString , Character tab asString , 'hello world') tabsToSpaces: 4 |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
225 |
" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
226 |
|
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
227 |
"Created: / 06-08-2020 / 11:04:49 / Jan Vrany <jan.vrany@labware.com>" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
228 |
"Modified: / 10-08-2020 / 12:18:40 / Jan Vrany <jan.vrany@labware.com>" |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
229 |
! ! |
1bdcfc9842d0
Convert (Squeak) tabs to (Smalltalk/X) spaces in method sources
Jan Vrany <jan.vrany@labware.com>
parents:
1102
diff
changeset
|
230 |
|
429 | 231 |
!Class methodsFor:'*monticello'! |
136 | 232 |
|
233 |
asClassDefinition |
|
395 | 234 |
^ MCClassDefinition |
235 |
name: self name |
|
736
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
236 |
superclassName: (self superclass isNil ifTrue:['nil'] ifFalse:[self superclass name]) |
395 | 237 |
traitComposition: self traitCompositionString |
238 |
classTraitComposition: self class traitCompositionString |
|
239 |
category: self category |
|
240 |
instVarNames: self instVarNames |
|
241 |
classVarNames: self classVarNames |
|
242 |
poolDictionaryNames: self poolDictionaryNames |
|
243 |
classInstVarNames: self class instVarNames |
|
244 |
type: self typeOfClass |
|
245 |
comment: (self organization classComment ? '') asStringWithSqueakLineEndings |
|
246 |
commentStamp: self organization commentStamp |
|
247 |
||
248 |
"Modified: / 12-09-2010 / 17:19:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
136 | 249 |
! ! |
250 |
||
429 | 251 |
!Class methodsFor:'*monticello'! |
136 | 252 |
|
253 |
classDefinitions |
|
888
f5d285e135d2
Fix in ProjectDefinition>>monticelloName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
883
diff
changeset
|
254 |
self isLoaded ifFalse:[self autoload]. |
136 | 255 |
^ Array with: self asClassDefinition |
256 |
! ! |
|
257 |
||
429 | 258 |
!Class methodsFor:'*monticello'! |
136 | 259 |
|
260 |
poolDictionaryNames |
|
1135
1e88d69bdc81
Fix `Class >> #poolDictionaryNames`
Jan Vrany <jan.vrany@labware.com>
parents:
1132
diff
changeset
|
261 |
^ self sharedPoolNames |
1e88d69bdc81
Fix `Class >> #poolDictionaryNames`
Jan Vrany <jan.vrany@labware.com>
parents:
1132
diff
changeset
|
262 |
|
1e88d69bdc81
Fix `Class >> #poolDictionaryNames`
Jan Vrany <jan.vrany@labware.com>
parents:
1132
diff
changeset
|
263 |
"Modified: / 29-01-2021 / 08:42:46 / Jan Vrany <jan.vrany@labware.com>" |
136 | 264 |
! ! |
265 |
||
429 | 266 |
!ClassDescription methodsFor:'*monticello-squeakCompatibility'! |
395 | 267 |
|
268 |
mcDefinition |
|
269 |
||
270 |
|s| |
|
271 |
||
272 |
s := WriteStream on:(String new). |
|
273 |
self |
|
274 |
basicFileOutDefinitionOn:s |
|
275 |
withNameSpace:false |
|
276 |
withPackage:false. |
|
277 |
s position: s position - 1. |
|
278 |
||
279 |
^ s contents |
|
280 |
||
281 |
"Created: / 11-09-2010 / 18:06:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
282 |
! ! |
|
283 |
||
1123
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
284 |
!Method methodsFor:'converting'! |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
285 |
|
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
286 |
asMethodDefinition |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
287 |
^ self asMethodReference asMethodDefinition |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
288 |
|
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
289 |
"Created: / 06-07-2020 / 21:37:03 / Jan Vrany <jan.vrany@labware.com>" |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
290 |
! ! |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
291 |
|
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
292 |
!Method methodsFor:'converting'! |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
293 |
|
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
294 |
asMethodReference |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
295 |
^ MethodReference class: mclass selector: self selector |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
296 |
|
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
297 |
"Created: / 06-07-2020 / 21:36:42 / Jan Vrany <jan.vrany@labware.com>" |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
298 |
! ! |
1bf6a20c9966
Tonel: various fixes here and there (part 3)
Jan Vrany <jan.vrany@labware.com>
parents:
1120
diff
changeset
|
299 |
|
429 | 300 |
!Object methodsFor:'*monticello'! |
136 | 301 |
|
302 |
isConflict |
|
303 |
^false |
|
304 |
! ! |
|
305 |
||
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
306 |
!PackageInfo methodsFor:'testing'! |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
307 |
|
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
308 |
isMCStXPackageInfo |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
309 |
^ false |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
310 |
|
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
311 |
"Created: / 29-05-2013 / 01:08:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
312 |
! ! |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
313 |
|
1102
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
314 |
!ProjectDefinition class methodsFor:'exporting'! |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
315 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
316 |
exportToMonticello:anMCRepository |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
317 |
"Export currently loaded revision of this package |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
318 |
to given Monticello repository." |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
319 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
320 |
| mcpkg mcwc mcvi mcversion | |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
321 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
322 |
Class tryLocalSourceFirst:true. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
323 |
mcpkg := MCPackage named:self package. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
324 |
mcwc := mcpkg workingCopy. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
325 |
mcvi := self monticelloVersionInfo. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
326 |
[ |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
327 |
mcversion := mcwc newVersion. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
328 |
mcversion snapshot options includeExtrasForSTX:true. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
329 |
] on:MCVersionNameAndMessageRequest |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
330 |
do:[:ex | ex resume:(Array with:mcvi name with:mcvi message) ]. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
331 |
mcversion info:mcvi. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
332 |
anMCRepository storeVersion:mcversion. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
333 |
^ mcversion |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
334 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
335 |
" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
336 |
jv_libgdbs exportToMonticello: (MCDirectoryRepository directory:'/tmp/mc') |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
337 |
labware_machinearithmetic exportToMonticello: (MCDirectoryRepository directory:'/tmp/mc') |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
338 |
" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
339 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
340 |
"Created: / 24-06-2020 / 22:45:34 / Jan Vrany <jan.vrany@labware.com>" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
341 |
"Modified (comment): / 29-06-2020 / 13:24:04 / Jan Vrany <jan.vrany@labware.com>" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
342 |
! ! |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
343 |
|
429 | 344 |
!ProjectDefinition class methodsFor:'code generation'! |
395 | 345 |
|
452
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
346 |
monticelloAncestry_code |
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
347 |
|
459
cae7224c4ab3
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
452
diff
changeset
|
348 |
^'#()' |
452
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
349 |
|
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
350 |
"Created: / 25-08-2011 / 16:49:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
351 |
! ! |
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
352 |
|
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
353 |
!ProjectDefinition class methodsFor:'accessing - monticello'! |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
354 |
|
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
355 |
monticelloName |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
356 |
"Return name of the package for Monticello. |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
357 |
|
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
358 |
Historically, Monticello package membership is based on |
878 | 359 |
naming conventions. All classes whose category name starts with |
360 |
package name are considerer as belonging to the package, others |
|
361 |
do not. If classes' category does not match this naming convention, |
|
362 |
the package will fail to load back properly. |
|
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
363 |
|
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
364 |
Here, infer such prefix. Individual packages may override this method |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
365 |
and return a string to enforce a particular name." |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
366 |
|
878 | 367 |
| cats longest prefix index nm | |
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
368 |
|
889
329193445e6f
Funny, previous fix does not work. This code does.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
888
diff
changeset
|
369 |
cats := (self classes collect:[:each | each autoload; category ]) asSet. |
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
370 |
cats remove:#'* Projects & Packages *'. |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
371 |
cats size == 1 ifTrue:[ |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
372 |
^ cats anElement |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
373 |
]. |
878 | 374 |
cats isEmpty ifTrue:[ |
375 |
^ 'Misc_Changes' |
|
376 |
]. |
|
975 | 377 |
longest := cats |
378 |
inject:cats anElement |
|
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
379 |
into:[:cat :each | |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
380 |
each size > cat size ifTrue:[ |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
381 |
each |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
382 |
] ifFalse:[ cat ] |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
383 |
]. |
975 | 384 |
|
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
385 |
prefix := ''. |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
386 |
[ |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
387 |
(index := longest indexOf:$- startingAt:prefix size + 2) ~~ 0 |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
388 |
] whileTrue:[ |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
389 |
prefix := longest copyTo:index - 1. |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
390 |
(cats allSatisfy:[:each | each startsWith:prefix ]) ifTrue:[ |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
391 |
nm := prefix. |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
392 |
]. |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
393 |
]. |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
394 |
nm notNil ifTrue:[ |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
395 |
^ nm |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
396 |
]. |
975 | 397 |
^ self package asString copyReplaceAny:':/' with:$_. |
398 |
||
399 |
"/ self |
|
400 |
"/ error:'Cannot infer Monticello package name from class categories. Please define #mcName explicitly' |
|
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
401 |
|
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
402 |
"Created: / 29-05-2013 / 01:36:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
888
f5d285e135d2
Fix in ProjectDefinition>>monticelloName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
883
diff
changeset
|
403 |
"Modified: / 23-06-2013 / 21:12:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
839
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
404 |
! ! |
73bbd675ef17
More support Squeak/Pharo interoperability - part 1:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
786
diff
changeset
|
405 |
|
883
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
406 |
!ProjectDefinition class methodsFor:'accessing - monticello'! |
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
407 |
|
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
408 |
monticelloNameForMCZ |
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
409 |
"Return the name of package used to build .mcz file. |
1102
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
410 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
411 |
Override if needed. Defaults to sanitized monticelloName" |
883
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
412 |
|
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
413 |
^self monticelloName asString copy replaceAll: $/ with: $_; replaceAll: $: with: $_ |
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
414 |
|
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
415 |
"Created: / 07-06-2013 / 01:48:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1102
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
416 |
"Modified (comment): / 29-06-2020 / 13:11:52 / Jan Vrany <jan.vrany@labware.com>" |
883
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
417 |
! ! |
3b1947942911
Added ProjectDefinition>>monticelloNameForMCZ
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
878
diff
changeset
|
418 |
|
1004
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
419 |
!ProjectDefinition class methodsFor:'accessing - monticello'! |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
420 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
421 |
monticelloSplicemap |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
422 |
"Return a splicemap for this package. This is used to forge a |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
423 |
'fake' ancestor when generating ancestry information out of |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
424 |
Mercurial (or anyt other) history. This should make merging |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
425 |
back into Squeak/Pharo a little easier as Monticello can (in theory) |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
426 |
find a proper ancestor. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
427 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
428 |
All this requires monticelloSplicemap being updated each time a code |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
429 |
is merged from Monticello. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
430 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
431 |
The format of splicemap is a flat array of pairs |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
432 |
(commit id, MCVersionInfo to splice) as literal encoding. |
1102
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
433 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
434 |
Override if needed and append an entry each time a 'foreign' |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
435 |
Monticello version is merged in. |
1004
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
436 |
" |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
437 |
^#() |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
438 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
439 |
"Created: / 07-09-2015 / 18:11:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1102
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
440 |
"Modified (comment): / 29-06-2020 / 13:13:13 / Jan Vrany <jan.vrany@labware.com>" |
1004
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
441 |
! ! |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
442 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
443 |
!ProjectDefinition class methodsFor:'code generation'! |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
444 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
445 |
monticelloSplicemap_code |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
446 |
^ self monticelloSplicemap_codeFor:self monticelloSplicemap |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
447 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
448 |
"Created: / 07-09-2015 / 17:58:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
449 |
! ! |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
450 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
451 |
!ProjectDefinition class methodsFor:'code generation'! |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
452 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
453 |
monticelloSplicemap_codeFor:splicemap |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
454 |
^ String |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
455 |
streamContents:[:s | |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
456 |
s nextPutLine:'monticelloSplicemap'. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
457 |
s |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
458 |
nextPutAll:' "'; |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
459 |
nextPutAll:(self class superclass lookupMethodFor:#monticelloSplicemap) |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
460 |
comment; |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
461 |
nextPutLine:'"'. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
462 |
s nextPutLine:''. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
463 |
s nextPutLine:' ^ #('. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
464 |
splicemap |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
465 |
pairWiseDo:[:changeset :mcversion | |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
466 |
s nextPutAll:' '. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
467 |
changeset storeOn:s. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
468 |
s space. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
469 |
mcversion storeOn:s. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
470 |
s |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
471 |
cr; |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
472 |
cr. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
473 |
]. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
474 |
s nextPutLine:' )' |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
475 |
]. |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
476 |
|
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
477 |
" |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
478 |
stx_goodies_petitparser_compiler monticelloSplicemap_code" |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
479 |
"Created: / 07-09-2015 / 17:58:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
480 |
! ! |
e48adfaf3541
Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
995
diff
changeset
|
481 |
|
452
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
482 |
!ProjectDefinition class methodsFor:'code generation'! |
cbc2f85f11f8
fixes for remembering Monticello metadata
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
437
diff
changeset
|
483 |
|
395 | 484 |
monticelloTimestamps_code |
485 |
||
1174
f0a16c301971
Make `ProjectDefinition >> #monticelloTimestamps_code` an extension in `stx:goodies/monticello`
Jan Vrany <jan.vrany@labware.com>
parents:
1165
diff
changeset
|
486 |
<method: #monticelloTimestamps category: #'description - monticello' overwrite: true> |
f0a16c301971
Make `ProjectDefinition >> #monticelloTimestamps_code` an extension in `stx:goodies/monticello`
Jan Vrany <jan.vrany@labware.com>
parents:
1165
diff
changeset
|
487 |
|
395 | 488 |
| methodsWithTimestamp | |
489 |
methodsWithTimestamp := OrderedCollection new. |
|
490 |
||
491 |
self classes do:[:cls| |
|
492 |
cls methodsDo:[:mthd| |
|
493 |
(mthd hasAnnotation: #mctimestamp:) ifTrue:[ |
|
494 |
methodsWithTimestamp add: mthd |
|
495 |
] |
|
496 |
]. |
|
497 |
]. |
|
498 |
self extensionMethods do:[:mthd| |
|
1176
3d6cf8c6a926
Handle removed methods in `#monticelloTimestamps_code`
Jan Vrany <jan.vrany@labware.com>
parents:
1174
diff
changeset
|
499 |
"`mthd` may be nil if an extension has been removed, |
3d6cf8c6a926
Handle removed methods in `#monticelloTimestamps_code`
Jan Vrany <jan.vrany@labware.com>
parents:
1174
diff
changeset
|
500 |
hence the `notNil` check!!" |
3d6cf8c6a926
Handle removed methods in `#monticelloTimestamps_code`
Jan Vrany <jan.vrany@labware.com>
parents:
1174
diff
changeset
|
501 |
(mthd notNil and: [mthd hasAnnotation: #mctimestamp:]) ifTrue:[ |
395 | 502 |
methodsWithTimestamp add: mthd |
503 |
] |
|
504 |
]. |
|
505 |
||
506 |
^self monticelloTimestamps_codeFor: methodsWithTimestamp |
|
507 |
||
508 |
" |
|
509 |
stx_goodies_mondrian_core monticelloTimestamps_code |
|
510 |
" |
|
511 |
||
512 |
"Created: / 09-11-2010 / 18:23:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1176
3d6cf8c6a926
Handle removed methods in `#monticelloTimestamps_code`
Jan Vrany <jan.vrany@labware.com>
parents:
1174
diff
changeset
|
513 |
"Modified (format): / 31-07-2023 / 16:22:38 / Jan Vrany <jan.vrany@labware.com>" |
395 | 514 |
! ! |
515 |
||
429 | 516 |
!ProjectDefinition class methodsFor:'code generation'! |
395 | 517 |
|
518 |
monticelloTimestamps_codeFor: methods |
|
1174
f0a16c301971
Make `ProjectDefinition >> #monticelloTimestamps_code` an extension in `stx:goodies/monticello`
Jan Vrany <jan.vrany@labware.com>
parents:
1165
diff
changeset
|
519 |
| code | |
395 | 520 |
|
1174
f0a16c301971
Make `ProjectDefinition >> #monticelloTimestamps_code` an extension in `stx:goodies/monticello`
Jan Vrany <jan.vrany@labware.com>
parents:
1165
diff
changeset
|
521 |
methods isEmptyOrNil ifTrue: [ ^ nil ]. |
f0a16c301971
Make `ProjectDefinition >> #monticelloTimestamps_code` an extension in `stx:goodies/monticello`
Jan Vrany <jan.vrany@labware.com>
parents:
1165
diff
changeset
|
522 |
|
395 | 523 |
code := String new writeStream. |
524 |
code nextPutAll:'monticelloTimestamps |
|
525 |
||
526 |
^#('. |
|
527 |
methods do:[:mthd| |
|
528 |
code |
|
529 |
tab; tab; |
|
530 |
nextPut:$(; |
|
531 |
nextPutAll: mthd mclass fullName; |
|
532 |
space; |
|
533 |
nextPutAll: mthd selector; |
|
534 |
space; |
|
535 |
nextPutAll: (mthd annotationAt: #mctimestamp:) timestamp storeString; |
|
536 |
nextPut:$); |
|
537 |
cr. |
|
538 |
]. |
|
539 |
code nextPutAll:' |
|
540 |
)'. |
|
541 |
||
542 |
^code contents |
|
543 |
||
544 |
" |
|
545 |
stx_goodies_mondrian_core mcTimestamps_code |
|
546 |
" |
|
547 |
||
548 |
"Created: / 09-11-2010 / 18:27:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1174
f0a16c301971
Make `ProjectDefinition >> #monticelloTimestamps_code` an extension in `stx:goodies/monticello`
Jan Vrany <jan.vrany@labware.com>
parents:
1165
diff
changeset
|
549 |
"Modified: / 11-07-2023 / 12:51:38 / Jan Vrany <jan.vrany@labware.com>" |
395 | 550 |
! ! |
551 |
||
1102
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
552 |
!ProjectDefinition class methodsFor:'accessing - monticello'! |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
553 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
554 |
monticelloVersionInfo |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
555 |
"Return Monticello version info (a kind og MCVersionInfo) |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
556 |
for this package. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
557 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
558 |
This method is used by #exportToMonticello: Do not override. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
559 |
" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
560 |
| scm | |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
561 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
562 |
scm := AbstractSourceCodeManager managerForPackage: self package. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
563 |
^ scm monticelloVersionInfoForPackage: self package. |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
564 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
565 |
" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
566 |
jv_libgdbs monticelloVersionInfo |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
567 |
" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
568 |
|
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
569 |
"Created: / 29-06-2020 / 12:56:46 / Jan Vrany <jan.vrany@labware.com>" |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
570 |
! ! |
60e2741ec859
Add utility method to export St/X package to Monticello repository
Jan Vrany <jan.vrany@labware.com>
parents:
1004
diff
changeset
|
571 |
|
429 | 572 |
!SequenceableCollection methodsFor:'*monticello-squeakCompatibility'! |
395 | 573 |
|
574 |
copyReplaceAll: oldSubstring with: newSubstring asTokens: ifTokens |
|
575 |
"Answer a copy of the receiver in which all occurrences of |
|
576 |
oldSubstring have been replaced by newSubstring. |
|
577 |
ifTokens (valid for Strings only) specifies that the characters |
|
578 |
surrounding the recplacement must not be alphanumeric. |
|
579 |
Bruce Simth, must be incremented by 1 and not |
|
580 |
newSubstring if ifTokens is true. See example below. " |
|
581 |
||
582 |
| aString startSearch currentIndex endIndex | |
|
583 |
(ifTokens and: [(self isString) not]) |
|
584 |
ifTrue: [(self isKindOf: Text) ifFalse: [ |
|
585 |
self error: 'Token replacement only valid for Strings']]. |
|
586 |
aString := self. |
|
587 |
startSearch := 1. |
|
588 |
[(currentIndex := aString indexOfSubCollection: oldSubstring startingAt: startSearch) |
|
589 |
> 0] |
|
590 |
whileTrue: |
|
591 |
[endIndex := currentIndex + oldSubstring size - 1. |
|
592 |
(ifTokens not |
|
593 |
or: [(currentIndex = 1 |
|
594 |
or: [(aString at: currentIndex-1) isAlphaNumeric not]) |
|
595 |
and: [endIndex = aString size |
|
596 |
or: [(aString at: endIndex+1) isAlphaNumeric not]]]) |
|
597 |
ifTrue: [aString := aString |
|
598 |
copyReplaceFrom: currentIndex |
|
599 |
to: endIndex |
|
600 |
with: newSubstring. |
|
601 |
startSearch := currentIndex + newSubstring size] |
|
602 |
ifFalse: [ |
|
603 |
ifTokens |
|
604 |
ifTrue: [startSearch := currentIndex + 1] |
|
605 |
ifFalse: [startSearch := currentIndex + newSubstring size]]]. |
|
606 |
^ aString |
|
607 |
||
608 |
"Test case: |
|
609 |
'test te string' copyReplaceAll: 'te' with: 'longone' asTokens: true " |
|
610 |
||
611 |
"Created: / 26-08-2009 / 12:40:34 / Jaroslav Havlin <havlij6@fel.cvut.cz>" |
|
612 |
! ! |
|
613 |
||
429 | 614 |
!Stream methodsFor:'*monticello'! |
136 | 615 |
|
616 |
isMessageStream |
|
617 |
^ false |
|
618 |
! ! |
|
619 |
||
429 | 620 |
!String methodsFor:'*monticello'! |
136 | 621 |
|
622 |
extractNumber |
|
623 |
^ ('0', self select: [:ea | ea isDigit]) asNumber |
|
624 |
! ! |
|
625 |
||
429 | 626 |
!StringCollection methodsFor:'converting'! |
395 | 627 |
|
628 |
asStringWithNativeLineEndings |
|
629 |
||
630 |
^self asString |
|
631 |
||
632 |
"Created: / 12-09-2010 / 15:58:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
633 |
! ! |
|
634 |
||
429 | 635 |
!StringCollection methodsFor:'converting'! |
395 | 636 |
|
637 |
asStringWithSqueakLineEndings |
|
638 |
||
639 |
^ self |
|
640 |
asStringWith:Character return |
|
641 |
from:1 to:(self size) |
|
642 |
compressTabs:false |
|
643 |
final:nil |
|
644 |
||
645 |
"Created: / 12-09-2010 / 15:58:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
646 |
! ! |
|
647 |
||
429 | 648 |
!Symbol methodsFor:'*monticello-squeakCompatibility'! |
395 | 649 |
|
650 |
isDoIt |
|
651 |
^ (self == #DoIt) or:[ self == #DoItIn: ]. |
|
652 |
||
653 |
"Created: / 26-08-2009 / 11:46:44 / Jaroslav Havlin <havlij6@fel.cvut.cz>" |
|
654 |
! ! |
|
655 |
||
429 | 656 |
!Timestamp class methodsFor:'*monticello-instance creation'! |
395 | 657 |
|
658 |
fromMethodTimeStamp: aString |
|
659 |
| stream | |
|
660 |
stream := ReadStream on: aString. |
|
661 |
stream skipSeparators. |
|
662 |
stream skipTo: Character space. |
|
663 |
^self readFrom: stream. |
|
664 |
! ! |
|
665 |
||
429 | 666 |
!Tools::NewSystemBrowser methodsFor:'menu actions-monticello'! |
395 | 667 |
|
668 |
projectMenuMonticelloCommit |
|
736
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
669 |
| packageName package workingCopy | |
395 | 670 |
|
671 |
packageName := self theSingleSelectedProject. |
|
736
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
672 |
packageName isNil ifTrue:[ |
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
673 |
Dialog information:'Please select a single project'. |
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
674 |
^ self. |
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
675 |
]. |
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
676 |
|
943 | 677 |
self withWaitCursorDo:[ |
678 |
SourceCodeManagerUtilities basicNew |
|
679 |
validateConsistencyOfPackage:packageName |
|
680 |
doClasses:true |
|
681 |
doExtensions:true. |
|
786
8c0dffd42eb8
class: Tools::NewSystemBrowser
Claus Gittinger <cg@exept.de>
parents:
736
diff
changeset
|
682 |
|
943 | 683 |
package := MCPackage named: packageName. |
684 |
workingCopy := package workingCopy. |
|
685 |
MCCommitDialog new |
|
686 |
workingCopy: workingCopy; |
|
687 |
open |
|
688 |
]. |
|
395 | 689 |
|
690 |
"Created: / 14-09-2010 / 22:54:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
691 |
! ! |
|
692 |
||
736
43645227af41
care for nil superclass in Class >> asClassDefinition
Claus Gittinger <cg@exept.de>
parents:
732
diff
changeset
|
693 |
!UndefinedObject methodsFor:'* monticello'! |
150 | 694 |
|
695 |
typeOfClass |
|
696 |
"Necessary to support disjoint class hierarchies." |
|
697 |
||
698 |
^#normal |
|
699 |
! ! |
|
700 |
||
554 | 701 |
!UserPreferences methodsFor:'accessing-scm-monticello'! |
395 | 702 |
|
703 |
mcEnabled |
|
554 | 704 |
"/ needed for MCSettingsApp |
395 | 705 |
|
706 |
^self at: #mcEnabled ifAbsent: [true]. |
|
707 |
||
708 |
"Created: / 16-09-2010 / 09:44:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
709 |
"Modified: / 16-09-2010 / 14:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
554 | 710 |
"Modified (comment): / 15-01-2012 / 14:12:53 / cg" |
395 | 711 |
! ! |
712 |
||
554 | 713 |
!UserPreferences methodsFor:'accessing-scm-monticello'! |
395 | 714 |
|
715 |
mcEnabled: aBoolean |
|
554 | 716 |
"/ needed for MCSettingsApp |
395 | 717 |
|
718 |
self at: #mcEnabled put: aBoolean. |
|
719 |
||
720 |
"Created: / 16-09-2010 / 09:44:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
571 | 721 |
"Modified: / 27-08-2012 / 11:54:43 / cg" |
395 | 722 |
! ! |
723 |
||
554 | 724 |
!UserPreferences methodsFor:'accessing-scm-monticello'! |
395 | 725 |
|
726 |
mcRepositories |
|
562
d48401867000
Fixes in preferences reading/storing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
554
diff
changeset
|
727 |
"Returns a list of MCRepository as in LITERAL ARRAY ENCODING" |
395 | 728 |
|
562
d48401867000
Fixes in preferences reading/storing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
554
diff
changeset
|
729 |
^self at: #mcRepositories ifAbsent:[#(Array)]. |
395 | 730 |
|
731 |
" |
|
562
d48401867000
Fixes in preferences reading/storing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
554
diff
changeset
|
732 |
UserPreferences current mcRepositories |
d48401867000
Fixes in preferences reading/storing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
554
diff
changeset
|
733 |
UserPreferences current mcRepositories: #(Array) |
395 | 734 |
" |
735 |
||
736 |
"Created: / 16-09-2010 / 09:47:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
562
d48401867000
Fixes in preferences reading/storing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
554
diff
changeset
|
737 |
"Modified (comment): / 04-04-2012 / 11:08:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
395 | 738 |
! ! |
739 |
||
571 | 740 |
!UserPreferences methodsFor:'accessing-scm-monticello'! |
741 |
||
742 |
mcRepositories: aCollection |
|
743 |
"/ needed for MCSettingsApp |
|
744 |
||
745 |
self at: #mcRepositories put: aCollection. |
|
746 |
||
747 |
"Created: / 27-08-2012 / 11:54:34 / cg" |
|
748 |
! ! |
|
749 |
||
429 | 750 |
!VersionInfo methodsFor:'accessing'! |
395 | 751 |
|
752 |
timeStamp |
|
753 |
||
754 |
^Timestamp |
|
755 |
fromDate: (Date fromString: date) |
|
756 |
andTime: (Time fromString: time) |
|
757 |
||
758 |
"Created: / 09-09-2010 / 15:20:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
759 |
! ! |
|
760 |
||
429 | 761 |
!stx_goodies_monticello class methodsFor:'documentation'! |
182 | 762 |
|
995
92bb466548a9
Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
763 |
extensionsVersion_HG |
92bb466548a9
Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
764 |
|
92bb466548a9
Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
765 |
^ '$Changeset: <not expanded> $' |
786
8c0dffd42eb8
class: Tools::NewSystemBrowser
Claus Gittinger <cg@exept.de>
parents:
736
diff
changeset
|
766 |
! ! |