author | Jan Vrany <jan.vrany@labware.com> |
Tue, 11 Jul 2023 12:59:07 +0100 | |
branch | jv |
changeset 1174 | f0a16c301971 |
parent 1095 | 87f223484bc3 |
permissions | -rw-r--r-- |
1095
87f223484bc3
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
634
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
87f223484bc3
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
634
diff
changeset
|
2 |
|
267 | 3 |
"{ Package: 'stx:goodies/monticello' }" |
4 |
||
5 |
Dictionary subclass:#MCLazyPropertyDictionary |
|
6 |
instanceVariableNames:'tokens' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
634 | 9 |
category:'SCM-Monticello-St/X support' |
267 | 10 |
! |
11 |
||
12 |
||
13 |
!MCLazyPropertyDictionary class methodsFor:'instance creation'! |
|
14 |
||
15 |
withTokens: anArray |
|
16 |
||
17 |
^self new setTokens: anArray |
|
18 |
||
19 |
"Created: / 28-10-2010 / 15:20:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
20 |
! ! |
|
21 |
||
22 |
!MCLazyPropertyDictionary methodsFor:'accessing'! |
|
23 |
||
24 |
at: key ifAbsent: block |
|
25 |
||
26 |
tokens ifNotNil:[self associate]. |
|
27 |
^super at: key ifAbsent:block |
|
28 |
||
29 |
"Created: / 28-10-2010 / 15:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
30 |
! ! |
|
31 |
||
32 |
!MCLazyPropertyDictionary methodsFor:'initialization'! |
|
33 |
||
34 |
setTokens: anArray |
|
35 |
||
36 |
tokens := anArray |
|
37 |
||
38 |
"Created: / 28-10-2010 / 15:20:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
39 |
! ! |
|
40 |
||
41 |
!MCLazyPropertyDictionary methodsFor:'private'! |
|
42 |
||
43 |
associate |
|
44 |
||
45 |
tokens pairWiseDo: [:key :value | |
|
46 |
| tmp | |
|
47 |
tmp := value. |
|
48 |
value isString ifFalse: [tmp := value collect: [:ea | MCLazyPropertyDictionary withTokens: ea]]. |
|
49 |
value = 'nil' ifTrue: [tmp := '']. |
|
50 |
self at: key put: tmp]. |
|
51 |
tokens := nil. |
|
52 |
||
53 |
"Created: / 28-10-2010 / 15:23:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
54 |
! ! |
|
55 |
||
56 |
!MCLazyPropertyDictionary class methodsFor:'documentation'! |
|
57 |
||
58 |
version |
|
634 | 59 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyPropertyDictionary.st,v 1.3 2012-09-11 21:22:36 cg Exp $' |
267 | 60 |
! |
61 |
||
62 |
version_CVS |
|
634 | 63 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyPropertyDictionary.st,v 1.3 2012-09-11 21:22:36 cg Exp $' |
267 | 64 |
! |
65 |
||
66 |
version_SVN |
|
1095
87f223484bc3
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
634
diff
changeset
|
67 |
^ '§Id: MCLazyPropertyDictionary.st 23 2010-10-29 14:41:24Z vranyj1 §' |
267 | 68 |
! ! |