TraitClassTraitDefinitionChange.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 04 Feb 2014 21:01:56 +0100
branchjv
changeset 3435 d15ba356cc58
parent 3178 422736174443
child 3838 474d8ec95b33
permissions -rw-r--r--
ChangeSet read/write refactored. Fixed writing & reading changefile. Now class definitions are always written using namespace pragma. Sole method definitions still use namespace prefix as stc and old tools can't deal with namespace pragmas for methods. Support for overriding a class's namespace using `Class nameSpaceQuerySignal` has been dropped as it made things lot more complicated and the only user was Tools::ChangeSetBrowser2.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3435
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     1
"
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     2
 COPYRIGHT (c) 2006 by eXept Software AG
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     3
              All Rights Reserved
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     4
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     5
 This software is furnished under a license and may be used
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     6
 only in accordance with the terms of that license and with the
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     8
 be provided or otherwise made available to, or used by, any
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
     9
 other person.  No title to or ownership of the software is
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    10
 hereby transferred.
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    11
"
3178
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic3' }"
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
ClassChange subclass:#TraitClassTraitDefinitionChange
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:'baseTrait traitComposition'
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'System-Changes'
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!TraitClassTraitDefinitionChange class methodsFor:'documentation'!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
3435
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    23
copyright
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    24
"
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    25
 COPYRIGHT (c) 2006 by eXept Software AG
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    26
              All Rights Reserved
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    27
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    28
 This software is furnished under a license and may be used
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    29
 only in accordance with the terms of that license and with the
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    31
 be provided or otherwise made available to, or used by, any
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    32
 other person.  No title to or ownership of the software is
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    33
 hereby transferred.
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    34
"
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    35
!
d15ba356cc58 ChangeSet read/write refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3178
diff changeset
    36
3178
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
documentation
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
    instances represent trait changes.
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    These are not present or supported (currently) in st/x, but may be encountered
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    when reading a monticello package containing traits.
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    Mostly experimental.
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
"
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
! !
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
!TraitClassTraitDefinitionChange methodsFor:'accessing'!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
baseTrait
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    ^ baseTrait
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
baseTrait:something
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    baseTrait := something.
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
source
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    ^ String streamContents:[:s |
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
        s 
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
            nextPutAll: baseTrait;
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
            nextPutAll: ' classTrait '; cr;
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
            nextPutAll: '    uses: '. 
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
        traitComposition isEmptyOrNil ifTrue:[
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
            s nextPutAll: '{}'. 
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
        ] ifFalse:[
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
            s nextPutAll: traitComposition. 
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
        ].
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    ]
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
traitComposition
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    ^ traitComposition
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
traitComposition:something
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    traitComposition := something.
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
! !
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
!TraitClassTraitDefinitionChange methodsFor:'printing & storing'!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
printOn:aStream
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
    aStream nextPutAll:baseTrait; nextPutAll:' {class trait definition}'
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
! !
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
!TraitClassTraitDefinitionChange class methodsFor:'documentation'!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
version
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
    ^ '$Header: /cvs/stx/stx/libbasic3/TraitClassTraitDefinitionChange.st,v 1.1 2013-04-02 19:18:58 cg Exp $'
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
!
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
version_CVS
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    ^ '$Header: /cvs/stx/stx/libbasic3/TraitClassTraitDefinitionChange.st,v 1.1 2013-04-02 19:18:58 cg Exp $'
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
! !
422736174443 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93