HierarchicalVersionDiffBrowser.st
author ps
Thu, 23 Dec 1999 16:31:19 +0100
changeset 2500 e4a8d9c98640
child 2508 53bf7e866c18
permissions -rw-r--r--
initial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2500
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     1
ApplicationModel subclass:#HierarchicalVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     2
	instanceVariableNames:'versionDiffBrowser'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     3
	classVariableNames:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     4
	poolDictionaries:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     5
	category:'Interface-Browsers'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     6
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     7
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     8
HierarchicalItem subclass:#AbstractVersionDiffBrowserItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
     9
	instanceVariableNames:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    10
	classVariableNames:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    11
	poolDictionaries:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    12
	privateIn:HierarchicalVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    13
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    14
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    15
HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem subclass:#ClassItemRoot
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    16
	instanceVariableNames:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    17
	classVariableNames:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    18
	poolDictionaries:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    19
	privateIn:HierarchicalVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    20
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    21
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    22
HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem subclass:#ClassItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    23
	instanceVariableNames:'myClass'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    24
	classVariableNames:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    25
	poolDictionaries:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    26
	privateIn:HierarchicalVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    27
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    28
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    29
HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem subclass:#RevisionItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    30
	instanceVariableNames:'revision'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    31
	classVariableNames:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    32
	poolDictionaries:''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    33
	privateIn:HierarchicalVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    34
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    35
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    36
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    37
!HierarchicalVersionDiffBrowser class methodsFor:'interface specs'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    38
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    39
contentsSpecVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    40
    "This resource specification was automatically generated
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    41
     by the UIPainter of ST/X."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    42
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    43
    "Do not manually edit this!! If it is corrupted,
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    44
     the UIPainter may not be able to read the specification."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    45
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    46
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    47
     UIPainter new openOnClass:HierarchicalVersionDiffBrowser andSelector:#contentsSpecVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    48
     HierarchicalVersionDiffBrowser new openInterface:#contentsSpecVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    49
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    50
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    51
    <resource: #canvas>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    52
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    53
    ^ 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    54
     #(#FullSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    55
        #name: #contentsSpecVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    56
        #window: 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    57
       #(#WindowSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    58
          #label: 'Hierarchical Version DiffBrowser'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    59
          #name: 'Hierarchical Version DiffBrowser'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    60
          #min: #(#Point 10 10)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    61
          #max: #(#Point 9999 9999)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    62
          #bounds: #(#Rectangle 12 22 877 551)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    63
        )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    64
        #component: 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    65
       #(#SpecCollection
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    66
          #collection: #(
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    67
           #(#SubCanvasSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    68
              #name: 'VersionDiffBrowser'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    69
              #layout: #(#LayoutFrame 0 0.0 30 0.0 0 1.0 0 1.0)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    70
              #hasHorizontalScrollBar: false
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    71
              #hasVerticalScrollBar: false
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    72
              #majorKey: #VersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    73
              #minorKey: #windowSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    74
              #clientKey: #versionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    75
            )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    76
           #(#LabelSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    77
              #name: 'Label1'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    78
              #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    79
              #visibilityChannel: #''
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    80
              #translateLabel: true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    81
              #labelChannel: #versionDiffModel
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    82
              #resizeForLabel: false
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    83
              #adjust: #left
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    84
            )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    85
           )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    86
         
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    87
        )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    88
      )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    89
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    90
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    91
windowSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    92
    "This resource specification was automatically generated
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    93
     by the UIPainter of ST/X."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    94
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    95
    "Do not manually edit this!! If it is corrupted,
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    96
     the UIPainter may not be able to read the specification."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    97
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    98
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
    99
     UIPainter new openOnClass:HierarchicalVersionDiffBrowser andSelector:#windowSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   100
     HierarchicalVersionDiffBrowser new openInterface:#windowSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   101
     HierarchicalVersionDiffBrowser open
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   102
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   103
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   104
    <resource: #canvas>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   105
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   106
    ^ 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   107
     #(#FullSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   108
        #name: #windowSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   109
        #window: 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   110
       #(#WindowSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   111
          #label: 'Hierarchical Version DiffBrowser'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   112
          #name: 'Hierarchical Version DiffBrowser'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   113
          #min: #(#Point 10 10)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   114
          #max: #(#Point 9999 9999)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   115
          #bounds: #(#Rectangle 12 22 877 551)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   116
        )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   117
        #component: 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   118
       #(#SpecCollection
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   119
          #collection: #(
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   120
           #(#MenuPanelSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   121
              #name: 'menuPanel'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   122
              #layout: #(#LayoutFrame 0 0 0 0 0 1.0 24 0)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   123
              #level: 1
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   124
              #tabable: true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   125
              #style: 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   126
             #(#Font
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   127
                'helvetica' 'bold'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   128
                'oblique' 10
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   129
              )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   130
            )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   131
           #(#VariableHorizontalPanelSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   132
              #name: 'VariableHorizontalPanel1'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   133
              #layout: #(#LayoutFrame 0 0.0 21 0.0 0 1.0 0 1.0)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   134
              #level: 0
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   135
              #component: 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   136
             #(#SpecCollection
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   137
                #collection: #(
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   138
                 #(#HierarchicalListViewSpec
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   139
                    #name: 'HierarchicalItemListView'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   140
                    #model: #hierarchicalItemSelectionAspect
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   141
                    #menu: #selectHierarchicalItemMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   142
                    #hasHorizontalScrollBar: true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   143
                    #hasVerticalScrollBar: true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   144
                    #listModel: #hierarchicalItemListModel
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   145
                    #multipleSelectOk: true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   146
                    #highlightMode: #label
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   147
                    #doubleClickSelector: #doubleClick:
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   148
                    #indicatorSelector: #doubleClick:
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   149
                  )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   150
                 #(#UISubSpecification
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   151
                    #name: 'SubSpecification1'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   152
                    #majorKey: #HierarchicalVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   153
                    #minorKey: #contentsSpecVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   154
                  )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   155
                 )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   156
               
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   157
              )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   158
              #handles: #(#Any 0.289017 1.0)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   159
            )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   160
           )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   161
         
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   162
        )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   163
      )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   164
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   165
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   166
!HierarchicalVersionDiffBrowser class methodsFor:'menu specs'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   167
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   168
resourceItemMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   169
    "This resource specification was automatically generated
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   170
     by the MenuEditor of ST/X."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   171
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   172
    "Do not manually edit this!! If it is corrupted,
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   173
     the MenuEditor may not be able to read the specification."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   174
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   175
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   176
     MenuEditor new openOnClass:HierarchicalVersionDiffBrowser andSelector:#resourceItemMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   177
     (Menu new fromLiteralArrayEncoding:(HierarchicalVersionDiffBrowser resourceItemMenu)) startUp
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   178
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   179
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   180
    <resource: #menu>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   181
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   182
    ^ 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   183
     #(#Menu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   184
        #(
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   185
         #(#MenuItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   186
            #label: 'Compare Changes'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   187
            #translateLabel: true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   188
            #value: #menuActionCompareChanges
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   189
          )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   190
         )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   191
        nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   192
        nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   193
      )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   194
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   195
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   196
!HierarchicalVersionDiffBrowser class methodsFor:'startup'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   197
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   198
openOnClasses:aClassColl
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   199
    |theBrowser theClassItemColl|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   200
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   201
    theBrowser := self new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   202
    theBrowser allButOpen.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   203
    theClassItemColl := aClassColl collect:[:eachClass |
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   204
        |theClassItem theClass|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   205
        theClassItem := ClassItem new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   206
        theClass := Smalltalk resolveName:eachClass inClass:self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   207
        theClassItem myClass:theClass.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   208
        theClassItem].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   209
     theBrowser hierarchicalItemList addAll: theClassItemColl.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   210
     theBrowser hierarchicalListSelectionIndexColl:(Array with:1).
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   211
     theBrowser openWindow.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   212
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   213
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   214
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   215
HierarchicalVersionDiffBrowser openOnClasses:#(VersionDiffBrowser FileBrowser Array)
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   216
HierarchicalVersionDiffBrowser openOnClasses:(Smalltalk allClasses asOrderedCollection sort:[:x : y|x name < y name])
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   217
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   218
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   219
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   220
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   221
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   222
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   223
!HierarchicalVersionDiffBrowser methodsFor:'accessing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   224
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   225
hierarchicalListItemForSelectionIndex: anIndex
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   226
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   227
    ^self hierarchicalItemListModel at:anIndex ifAbsent:nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   228
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   229
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   230
hierarchicalListSelectionIndexColl
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   231
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   232
    ^self hierarchicalItemSelectionAspect value
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   233
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   234
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   235
hierarchicalListSelectionIndexColl:anArray
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   236
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   237
    ^self hierarchicalItemSelectionAspect value:anArray
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   238
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   239
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   240
!HierarchicalVersionDiffBrowser methodsFor:'actions'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   241
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   242
doubleClick: anIndex
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   243
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   244
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   245
    "*** the code below performs no action"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   246
    "*** (except for some feedback on the Transcript)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   247
    "*** Please change as required and accept in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   248
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   249
    "action to be added ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   250
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   251
    (self hierarchicalItemListModel at: anIndex) toggleExpand  
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   252
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   253
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   254
menuActionCompareChanges
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   255
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   256
    |theSelectionIndexColl theFirstRevisionItem theSecondRevisionString theClass theFirstRevisionString|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   257
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   258
    theSelectionIndexColl := self hierarchicalListSelectionIndexColl.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   259
    theFirstRevisionItem := (self hierarchicalListItemForSelectionIndex:theSelectionIndexColl first).
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   260
    theClass := theFirstRevisionItem parent myClass.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   261
    theFirstRevisionString := theFirstRevisionItem revision.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   262
    theSecondRevisionString := (self hierarchicalListItemForSelectionIndex:theSelectionIndexColl last) revision.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   263
    self updateVersionDiffLabelForClass:theClass andVersionA:theFirstRevisionString andVersionB:theSecondRevisionString.    
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   264
    self withWaitCursorDo:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   265
        self versionDiffBrowser setupForClass:theClass versionA:theFirstRevisionString versionB:theSecondRevisionString.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   266
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   267
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   268
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   269
selectHierarchicalItemMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   270
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   271
<return: Block>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   272
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   273
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   274
    ^[|menu|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   275
      self checkIfTwoResourceItemsSelected
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   276
        ifFalse:[menu := nil] 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   277
        ifTrue: [menu := Menu new fromLiteralArrayEncoding:(self class resourceItemMenu).
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   278
                menu receiver:self].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   279
      menu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   280
    ]
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   281
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   282
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   283
versionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   284
    versionDiffBrowser isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   285
        versionDiffBrowser := VersionDiffBrowser new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   286
