reports/Builder__ReportExtensionsSourceInfo.st
author Claus Gittinger <cg@exept.de>
Thu, 28 Mar 2019 13:54:38 +0100
changeset 542 aa25a71be62a
parent 274 b13db8438e4a
child 534 1bed627ec135
permissions -rw-r--r--
#DOCUMENTATION by cg class: stx_goodies_builder_quickSelfTest class definition class: stx_goodies_builder_quickSelfTest class added:18 methods
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
274
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
     1
"{ Encoding: utf8 }"
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
     2
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ Package: 'stx:goodies/builder/reports' }"
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
"{ NameSpace: Builder }"
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
ReportSourceInfo subclass:#ReportExtensionsSourceInfo
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	instanceVariableNames:''
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	classVariableNames:''
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
	poolDictionaries:''
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
	category:'Builder-Reports-Utils'
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
!
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
264
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    15
!ReportExtensionsSourceInfo methodsFor:'accessing'!
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    16
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    17
pathNameAbsolute: aBoolean
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    18
    "Return a path (as String) to file containing the source code. The file points to the
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    19
     real source file. If `aBoolean` is true, then absolute path is returned, otherwise
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    20
     realtive path to package root is returned."
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    21
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    22
    | packageDir |
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    23
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    24
    packageDir := aBoolean 
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    25
                    ifTrue:[ (Smalltalk getPackageDirectoryForPackage: package) pathName ]
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    26
                    ifFalse: [ package asString replaceAll: $: with: Filename separator; replaceAll: $/ with: Filename separator ].
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    27
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    28
    ^ packageDir , Filename separator , 'extensions.st'.
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    29
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    30
    "
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    31
    (Builder::ReportSourceInfo forExtensionsInPackage: 'stx:libtool') pathNameAbsolute: true
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    32
    (Builder::ReportSourceInfo forExtensionsInPackage: 'stx:libtool') pathNameAbsolute: false
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    33
    "
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    34
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    35
    "Created: / 16-12-2014 / 10:27:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    36
! !
ff9647e01309 Added ReportSourceInfo>>pathNameAbsolute: aBoolean
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 204
diff changeset
    37
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
!ReportExtensionsSourceInfo methodsFor:'initialization'!
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
initializeWithPackage: pkg
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
    package := pkg.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
    self setup.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
    "Created: / 29-07-2013 / 18:38:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
! !
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
!ReportExtensionsSourceInfo methodsFor:'utilities'!
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
fileOutOn: streamArg
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
    "This code is stupid as it is a copy-paste of several methods here and there that
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
     files out an extension.st. But the the original code is so rubbish so I had
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
     to do it this way. Sorry."
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
    | extensions wide stream s methodsSortedByName defClass scmManagerOrNil |
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
    extensions := ProjectDefinition searchForExtensionsWithProject: package.     
274
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
    57
    extensions isEmptyOrNil ifTrue:[ ^ self ].
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    wide := false.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
    stream := streamArg.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
    extensions do:[:method|
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
        wide := wide or:[method source isWideString].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
    ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
    wide ifTrue:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
        stream := EncodedStream stream: stream encoder: (CharacterEncoder encoderForUTF8).      
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
        stream nextPutAll: '"{ Encoding: utf8 }"'; cr;cr.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
    ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
    s := stream.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
    s nextPutAll:'"{ Package: '''.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
    s nextPutAll:package asString.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
    s nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
    "/ don't write a timestamp. Otherwise we would always generate a new version, even if nothing changed
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
    "/ s nextPutAll:(Smalltalk timeStamp).
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
    "/ s nextPutChunkSeparator. 
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
    "/ s cr; cr.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
    "/ sort them by name (to avoid conflicts due to SCM merge)
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
    methodsSortedByName := extensions asOrderedCollection.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
    methodsSortedByName sort:[:a :b |
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
                                |clsA clsB|
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
                                clsA := a mclass name.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
                                clsB := b mclass name.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
                                clsA < clsB ifTrue:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
                                    true
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
                                ] ifFalse:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
                                    clsA > clsB ifTrue:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
                                        false
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    91
                                    ] ifFalse:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    92
                                        a selector < b selector
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
                                    ]
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
                                ]
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
                              ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
    methodsSortedByName do:[:aMethod |
274
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
    97
        |cat privacy aStream|
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    99
        aStream := s.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   100
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
    aStream nextPutChunkSeparator.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   102
    aMethod mclass name printOn:aStream.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   103
"/        self printClassNameOn:aStream.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   104
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   105
    (privacy := aMethod privacy) ~~ #public ifTrue:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
        aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
    ] ifFalse:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
        aStream nextPutAll:' methodsFor:'.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
    ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   111
    cat := aMethod category ? ''.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
    aStream nextPutAll:cat asString storeString.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
    aStream nextPutChunkSeparator; cr; cr.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   114
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   115
    SmalltalkChunkFileSourceWriter new fileOutMethod:aMethod on:aStream.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   116
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
    aStream space.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   118
    aStream nextPutChunkSeparator.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   119
            aStream cr.    
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
        s cr.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
    ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
    scmManagerOrNil := AbstractSourceCodeManager managerForPackage: package.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
    scmManagerOrNil notNil ifTrue:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
        defClass := ProjectDefinition definitionClassForPackage:package.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
        defClass notNil ifTrue:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
            "/ make sure, an extensionVersion_XXX method is included...
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
            "/ (notice: no need to support a secondary backward compatible non-manager related version method here)
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
            (methodsSortedByName contains:[:aMethod | aMethod selector == scmManagerOrNil nameOfVersionMethodForExtensions]) ifFalse:[
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
                s nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name).
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
                s cr.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
                s nextChunkPut:
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
                    (scmManagerOrNil versionMethodTemplateForSmalltalkFor:(scmManagerOrNil nameOfVersionMethodForExtensions)).
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
                s space; nextPutChunkSeparator; cr.
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
            ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
        ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
    ].
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
274
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   139
    "Modified: / 09-03-2015 / 15:55:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
!
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
validate
274
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   143
    | extensions file |
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
274
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   145
    extensions := ProjectDefinition searchForExtensionsWithProject: package.     
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
    file := (Smalltalk getPackageDirectoryForPackage: package) / 'extensions.st'.                       
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
274
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   148
    extensions isEmptyOrNil ifTrue:[
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   149
        self assert: file exists not.
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   150
    ] ifFalse:[
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   151
        self validateAgainstReference: file.
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   152
    ]
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   153
b13db8438e4a Fix in validation of extensions source info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 264
diff changeset
   154
    "Modified: / 09-03-2015 / 15:58:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
204
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
! !
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
!ReportExtensionsSourceInfo class methodsFor:'documentation'!
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
version
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
    ^ '$Header$'
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   161
!
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   162
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
version_CVS
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
    ^ '$Header$'
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
! !
5450b318385a initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166