author | Claus Gittinger <cg@exept.de> |
Tue, 18 Dec 2018 13:50:54 +0100 | |
changeset 18550 | 8de40a119c04 |
parent 14094 | c011b525ae2a |
child 15566 | 184cea584be5 |
permissions | -rw-r--r-- |
13832 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
10741
e4645cbb0958
Fix package def libbasic3->libtool
Stefan Vogel <sv@exept.de>
parents:
10195
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
10195 | 13 |
|
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
Object subclass:#ChangeSetSpec |
|
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Dialogs' |
|
21 |
! |
|
22 |
||
23 |
ChangeSetSpec subclass:#Directory |
|
24 |
instanceVariableNames:'directory' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
privateIn:ChangeSetSpec |
|
28 |
! |
|
29 |
||
13832 | 30 |
ChangeSetSpec subclass:#Explicit |
31 |
instanceVariableNames:'changeSet' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
privateIn:ChangeSetSpec |
|
35 |
! |
|
36 |
||
37 |
ChangeSetSpec subclass:#File |
|
38 |
instanceVariableNames:'file' |
|
39 |
classVariableNames:'' |
|
40 |
poolDictionaries:'' |
|
41 |
privateIn:ChangeSetSpec |
|
42 |
! |
|
43 |
||
10195 | 44 |
ChangeSetSpec subclass:#Package |
45 |
instanceVariableNames:'package' |
|
46 |
classVariableNames:'' |
|
47 |
poolDictionaries:'' |
|
48 |
privateIn:ChangeSetSpec |
|
49 |
! |
|
50 |
||
13832 | 51 |
ChangeSetSpec::Directory subclass:#PackageDirectory |
52 |
instanceVariableNames:'' |
|
53 |
classVariableNames:'' |
|
54 |
poolDictionaries:'' |
|
55 |
privateIn:ChangeSetSpec |
|
56 |
! |
|
57 |
||
58 |
!ChangeSetSpec class methodsFor:'documentation'! |
|
59 |
||
60 |
copyright |
|
61 |
" |
|
62 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
63 |
All Rights Reserved |
|
64 |
||
65 |
This software is furnished under a license and may be used |
|
66 |
only in accordance with the terms of that license and with the |
|
67 |
inclusion of the above copyright notice. This software may not |
|
68 |
be provided or otherwise made available to, or used by, any |
|
69 |
other person. No title to or ownership of the software is |
|
70 |
hereby transferred. |
|
71 |
" |
|
72 |
! ! |
|
73 |
||
74 |
!ChangeSetSpec class methodsFor:'instance creation'! |
|
75 |
||
76 |
changeSet |
|
77 |
||
78 |
^Explicit new |
|
79 |
||
80 |
"Created: / 03-08-2012 / 15:35:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
81 |
! |
|
82 |
||
83 |
changeSet: changeset |
|
84 |
||
85 |
^Explicit new changeSet: changeset |
|
86 |
||
87 |
"Created: / 19-03-2012 / 23:59:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
88 |
! |
|
89 |
||
90 |
directory: directory |
|
91 |
||
92 |
^Directory new package: directory |
|
93 |
||
94 |
"Created: / 19-03-2012 / 23:59:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
95 |
! |
|
96 |
||
97 |
file: file |
|
98 |
||
99 |
^File new file: file |
|
100 |
||
101 |
"Created: / 19-03-2012 / 23:58:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
102 |
! |
|
103 |
||
104 |
package: package |
|
105 |
||
106 |
^Package new package: package |
|
107 |
||
108 |
"Created: / 19-03-2012 / 23:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
109 |
! ! |
|
10195 | 110 |
|
111 |
!ChangeSetSpec class methodsFor:'accessing'! |
|
112 |
||
113 |
editorSpecSelector |
|
114 |
||
115 |
^self subclassResponsibility |
|
116 |
||
117 |
"Created: / 05-07-2011 / 23:37:03 / jv" |
|
118 |
! |
|
119 |
||
120 |
label |
|
121 |
||
122 |
^self subclassResponsibility |
|
123 |
||
124 |
"Created: / 05-07-2011 / 23:29:33 / jv" |
|
125 |
! |
|
126 |
||
127 |
specClasses |
|
128 |
||
13832 | 129 |
^(self allSubclasses " reject:[:e|e == Explicit]") asSortedCollection:[:a :b | a name < b name ]. |
10195 | 130 |
|
131 |
"Created: / 05-07-2011 / 23:30:45 / jv" |
|
13832 | 132 |
"Modified: / 12-11-2013 / 15:18:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10195 | 133 |
! ! |
134 |
||
135 |
!ChangeSetSpec methodsFor:'accessing'! |
|
136 |
||
137 |
changeSet |
|
138 |
||
139 |
^self subclassResponsibility |
|
140 |
||
141 |
"Created: / 05-07-2011 / 23:13:35 / jv" |
|
142 |
! |
|
143 |
||
13832 | 144 |
directory |
145 |
^'N/A' |
|
146 |
||
147 |
"Created: / 19-03-2012 / 23:31:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
148 |
! |
|
149 |
||
10195 | 150 |
editorSpecSelector |
151 |
||
152 |
^self class editorSpecSelector |
|
153 |
||
154 |
"Created: / 06-07-2011 / 09:57:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13832 | 155 |
! |
156 |
||
157 |
file |
|
158 |
^'N/A' |
|
159 |
||
160 |
"Created: / 19-03-2012 / 23:31:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
161 |
! |
|
162 |
||
163 |
package |
|
164 |
^'N/A' |
|
165 |
||
166 |
"Created: / 19-03-2012 / 23:31:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
167 |
! ! |
|
168 |
||
169 |
!ChangeSetSpec methodsFor:'testing'! |
|
170 |
||
171 |
isChangeSet |
|
172 |
^self isExplicit |
|
173 |
||
174 |
"Created: / 20-03-2012 / 14:58:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
175 |
! |
|
176 |
||
177 |
isDirectory |
|
178 |
^false |
|
179 |
||
180 |
"Created: / 20-03-2012 / 14:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
181 |
! |
|
182 |
||
183 |
isExplicit |
|
184 |
^false |
|
185 |
||
186 |
"Created: / 20-03-2012 / 14:58:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
187 |
! |
|
188 |
||
189 |
isFile |
|
190 |
^false |
|
191 |
||
192 |
"Created: / 20-03-2012 / 14:58:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
193 |
! |
|
194 |
||
195 |
isPackage |
|
196 |
^false |
|
197 |
||
198 |
"Created: / 20-03-2012 / 14:58:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10195 | 199 |
! ! |
200 |
||
201 |
!ChangeSetSpec::Directory class methodsFor:'accessing'! |
|
202 |
||
203 |
editorSpecSelector |
|
204 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
205 |
||
206 |
^ #editorSpecForDirectory |
|
207 |
||
208 |
"Modified: / 05-07-2011 / 23:37:41 / jv" |
|
209 |
! |
|
210 |
||
211 |
label |
|
212 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
213 |
||
214 |
^ 'Directory' |
|
215 |
||
216 |
"Modified: / 05-07-2011 / 23:31:12 / jv" |
|
217 |
! ! |
|
218 |
||
219 |
!ChangeSetSpec::Directory methodsFor:'accessing'! |
|
220 |
||
221 |
changeSet |
|
222 |
"superclass Tools::ChangeSetSpec says that I am responsible to implement this method" |
|
223 |
||
224 |
| name | |
|
225 |
name := directory asString. |
|
226 |
name size > 50 ifTrue:[ |
|
227 |
name := '...' , (name copyFrom: name size - 47) |
|
228 |
]. |
|
229 |
||
230 |
^(ChangeSet fromDirectory: self directory) |
|
231 |
name: name |
|
232 |
||
233 |
"Modified (format): / 06-07-2011 / 11:40:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
234 |
! |
|
235 |
||
236 |
directory |
|
237 |
^ directory |
|
238 |
! |
|
239 |
||
240 |
directory:aStringOrFilename |
|
241 |
directory := aStringOrFilename. |
|
242 |
! ! |
|
243 |
||
13832 | 244 |
!ChangeSetSpec::Directory methodsFor:'testing'! |
245 |
||
246 |
isDirectory |
|
247 |
^true |
|
248 |
||
249 |
"Created: / 20-03-2012 / 14:59:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
250 |
! ! |
|
251 |
||
252 |
!ChangeSetSpec::Explicit class methodsFor:'accessing'! |
|
253 |
||
254 |
editorSpecSelector |
|
255 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
256 |
||
257 |
^ #editorSpecForExplicit |
|
258 |
||
259 |
"Modified: / 03-08-2012 / 15:21:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
260 |
! |
|
261 |
||
262 |
label |
|
263 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
264 |
||
265 |
^ 'ChangeSet object' |
|
266 |
||
267 |
"Modified: / 03-08-2012 / 15:19:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
268 |
! ! |
|
269 |
||
270 |
!ChangeSetSpec::Explicit methodsFor:'accessing'! |
|
271 |
||
272 |
changeSet |
|
273 |
"superclass Tools::ChangeSetSpec says that I am responsible to implement this method" |
|
274 |
||
14094
c011b525ae2a
class: Tools::ChangeSetSpec
Claus Gittinger <cg@exept.de>
parents:
13832
diff
changeset
|
275 |
changeSet isNil ifTrue:[changeSet := ChangeSet new]. |
c011b525ae2a
class: Tools::ChangeSetSpec
Claus Gittinger <cg@exept.de>
parents:
13832
diff
changeset
|
276 |
^ changeSet |
13832 | 277 |
|
278 |
"Modified: / 03-08-2012 / 15:22:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
279 |
! |
|
280 |
||
281 |
changeSet:something |
|
282 |
changeSet := something. |
|
283 |
! ! |
|
284 |
||
285 |
!ChangeSetSpec::Explicit methodsFor:'testing'! |
|
286 |
||
287 |
isExplicit |
|
288 |
^true |
|
289 |
||
290 |
"Created: / 20-03-2012 / 14:59:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
291 |
! ! |
|
292 |
||
293 |
!ChangeSetSpec::File class methodsFor:'accessing'! |
|
294 |
||
295 |
editorSpecSelector |
|
296 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
297 |
||
298 |
^ #editorSpecForFile |
|
299 |
||
300 |
"Modified: / 19-03-2012 / 22:04:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
301 |
! |
|
302 |
||
303 |
label |
|
304 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
305 |
||
306 |
^ 'File' |
|
307 |
||
308 |
"Modified: / 19-03-2012 / 22:04:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
309 |
! ! |
|
310 |
||
311 |
!ChangeSetSpec::File methodsFor:'accessing'! |
|
312 |
||
313 |
changeSet |
|
314 |
"superclass Tools::ChangeSetSpec says that I am responsible to implement this method" |
|
315 |
||
316 |
| name | |
|
317 |
name := file asString. |
|
318 |
name size > 50 ifTrue:[ |
|
319 |
name := '...' , (name copyFrom: name size - 47) |
|
320 |
]. |
|
321 |
||
322 |
^(ChangeSet fromFile: self file) |
|
323 |
name: name |
|
324 |
||
325 |
"Modified: / 20-03-2012 / 11:31:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
326 |
! |
|
327 |
||
328 |
file |
|
329 |
^ file |
|
330 |
! |
|
331 |
||
332 |
file:something |
|
333 |
file := something. |
|
334 |
! ! |
|
335 |
||
336 |
!ChangeSetSpec::File methodsFor:'testing'! |
|
337 |
||
338 |
isFile |
|
339 |
^true |
|
340 |
||
341 |
"Created: / 20-03-2012 / 14:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
342 |
! ! |
|
343 |
||
10195 | 344 |
!ChangeSetSpec::Package class methodsFor:'accessing'! |
345 |
||
346 |
editorSpecSelector |
|
347 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
348 |
||
349 |
^ #editorSpecForPackage |
|
350 |
||
351 |
"Modified: / 05-07-2011 / 23:37:52 / jv" |
|
352 |
! |
|
353 |
||
354 |
label |
|
355 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
356 |
||
13832 | 357 |
^ 'Package (in image)' |
10195 | 358 |
|
359 |
"Modified: / 05-07-2011 / 23:31:34 / jv" |
|
13832 | 360 |
"Modified: / 12-11-2013 / 15:17:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10195 | 361 |
! ! |
362 |
||
363 |
!ChangeSetSpec::Package methodsFor:'accessing'! |
|
364 |
||
365 |
changeSet |
|
366 |
"superclass Tools::ChangeSetSpec says that I am responsible to implement this method" |
|
367 |
||
368 |
^ (ChangeSet forPackage: self package) |
|
369 |
name: ('Package %1 (from image)' bindWith: package) |
|
370 |
||
371 |
"Modified: / 06-07-2011 / 11:38:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
372 |
! |
|
373 |
||
374 |
package |
|
375 |
^ package |
|
376 |
! |
|
377 |
||
378 |
package:aStringOrSymbol |
|
379 |
package := aStringOrSymbol. |
|
380 |
! ! |
|
381 |
||
13832 | 382 |
!ChangeSetSpec::Package methodsFor:'testing'! |
383 |
||
384 |
isPackage |
|
385 |
^true |
|
386 |
||
387 |
"Created: / 20-03-2012 / 14:59:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
388 |
! ! |
|
389 |
||
390 |
!ChangeSetSpec::PackageDirectory class methodsFor:'accessing'! |
|
391 |
||
392 |
label |
|
393 |
"superclass Tools::ChangeSetSpec class says that I am responsible to implement this method" |
|
394 |
||
395 |
^ 'Package (in directory)' |
|
396 |
||
397 |
"Created: / 12-11-2013 / 15:17:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
398 |
! ! |
|
399 |
||
400 |
!ChangeSetSpec::PackageDirectory methodsFor:'accessing'! |
|
401 |
||
402 |
changeSet |
|
403 |
"superclass Tools::ChangeSetSpec says that I am responsible to implement this method" |
|
404 |
||
405 |
| name | |
|
406 |
name := directory asString. |
|
407 |
name size > 50 ifTrue:[ |
|
408 |
name := '...' , (name copyFrom: name size - 47) |
|
409 |
]. |
|
410 |
||
411 |
^(ChangeSet fromDirectory: self directory asSmalltalkXPackage: true) |
|
412 |
name: name |
|
413 |
||
414 |
"Created: / 12-11-2013 / 15:20:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
415 |
"Modified: / 02-12-2013 / 22:28:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
416 |
! ! |
|
417 |
||
10195 | 418 |
!ChangeSetSpec class methodsFor:'documentation'! |
419 |
||
420 |
version_CVS |
|
14094
c011b525ae2a
class: Tools::ChangeSetSpec
Claus Gittinger <cg@exept.de>
parents:
13832
diff
changeset
|
421 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetSpec.st,v 1.4 2014-03-02 22:37:29 cg Exp $' |
10195 | 422 |
! ! |
13832 | 423 |