SourceRevisionItem.st
author Claus Gittinger <cg@exept.de>
Fri, 14 Jan 2000 16:57:27 +0100
changeset 2547 49e7cb306cd5
parent 2538 65d455c152f0
child 2612 ce84f1d3dae9
permissions -rw-r--r--
category change
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2518
38450ed50e11 initial checkin
ps
parents:
diff changeset
     1
AbstractRevisionItem subclass:#SourceRevisionItem
38450ed50e11 initial checkin
ps
parents:
diff changeset
     2
	instanceVariableNames:''
38450ed50e11 initial checkin
ps
parents:
diff changeset
     3
	classVariableNames:''
38450ed50e11 initial checkin
ps
parents:
diff changeset
     4
	poolDictionaries:''
2547
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
     5
	category:'Interface-Browsers-Support'
2518
38450ed50e11 initial checkin
ps
parents:
diff changeset
     6
!
38450ed50e11 initial checkin
ps
parents:
diff changeset
     7
2547
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
     8
!SourceRevisionItem class methodsFor:'documentation'!
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
     9
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    10
documentation
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    11
"
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    12
    documentation to be added.
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    13
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    14
    [author:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    15
        Pierre Schwarz (ps@exept.de)
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    16
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    17
    [see also:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    18
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    19
    [instance variables:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    20
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    21
    [class variables:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    22
"
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    23
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    24
! !
2518
38450ed50e11 initial checkin
ps
parents:
diff changeset
    25
38450ed50e11 initial checkin
ps
parents:
diff changeset
    26
!SourceRevisionItem methodsFor:'accessing'!
38450ed50e11 initial checkin
ps
parents:
diff changeset
    27
38450ed50e11 initial checkin
ps
parents:
diff changeset
    28
sourceStream
38450ed50e11 initial checkin
ps
parents:
diff changeset
    29
"
2538
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    30
<return: ReadStream>
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    31
"                     
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    32
    ^self parent myClass currentSourceStream readStream
2518
38450ed50e11 initial checkin
ps
parents:
diff changeset
    33
! !
38450ed50e11 initial checkin
ps
parents:
diff changeset
    34
38450ed50e11 initial checkin
ps
parents:
diff changeset
    35
!SourceRevisionItem methodsFor:'protocol'!
38450ed50e11 initial checkin
ps
parents:
diff changeset
    36
38450ed50e11 initial checkin
ps
parents:
diff changeset
    37
icon
38450ed50e11 initial checkin
ps
parents:
diff changeset
    38
38450ed50e11 initial checkin
ps
parents:
diff changeset
    39
    ^#loadedRevision
38450ed50e11 initial checkin
ps
parents:
diff changeset
    40
38450ed50e11 initial checkin
ps
parents:
diff changeset
    41
!
38450ed50e11 initial checkin
ps
parents:
diff changeset
    42
38450ed50e11 initial checkin
ps
parents:
diff changeset
    43
revisionString
38450ed50e11 initial checkin
ps
parents:
diff changeset
    44
    "return the value of the instance variable 'revision' (automatically generated)"
38450ed50e11 initial checkin
ps
parents:
diff changeset
    45
38450ed50e11 initial checkin
ps
parents:
diff changeset
    46
    ^ revision isNil
38450ed50e11 initial checkin
ps
parents:
diff changeset
    47
        ifTrue: ['no revision']
2538
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    48
        ifFalse:['current (based on:',(revision at:#revision),')']
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    49
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    50
! !
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    51
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    52
!SourceRevisionItem methodsFor:'testing'!
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    53
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    54
basedOnActualRevision
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    55
"
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    56
returns if the changes of the class are based on the actual revision of the class
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    57
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    58
<return: Boolean>
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    59
"
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    60
     revision ifNil:[^true].
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    61
     ^parent newestRevision = (revision at:#revision)
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    62
!
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    63
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    64
hasSourceStream
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    65
"
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    66
has the receiver a source stream? Used for testing tree items.
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    67
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    68
<return: Boolean>
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    69
"
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    70
    ^true
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    71
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    72
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    73
!
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    74
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    75
isLoadedRevision
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    76
"
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    77
the receiver is always the actual revision of a class, hence isloadedRevision
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    78
must be true.
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    79
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    80
<return: Boolean>
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    81
"
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    82
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    83
    ^true
65d455c152f0 defined source container
ps
parents: 2518
diff changeset
    84
2518
38450ed50e11 initial checkin
ps
parents:
diff changeset
    85
38450ed50e11 initial checkin
ps
parents:
diff changeset
    86
! !
38450ed50e11 initial checkin
ps
parents:
diff changeset
    87
38450ed50e11 initial checkin
ps
parents:
diff changeset
    88
!SourceRevisionItem class methodsFor:'documentation'!
38450ed50e11 initial checkin
ps
parents:
diff changeset
    89
38450ed50e11 initial checkin
ps
parents:
diff changeset
    90
version
2547
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    91
    ^ '$Header: /cvs/stx/stx/libtool/SourceRevisionItem.st,v 1.3 2000-01-14 15:56:48 cg Exp $'
2518
38450ed50e11 initial checkin
ps
parents:
diff changeset
    92
! !