VersionRevisionItem.st
author Claus Gittinger <cg@exept.de>
Sun, 01 Feb 2015 14:17:11 +0100
changeset 15150 940d37c7d3ac
parent 2626 4ee750caddab
child 12123 4bde08cebd48
permissions -rw-r--r--
class: Tools::ChangeList fixed the following redraw bug in ModelListView (which is already fixed in SelectionInListView): if a colored item is shown with selection, the color attribute should be removed (or relaxed), to avoid drawing the label invisible. I.e. if the text color is blue or grey, and the selection bg is blue. we should draw white-on-blue, instead of blue/grey on blue. For this to work, the info whether drawing a selection must be passed down through the renderer to the item's draw routine.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2626
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     1
"
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     2
 COPYRIGHT (c) 2000 by eXept Software AG
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     3
              All Rights Reserved
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     4
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     5
 This software is furnished under a license and may be used
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     6
 only in accordance with the terms of that license and with the
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     8
 be provided or otherwise made available to, or used by, any
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
     9
 other person.  No title to or ownership of the software is
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    10
 hereby transferred.
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    11
"
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    12
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    13
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    14
2519
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    15
AbstractRevisionItem subclass:#VersionRevisionItem
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    16
	instanceVariableNames:''
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    17
	classVariableNames:''
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    18
	poolDictionaries:''
2547
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    19
	category:'Interface-Browsers-Support'
2519
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    20
!
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    21
2547
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    22
!VersionRevisionItem class methodsFor:'documentation'!
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    23
2626
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    24
copyright
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    25
"
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    26
 COPYRIGHT (c) 2000 by eXept Software AG
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    27
              All Rights Reserved
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    28
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    29
 This software is furnished under a license and may be used
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    30
 only in accordance with the terms of that license and with the
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    32
 be provided or otherwise made available to, or used by, any
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    33
 other person.  No title to or ownership of the software is
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    34
 hereby transferred.
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    35
"
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    36
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    37
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    38
!
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
    39
2547
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    40
documentation
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    41
"
2625
d70f0361a027 doc; halts removed
Claus Gittinger <cg@exept.de>
parents: 2612
diff changeset
    42
    This is not yet finished (work in progress) - do not use.
2547
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    43
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    44
    [author:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    45
        Pierre Schwarz (ps@exept.de)
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    46
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    47
    [see also:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    48
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    49
    [instance variables:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    50
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    51
    [class variables:]
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    52
"
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    53
49e7cb306cd5 category change
Claus Gittinger <cg@exept.de>
parents: 2538
diff changeset
    54
! !
2519
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    55
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    56
!VersionRevisionItem methodsFor:'accessing'!
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    57
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    58
revisionString
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    59
    "return the value of the instance variable 'revision' (automatically generated)"
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    60
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    61
    ^ revision at:#revision
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    62
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    63
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    64
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    65
!
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    66
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    67
sourceStream
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    68
"
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    69
<return: Stream>
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    70
"
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    71
    |theClass|
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    72
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    73
    theClass := self parent myClass.
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    74
    ^theClass sourceCodeManager getSourceStreamFor:theClass revision:self revisionString
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    75
! !
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    76
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    77
!VersionRevisionItem methodsFor:'protocol'!
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    78
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    79
icon
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    80
2538
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    81
    ^self isLoadedRevision
2519
111deb6a1d2a initial checkin
ps
parents:
diff changeset
    82
        ifTrue: [#loadedRevision]
2538
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    83
        ifFalse:[#unloadedRevision].
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    84
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    85
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    86
! !
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    87
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    88
!VersionRevisionItem methodsFor:'testing'!
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    89
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    90
hasSourceStream
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    91
"
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    92
has the receiver a source stream? Used for testing tree items.
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    93
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    94
<return: Boolean>
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    95
"
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    96
    ^true
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    97
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    98
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
    99
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   100
!
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   101
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   102
isLoadedRevision
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   103
"
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   104
the receiver represents the actual revision of a class, when the revision string fits
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   105
and the class is not changed. In that case a current version of the class exisits.
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   106
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   107
<return: Boolean>
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   108
"
65d455c152f0 defined source container
ps
parents: 2519
diff changeset
   109
    ^((self parent myClass revision = self revisionString) and:[self parent isMyClassChanged not])
2519
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   110
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   111
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   112
! !
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   113
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   114
!VersionRevisionItem class methodsFor:'documentation'!
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   115
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   116
version
2626
Claus Gittinger <cg@exept.de>
parents: 2625
diff changeset
   117
    ^ '$Header: /cvs/stx/stx/libtool/VersionRevisionItem.st,v 1.6 2000-02-18 14:08:03 cg Exp $'
2519
111deb6a1d2a initial checkin
ps
parents:
diff changeset
   118
! !