"/        versionDiffBrowser hasMenu:false.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   287
        versionDiffBrowser masterApplication:self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   288
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   289
    ^ versionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   290
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   291
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   292
!HierarchicalVersionDiffBrowser methodsFor:'aspects'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   293
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   294
hierarchicalItemList
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   295
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   296
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   297
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   298
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   299
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   300
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   301
    ^ self hierarchicalItemListModel root
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   302
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   303
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   304
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   305
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   306
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   307
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   308
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   309
hierarchicalItemListModel
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   310
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   311
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   312
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   313
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   314
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   315
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   316
    |holder|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   317
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   318
    (holder := builder bindingAt:#hierarchicalItemListModel) isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   319
        holder := HierarchicalList new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   320
        holder root:(ClassItemRoot new).
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   321
        holder showRoot:false.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   322
        builder aspectAt:#hierarchicalItemListModel put:holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   323
        holder application:self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   324
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   325
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   326
    ^ holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   327
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   328
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   329
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   330
hierarchicalItemSelectionAspect
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   331
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   332
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   333
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   334
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   335
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   336
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   337
    |holder|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   338
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   339
    (holder := builder bindingAt:#hierarchicalItemSelectionAspect) isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   340
        holder := ValueHolder new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   341
        builder aspectAt:#hierarchicalItemSelectionAspect put:holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   342
        holder addDependent: self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   343
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   344
    ^ holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   345
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   346
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   347
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   348
versionDiffModel
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   349
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   350
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   351
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   352
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   353
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   354
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   355
    |holder|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   356
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   357
    (holder := builder bindingAt:#versionDiffModel) isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   358
        holder := String new asValue.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   359
        builder aspectAt:#versionDiffModel put:holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   360
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   361
    ^ holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   362
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   363
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   364
!HierarchicalVersionDiffBrowser methodsFor:'interface opening'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   365
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   366
postOpenWith: aBuilder
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   367
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   368
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   369
    super postOpenWith: aBuilder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   370
    self hierarchicalItemList expand.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   371
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   372
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   373
!HierarchicalVersionDiffBrowser methodsFor:'testing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   374
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   375
checkIfTwoResourceItemsSelected
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   376
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   377
    |theSelectionIndexColl|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   378
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   379
    ((theSelectionIndexColl := self hierarchicalListSelectionIndexColl) isNil or:
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   380
        [theSelectionIndexColl size ~~ 2])
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   381
            ifTrue:[^false].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   382
    ^((self hierarchicalListItemForSelectionIndex:theSelectionIndexColl first) isRevisionItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   383
        and:[(self hierarchicalListItemForSelectionIndex:theSelectionIndexColl last) isRevisionItem])
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   384
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   385
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   386
!HierarchicalVersionDiffBrowser methodsFor:'update'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   387
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   388
updateVersionDiffLabelForClass:aClass andVersionA:aVersionA andVersionB:aVersionB    
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   389
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   390
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   391
    |theStream|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   392
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   393
    theStream := WriteStream on:#String.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   394
    theStream nextPutAll:'Compare '.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   395
    theStream nextPutAll: aClass name.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   396
    theStream nextPutAll:' revision '''.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   397
    theStream nextPutAll: aVersionA.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   398
    theStream nextPutAll: ''' with revision '''.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   399
    theStream nextPutAll: aVersionB.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   400
    theStream nextPutAll: '''.'.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   401
    self versionDiffModel value:theStream contents
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   402
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   403
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   404
!HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem methodsFor:'protocol'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   405
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   406
children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   407
    "returns list of children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   408
     *** to optimize:redefine by subClass
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   409
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   410
    children isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   411
        children := #()
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   412
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   413
    ^ children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   414
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   415
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   416
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   417
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   418
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   419
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   420
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   421
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   422
icon
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   423
   ^ nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   424
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   425
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   426
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   427
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   428
label
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   429
    ^ nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   430
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   431
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   432
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   433
middleButtonMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   434
    "returns the middleButtonMenu or nil if no menu is defined
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   435
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   436
    ^ nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   437
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   438
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   439
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   440
!HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem methodsFor:'testing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   441
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   442
isClassItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   443
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   444
    ^false
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   445
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   446
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   447
isRevisionItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   448
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   449
    ^false
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   450
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   451
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   452
!HierarchicalVersionDiffBrowser::ClassItemRoot methodsFor:'initialization'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   453
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   454
initialize
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   455
    super initialize.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   456
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   457
    children   := OrderedCollection new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   458
    isExpanded := true.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   459
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   460
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   461
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   462
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   463
!HierarchicalVersionDiffBrowser::ClassItem methodsFor:'accessing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   464
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   465
myClass
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   466
    "return the value of the instance variable 'myClass' (automatically generated)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   467
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   468
    ^ myClass!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   469
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   470
myClass:something
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   471
    "set the value of the instance variable 'myClass' (automatically generated)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   472
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   473
    myClass := something.! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   474
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   475
!HierarchicalVersionDiffBrowser::ClassItem methodsFor:'protocol'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   476
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   477
children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   478
"returns list of children. The revision for the class myClass
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   479
are computed via the sourcecode manager. Only when the childrens
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   480
are needed, they are calculated.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   481
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   482
<return: List>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   483
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   484
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   485
    children ifNil:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   486
        self application withWaitCursorDo:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   487
            |theRevisionItemColl|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   488
            theRevisionItemColl := (myClass sourceCodeManager revisionsOf:myClass) collect:[:eachRevision|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   489
                |theRevisionItem|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   490
                theRevisionItem := HierarchicalVersionDiffBrowser::RevisionItem new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   491
                theRevisionItem revision:eachRevision.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   492
                theRevisionItem].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   493
             children:=theRevisionItemColl.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   494
             children do:[:aChild| aChild parent:self]]].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   495
    ^children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   496
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   497
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   498
hasChildren
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   499
    children ifNil:[^ true].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   500
  ^ children size ~~ 0
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   501
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   502
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   503
label
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   504
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   505
   ^myClass name
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   506
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   507
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   508
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   509
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   510
!HierarchicalVersionDiffBrowser::ClassItem methodsFor:'testing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   511
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   512
isClassItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   513
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   514
    ^true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   515
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   516
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   517
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   518
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   519
!HierarchicalVersionDiffBrowser::RevisionItem methodsFor:'accessing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   520
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   521
revision
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   522
    "return the value of the instance variable 'revision' (automatically generated)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   523
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   524
    ^ revision!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   525
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   526
revision:something
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   527
    "set the value of the instance variable 'revision' (automatically generated)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   528
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   529
    revision := something.! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   530
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   531
!HierarchicalVersionDiffBrowser::RevisionItem methodsFor:'protocol'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   532
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   533
label
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   534
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   535
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   536
    ^revision
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   537
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   538
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   539
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   540
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   541
!HierarchicalVersionDiffBrowser::RevisionItem methodsFor:'testing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   542
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   543
isRevisionItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   544
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   545
    ^true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   546
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   547
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   548
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   549
!HierarchicalVersionDiffBrowser class methodsFor:'documentation'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   550
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   551
version
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   552
    ^ '$Header: /cvs/stx/stx/libtool/HierarchicalVersionDiffBrowser.st,v 1.1 1999-12-23 15:31:19 ps Exp $'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   553
! !