extensions.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 23 Aug 2011 15:37:10 +0200
changeset 437 f66cbf40d994
parent 436 436066f63a27
child 452 cbc2f85f11f8
permissions -rw-r--r--
Fixes for saving Smalltalk/X packages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
     1
"{ Package: 'stx:goodies/monticello' }"!
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
     2
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
     3
!Annotation class methodsFor:'instance creation'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
     4
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
     5
mctimestamp: aString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
     6
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
     7
    ^MCTimestampAnnotation new timestamp: aString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
     8
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
     9
    "Created: / 14-09-2010 / 15:35:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    10
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    11
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
    12
!Behavior methodsFor:'*monticello-squeakCompatibility'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    13
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    14
includesLocalSelector:aSymbol 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    15
    ^ self localSelectors includes:aSymbol
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    16
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    17
    "Created: / 26-08-2009 / 11:50:00 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    18
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    19
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
    20
!Behavior methodsFor:'*monticello-squeakCompatibility'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    21
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    22
localSelectors
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    23
    ^ self methodDictionary collect:[:x | x selector asSymbol ]
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    24
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    25
    "Created: / 26-08-2009 / 11:53:47 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    26
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    27
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
    28
!Behavior methodsFor:'*monticello-squeakCompatibility'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    29
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    30
traitCompositionString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    31
        ^ '{}'
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    32
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    33
    "Created: / 26-08-2009 / 12:43:23 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    34
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    35
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
    36
!Behavior methodsFor:'*monticello-squeakCompatibility'!
150
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
    37
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
    38
typeOfClass
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    39
        "Answer a symbol uniquely describing the type of the receiver"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    40
        "self instSpec = CompiledMethod instSpec ifTrue:[^#compiledMethod]." "Very special!!"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    41
        self isBytes ifTrue:[^#bytes].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    42
        (self isWords and:[self isPointers not]) ifTrue:[^#words].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    43
        self isWeakPointers ifTrue:[^#weak].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    44
        self isVariable ifTrue:[^#variable].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    45
        ^#normal.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    46
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    47
    "Created: / 26-08-2009 / 12:45:50 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    48
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    49
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
    50
!Change methodsFor:'accessing'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    51
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    52
mcDefinition
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    53
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    54
    ^self objectAttributeAt: #mcDefinition
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    55
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    56
    "Created: / 08-11-2010 / 17:56:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    57
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    58
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
    59
!Change methodsFor:'accessing'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    60
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    61
mcDefinition: aMCDefinition
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    62
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    63
    ^self objectAttributeAt: #mcDefinition put: aMCDefinition
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    64
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    65
    "Created: / 08-11-2010 / 17:56:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
150
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
    66
! !
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    67
436
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    68
!CharacterArray methodsFor:'*monticello-squeakCompatibility'!
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    69
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    70
asStringWithNativeLineEndings
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    71
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    72
    ^self copyReplaceAll:Character return with: Character cr
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    73
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    74
    "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
    75
    "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
    76
! !
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    77
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    78
!CharacterArray methodsFor:'*monticello-squeakCompatibility'!
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    79
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    80
asStringWithSqueakLineEndings
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    81
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    82
    ^self copyReplaceAll:Character cr with: Character return
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    83
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    84
    "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
    85
    "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
    86
! !
436066f63a27 moved asStringWith*LineEndings to CharacterArray
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 429
diff changeset
    87
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
    88
!Class methodsFor:'*monticello'!
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    89
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    90
asClassDefinition
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    91
    ^ MCClassDefinition
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    92
        name: self name
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    93
        superclassName: self superclass name
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    94
        traitComposition: self traitCompositionString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    95
        classTraitComposition: self class traitCompositionString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    96
        category: self category 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    97
        instVarNames: self instVarNames
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    98
        classVarNames: self classVarNames
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    99
        poolDictionaryNames: self poolDictionaryNames
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   100
        classInstVarNames: self class instVarNames
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   101
        type: self typeOfClass
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   102
        comment: (self organization classComment ? '') asStringWithSqueakLineEndings
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   103
        commentStamp: self organization commentStamp
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   104
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   105
    "Modified: / 12-09-2010 / 17:19:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   106
! !
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   107
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   108
!Class methodsFor:'*monticello'!
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   109
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   110
classDefinitions
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   111
	^ Array with: self asClassDefinition
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   112
! !
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   113
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   114
!Class methodsFor:'*monticello'!
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   115
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   116
poolDictionaryNames
160
c26ad17d4dc7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 150
diff changeset
   117
        ^ self sharedPools "/ collect: [:ea | ea name "self environment keyAtIdentityValue: ea"]
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   118
! !
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   119
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   120
!ClassBuilder methodsFor:'compatibility - squeak'!
150
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   121
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   122
name:newName 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   123
    inEnvironment:aSystemDictionaryOrClass 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   124
    subclassOf:aClass
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   125
    type: type 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   126
    instanceVariableNames: stringOfInstVarNames 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   127
    classVariableNames: stringOfClassVarNames 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   128
    poolDictionaries: stringOfPoolNames
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   129
    category: categoryString
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   130
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   131
    "this returns the created class; it is not a simple accessor"
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   132
150
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   133
    |variableBoolean wordsBoolean pointersBoolean|
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   134
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   135
    variableBoolean := wordsBoolean := pointersBoolean := false.
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   136
    type ~~ #normal ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   137
self halt:'todo'.
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   138
    ].
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   139
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   140
    self 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   141
        name:newName 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   142
        inEnvironment:aSystemDictionaryOrClass 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   143
        subclassOf:aClass 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   144
        instanceVariableNames:stringOfInstVarNames 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   145
        variable:variableBoolean 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   146
        words:wordsBoolean 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   147
        pointers:pointersBoolean 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   148
        classVariableNames:stringOfClassVarNames 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   149
        poolDictionaries:stringOfPoolNames 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   150
        category:categoryString 
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   151
        comment:''
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   152
        changed:false
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   153
        classInstanceVariableNames:''.
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   154
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   155
    ^ self buildClass
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   156
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   157
    "Modified (comment): / 20-08-2011 / 18:12:51 / cg"
150
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   158
! !
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   159
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   160
!ClassDescription methodsFor:'*monticello-squeakCompatibility'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   161
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   162
mcDefinition
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   163
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   164
    |s|
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   165
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   166
    s := WriteStream on:(String new).
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   167
    self
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   168
        basicFileOutDefinitionOn:s
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   169
        withNameSpace:false
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   170
        withPackage:false.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   171
    s position: s position - 1.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   172
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   173
    ^ s contents
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   174
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   175
    "Created: / 11-09-2010 / 18:06:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   176
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   177
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   178
!Object methodsFor:'*monticello'!
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   179
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   180
isConflict
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   181
	^false
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   182
! !
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   183
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   184
!ProjectDefinition class methodsFor:'code generation'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   185
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   186
monticelloTimestamps_code
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   187
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   188
    | methodsWithTimestamp |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   189
    methodsWithTimestamp := OrderedCollection new.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   190
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   191
    self classes do:[:cls|
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   192
        cls methodsDo:[:mthd|
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   193
            (mthd hasAnnotation: #mctimestamp:) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   194
                methodsWithTimestamp add: mthd
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   195
            ]
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   196
        ].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   197
    ].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   198
    self extensionMethods do:[:mthd|
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   199
        (mthd hasAnnotation: #mctimestamp:) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   200
            methodsWithTimestamp add: mthd                
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   201
        ]
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   202
    ].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   203
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   204
    ^self monticelloTimestamps_codeFor: methodsWithTimestamp
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   205
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   206
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   207
        stx_goodies_mondrian_core monticelloTimestamps_code
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   208
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   209
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   210
    "Created: / 09-11-2010 / 18:23:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   211
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   212
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   213
!ProjectDefinition class methodsFor:'code generation'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   214
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   215
monticelloTimestamps_codeFor: methods
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   216
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   217
    | code |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   218
    code := String new writeStream.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   219
    code nextPutAll:'monticelloTimestamps
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   220
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   221
    ^#('.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   222
    methods do:[:mthd|
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   223
     code
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   224
        tab; tab; 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   225
        nextPut:$(;
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   226
        nextPutAll: mthd mclass fullName;
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   227
        space;
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   228
        nextPutAll: mthd selector;
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   229
        space;
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   230
        nextPutAll: (mthd annotationAt: #mctimestamp:) timestamp storeString;        
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   231
        nextPut:$); 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   232
        cr.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   233
    ].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   234
    code nextPutAll:'
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   235
    )'.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   236
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   237
    ^code contents
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   238
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   239
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   240
        stx_goodies_mondrian_core mcTimestamps_code
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   241
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   242
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   243
    "Created: / 09-11-2010 / 18:27:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   244
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   245
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   246
!SequenceableCollection methodsFor:'*monticello-squeakCompatibility'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   247
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   248
copyReplaceAll: oldSubstring with: newSubstring asTokens: ifTokens
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   249
        "Answer a copy of the receiver in which all occurrences of
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   250
        oldSubstring have been replaced by newSubstring.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   251
        ifTokens (valid for Strings only) specifies that the characters
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   252
        surrounding the recplacement must not be alphanumeric.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   253
                Bruce Simth,  must be incremented by 1 and not 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   254
        newSubstring if ifTokens is true.  See example below. "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   255
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   256
        | aString startSearch currentIndex endIndex |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   257
        (ifTokens and: [(self isString) not])
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   258
                ifTrue: [(self isKindOf: Text) ifFalse: [
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   259
                        self error: 'Token replacement only valid for Strings']].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   260
        aString := self.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   261
        startSearch := 1.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   262
        [(currentIndex := aString indexOfSubCollection: oldSubstring startingAt: startSearch)
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   263
                         > 0]
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   264
                whileTrue: 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   265
                [endIndex := currentIndex + oldSubstring size - 1.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   266
                (ifTokens not
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   267
                        or: [(currentIndex = 1
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   268
                                        or: [(aString at: currentIndex-1) isAlphaNumeric not])
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   269
                                and: [endIndex = aString size
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   270
                                        or: [(aString at: endIndex+1) isAlphaNumeric not]]])
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   271
                        ifTrue: [aString := aString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   272
                                        copyReplaceFrom: currentIndex
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   273
                                        to: endIndex
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   274
                                        with: newSubstring.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   275
                                startSearch := currentIndex + newSubstring size]
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   276
                        ifFalse: [
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   277
                                ifTokens 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   278
                                        ifTrue: [startSearch := currentIndex + 1]
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   279
                                        ifFalse: [startSearch := currentIndex + newSubstring size]]].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   280
        ^ aString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   281
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   282
"Test case:
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   283
        'test te string' copyReplaceAll: 'te' with: 'longone' asTokens: true   "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   284
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   285
    "Created: / 26-08-2009 / 12:40:34 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   286
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   287
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   288
!Stream methodsFor:'*monticello'!
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   289
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   290
isMessageStream
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   291
	^ false
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   292
! !
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   293
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   294
!String methodsFor:'*monticello'!
136
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   295
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   296
extractNumber
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   297
	^ ('0', self select: [:ea | ea isDigit]) asNumber
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   298
! !
6eea73c5dc65 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   299
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   300
!String methodsFor:'*monticello-squeakCompatibility'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   301
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   302
withSqueakLineEndings
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   303
        "Answer a copy of myself in which all sequences of <CR><LF> or <LF> have been changed to <CR>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   304
        | newText |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   305
        (self includes: Character lf) ifFalse: [ ^self copy ].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   306
        newText := self copyReplaceAll: String crlf with: String cr.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   307
        (newText asString includes: Character lf) ifFalse: [ ^newText ].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   308
        ^newText copyReplaceAll: String lf with: String cr asTokens: false.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   309
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   310
    "Created: / 26-08-2009 / 11:35:56 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   311
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   312
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   313
!StringCollection methodsFor:'converting'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   314
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   315
asStringWithNativeLineEndings
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   316
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   317
    ^self asString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   318
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   319
    "Created: / 12-09-2010 / 15:58:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   320
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   321
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   322
!StringCollection methodsFor:'converting'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   323
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   324
asStringWithSqueakLineEndings
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   325
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   326
    ^ self 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   327
        asStringWith:Character return
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   328
        from:1 to:(self size) 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   329
        compressTabs:false 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   330
        final:nil
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   331
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   332
    "Created: / 12-09-2010 / 15:58:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   333
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   334
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   335
!Symbol methodsFor:'*monticello-squeakCompatibility'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   336
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   337
isDoIt
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   338
    ^ (self == #DoIt) or:[ self == #DoItIn: ].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   339
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   340
    "Created: / 26-08-2009 / 11:46:44 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   341
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   342
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   343
!Timestamp class methodsFor:'*monticello-instance creation'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   344
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   345
fromMethodTimeStamp: aString
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   346
	| stream |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   347
	stream := ReadStream on: aString.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   348
	stream skipSeparators.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   349
	stream skipTo: Character space.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   350
	^self readFrom: stream.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   351
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   352
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   353
!Tools::NewSystemBrowser methodsFor:'menu actions-monticello'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   354
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   355
projectMenuMonticelloCommit
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   356
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   357
    | packageName package workingCopy |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   358
    packageName := self theSingleSelectedProject.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   359
    package := MCPackage named: packageName.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   360
    workingCopy := package workingCopy.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   361
    MCCommitDialog new
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   362
        workingCopy: workingCopy;
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   363
        open
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   364
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   365
    "Created: / 14-09-2010 / 22:54:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   366
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   367
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   368
!Tools::NewSystemBrowser class methodsFor:'menu specs-monticello'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   369
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   370
projectMonticelloMenu
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   371
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   372
     by the MenuEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   373
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   374
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   375
     the MenuEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   376
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   377
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   378
     MenuEditor new openOnClass:Tools::NewSystemBrowser andSelector:#projectMonticelloMenu
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   379
     (Menu new fromLiteralArrayEncoding:(Tools::NewSystemBrowser projectMonticelloMenu)) startUp
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   380
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   381
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   382
    <resource: #menu>
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   383
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   384
    ^ 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   385
     #(Menu
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   386
        (
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   387
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   388
            label: 'Commit'
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   389
            itemValue: projectMenuMonticelloCommit
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   390
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   391
          )
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   392
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   393
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   394
          )
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   395
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   396
            enabled: false
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   397
            label: 'Not yet finished...'
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   398
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   399
          )
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   400
         )
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   401
        nil
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   402
        nil
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   403
      )
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   404
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   405
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   406
!UndefinedObject methodsFor:'* monticello'!
150
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   407
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   408
typeOfClass
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   409
    "Necessary to support disjoint class hierarchies."
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   410
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   411
    ^#normal
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   412
! !
Claus Gittinger <cg@exept.de>
parents: 136
diff changeset
   413
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   414
!UserPreferences methodsFor:'accessing-monticello'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   415
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   416
mcEnabled
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   417
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   418
    ^self at: #mcEnabled ifAbsent: [true].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   419
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   420
    "Created: / 16-09-2010 / 09:44:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   421
    "Modified: / 16-09-2010 / 14:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   422
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   423
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   424
!UserPreferences methodsFor:'accessing-monticello'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   425
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   426
mcEnabled: aBoolean
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   427
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   428
    self at: #mcEnabled put: aBoolean.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   429
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   430
    "Created: / 16-09-2010 / 09:44:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   431
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   432
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   433
!UserPreferences methodsFor:'accessing-monticello'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   434
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   435
mcRepositories
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   436
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   437
    | repos |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   438
    repos := self at: #mcRepositories ifAbsent:[#()].
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   439
    ^repos decodeAsLiteralArray
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   440
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   441
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   442
        self mcRepositories: #() 
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   443
    "
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   444
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   445
    "Created: / 16-09-2010 / 09:47:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   446
    "Modified: / 17-09-2010 / 11:45:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   447
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   448
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   449
!UserPreferences methodsFor:'accessing-monticello'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   450
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   451
mcRepositories: aCollection
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   452
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   453
    | repos |
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   454
    repos  := aCollection literalArrayEncoding.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   455
    self at: #mcRepositories put:repos.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   456
    MCRepositoryGroup default flushRepositories.
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   457
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   458
    "Created: / 16-09-2010 / 09:53:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   459
    "Modified: / 16-09-2010 / 13:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   460
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   461
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   462
!VersionInfo methodsFor:'accessing'!
395
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   463
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   464
timeStamp
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   465
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   466
    ^Timestamp
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   467
        fromDate: (Date fromString: date)
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   468
        andTime:  (Time fromString: time)
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   469
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   470
    "Created: / 09-09-2010 / 15:20:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   471
! !
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   472
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   473
!stx_goodies_monticello class methodsFor:'documentation'!
182
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   474
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   475
extensionsVersion_CVS
437
f66cbf40d994 Fixes for saving Smalltalk/X packages
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 436
diff changeset
   476
    ^ '$Header: /cvs/stx/stx/goodies/monticello/extensions.st,v 1.10 2011-08-23 13:37:10 vrany Exp $'
429
1e66cc1ffc92 loader fix
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   477
! !