HierarchicalVersionDiffBrowser.st
author ps
Mon, 27 Dec 1999 16:36:19 +0100
changeset 2509 0b7d7aedc1cd
parent 2508 53bf7e866c18
child 2515 eacfc080e08f
permissions -rw-r--r--
checkin from browser
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
2509
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
    15
HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem subclass:#RevisionItem
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
    16
	instanceVariableNames:'revision'
2500
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
2508
53bf7e866c18 checkin from browser
ps
parents: 2500
diff changeset
    22
HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem subclass:#ClassItemRoot
53bf7e866c18 checkin from browser
ps
parents: 2500
diff changeset
    23
	instanceVariableNames:''
2500
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
2509
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
    29
HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem subclass:#ClassItem
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
    30
	instanceVariableNames:'myClass'
2500
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)
2508
53bf7e866c18 checkin from browser
ps
parents: 2500
diff changeset
   115
          #bounds: #(#Rectangle 16 46 881 575)
2500
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'
2508
53bf7e866c18 checkin from browser
ps
parents: 2500
diff changeset
   133
              #layout: #(#LayoutFrame 0 0.0 25 0.0 0 1.0 0 1.0)
53bf7e866c18 checkin from browser
ps
parents: 2500
diff changeset
   134
              #level: 2
2500
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:
2509
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   148
                    #selectConditionSelector: #isHierarchicalItemSelectable:
2500
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   149
                    #indicatorSelector: #doubleClick:
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   150
                  )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   151
                 #(#UISubSpecification
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   152
                    #name: 'SubSpecification1'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   153
                    #majorKey: #HierarchicalVersionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   154
                    #minorKey: #contentsSpecVersionDiffBrowser
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
              )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   159
              #handles: #(#Any 0.289017 1.0)
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
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   167
!HierarchicalVersionDiffBrowser class methodsFor:'menu specs'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   168
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   169
resourceItemMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   170
    "This resource specification was automatically generated
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   171
     by the MenuEditor of ST/X."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   172
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   173
    "Do not manually edit this!! If it is corrupted,
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   174
     the MenuEditor may not be able to read the specification."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   175
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   176
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   177
     MenuEditor new openOnClass:HierarchicalVersionDiffBrowser andSelector:#resourceItemMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   178
     (Menu new fromLiteralArrayEncoding:(HierarchicalVersionDiffBrowser resourceItemMenu)) startUp
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   179
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   180
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   181
    <resource: #menu>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   182
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   183
    ^ 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   184
     #(#Menu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   185
        #(
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   186
         #(#MenuItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   187
            #label: 'Compare Changes'
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   188
            #translateLabel: true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   189
            #value: #menuActionCompareChanges
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   190
          )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   191
         )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   192
        nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   193
        nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   194
      )
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   195
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   196
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   197
!HierarchicalVersionDiffBrowser class methodsFor:'startup'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   198
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   199
openOnClasses:aClassColl
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   200
    |theBrowser theClassItemColl|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   201
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   202
    theBrowser := self new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   203
    theBrowser allButOpen.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   204
    theClassItemColl := aClassColl collect:[:eachClass |
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   205
        |theClassItem theClass|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   206
        theClassItem := ClassItem new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   207
        theClass := Smalltalk resolveName:eachClass inClass:self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   208
        theClassItem myClass:theClass.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   209
        theClassItem].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   210
     theBrowser hierarchicalItemList addAll: theClassItemColl.
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
2509
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   254
isHierarchicalItemSelectable: anIndex
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   255
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   256
    |theSelectionIndexColl theSelectionIndexSize theSelectedItem|
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   257
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   258
    "nur eine Revision kann selektiert werden"
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   259
    (theSelectedItem := self hierarchicalListItemForSelectionIndex: anIndex) isRevisionItem
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   260
        ifFalse:[^false].
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   261
    "ist keine selektiert ist alles ok -> mit true zurueck"
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   262
    (theSelectionIndexColl := self hierarchicalListSelectionIndexColl) size == 0
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   263
         ifTrue:[^true].
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   264
    "wurde deselektiert"
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   265
    (self window sensor ctrlDown)
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   266
        ifTrue: [
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   267
                "ist eine Rev selektiert und die Klassen sind nicht gleich, dann falsch"
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   268
                (self hierarchicalListItemForSelectionIndex:theSelectionIndexColl first) parent myClass == theSelectedItem parent myClass
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   269
                     ifFalse:[^false].
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   270
                theSelectionIndexColl size ~~ 2
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   271
                     ifTrue:[^true].
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   272
                (theSelectionIndexColl includes:anIndex)
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   273
                        ifTrue: [^true]
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   274
                        ifFalse:[self hierarchicalListSelectionIndexColl:(Array with:theSelectionIndexColl first).
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   275
                                ^true]]
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   276
        ifFalse:[
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   277
                (theSelectionIndexColl size == 2)
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   278
                    ifTrue:[self hierarchicalListSelectionIndexColl:(Array with:anIndex)].
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   279
                ^true]
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   280
!
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   281
2500
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   282
menuActionCompareChanges
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   283
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   284
    |theSelectionIndexColl theFirstRevisionItem theSecondRevisionString theClass theFirstRevisionString|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   285
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   286
    theSelectionIndexColl := self hierarchicalListSelectionIndexColl.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   287
    theFirstRevisionItem := (self hierarchicalListItemForSelectionIndex:theSelectionIndexColl first).
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   288
    theClass := theFirstRevisionItem parent myClass.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   289
    theFirstRevisionString := theFirstRevisionItem revision.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   290
    theSecondRevisionString := (self hierarchicalListItemForSelectionIndex:theSelectionIndexColl last) revision.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   291
    self updateVersionDiffLabelForClass:theClass andVersionA:theFirstRevisionString andVersionB:theSecondRevisionString.    
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   292
    self withWaitCursorDo:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   293
        self versionDiffBrowser setupForClass:theClass versionA:theFirstRevisionString versionB:theSecondRevisionString.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   294
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   295
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   296
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   297
selectHierarchicalItemMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   298
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   299
<return: Block>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   300
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   301
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   302
    ^[|menu|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   303
      self checkIfTwoResourceItemsSelected
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   304
        ifFalse:[menu := nil] 
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   305
        ifTrue: [menu := Menu new fromLiteralArrayEncoding:(self class resourceItemMenu).
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   306
                menu receiver:self].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   307
      menu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   308
    ]
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   309
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   310
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   311
versionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   312
    versionDiffBrowser isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   313
        versionDiffBrowser := VersionDiffBrowser new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   314
        versionDiffBrowser masterApplication:self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   315
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   316
    ^ versionDiffBrowser
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   317
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   318
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   319
!HierarchicalVersionDiffBrowser methodsFor:'aspects'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   320
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   321
hierarchicalItemList
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   322
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   323
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   324
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   325
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   326
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   327
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   328
    ^ self hierarchicalItemListModel root
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   329
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   330
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   331
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   332
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   333
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   334
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   335
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   336
hierarchicalItemListModel
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   337
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   338
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   339
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   340
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   341
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   342
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   343
    |holder|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   344
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   345
    (holder := builder bindingAt:#hierarchicalItemListModel) isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   346
        holder := HierarchicalList new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   347
        holder root:(ClassItemRoot new).
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   348
        holder showRoot:false.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   349
        builder aspectAt:#hierarchicalItemListModel put:holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   350
        holder application:self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   351
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   352
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   353
    ^ holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   354
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   355
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   356
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   357
hierarchicalItemSelectionAspect
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   358
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   359
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   360
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   361
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   362
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   363
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   364
    |holder|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   365
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   366
    (holder := builder bindingAt:#hierarchicalItemSelectionAspect) isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   367
        holder := ValueHolder new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   368
        builder aspectAt:#hierarchicalItemSelectionAspect put:holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   369
        holder addDependent: self.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   370
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   371
    ^ holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   372
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   373
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   374
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   375
versionDiffModel
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   376
    "automatically generated by UIPainter ..."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   377
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   378
    "*** the code below creates a default model when invoked."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   379
    "*** (which may not be the one you wanted)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   380
    "*** Please change as required and accept it in the browser."
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   381
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   382
    |holder|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   383
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   384
    (holder := builder bindingAt:#versionDiffModel) isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   385
        holder := String new asValue.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   386
        builder aspectAt:#versionDiffModel put:holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   387
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   388
    ^ holder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   389
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   390
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   391
!HierarchicalVersionDiffBrowser methodsFor:'interface opening'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   392
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   393
postOpenWith: aBuilder
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   394
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   395
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   396
    super postOpenWith: aBuilder.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   397
    self hierarchicalItemList expand.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   398
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   399
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   400
!HierarchicalVersionDiffBrowser methodsFor:'testing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   401
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   402
checkIfTwoResourceItemsSelected
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   403
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   404
    |theSelectionIndexColl|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   405
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   406
    ((theSelectionIndexColl := self hierarchicalListSelectionIndexColl) isNil or:
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   407
        [theSelectionIndexColl size ~~ 2])
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   408
            ifTrue:[^false].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   409
    ^((self hierarchicalListItemForSelectionIndex:theSelectionIndexColl first) isRevisionItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   410
        and:[(self hierarchicalListItemForSelectionIndex:theSelectionIndexColl last) isRevisionItem])
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   411
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   412
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   413
!HierarchicalVersionDiffBrowser methodsFor:'update'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   414
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   415
updateVersionDiffLabelForClass:aClass andVersionA:aVersionA andVersionB:aVersionB    
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   416
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   417
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   418
    |theStream|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   419
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   420
    theStream := WriteStream on:#String.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   421
    theStream nextPutAll:'Compare '.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   422
    theStream nextPutAll: aClass name.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   423
    theStream nextPutAll:' revision '''.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   424
    theStream nextPutAll: aVersionA.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   425
    theStream nextPutAll: ''' with revision '''.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   426
    theStream nextPutAll: aVersionB.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   427
    theStream nextPutAll: '''.'.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   428
    self versionDiffModel value:theStream contents
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   429
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   430
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   431
!HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem methodsFor:'protocol'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   432
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   433
children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   434
    "returns list of children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   435
     *** to optimize:redefine by subClass
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   436
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   437
    children isNil ifTrue:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   438
        children := #()
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   439
    ].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   440
    ^ children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   441
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   442
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   443
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   444
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   445
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   446
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   447
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   448
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   449
icon
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   450
   ^ nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   451
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   452
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   453
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   454
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   455
label
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   456
    ^ nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   457
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   458
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   459
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   460
middleButtonMenu
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   461
    "returns the middleButtonMenu or nil if no menu is defined
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   462
    "
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   463
    ^ nil
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   464
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   465
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   466
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   467
!HierarchicalVersionDiffBrowser::AbstractVersionDiffBrowserItem methodsFor:'testing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   468
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   469
isClassItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   470
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   471
    ^false
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   472
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   473
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   474
isRevisionItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   475
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   476
    ^false
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   477
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   478
2509
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   479
!HierarchicalVersionDiffBrowser::RevisionItem methodsFor:'accessing'!
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   480
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   481
revision
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   482
    "return the value of the instance variable 'revision' (automatically generated)"
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   483
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   484
    ^ revision!
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   485
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   486
revision:something
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   487
    "set the value of the instance variable 'revision' (automatically generated)"
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   488
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   489
    revision := something.! !
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   490
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   491
!HierarchicalVersionDiffBrowser::RevisionItem methodsFor:'protocol'!
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   492
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   493
label
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   494
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   495
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   496
    ^revision
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   497
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   498
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   499
! !
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   500
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   501
!HierarchicalVersionDiffBrowser::RevisionItem methodsFor:'testing'!
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   502
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   503
isRevisionItem
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   504
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   505
    ^true
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   506
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   507
! !
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   508
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   509
!HierarchicalVersionDiffBrowser::ClassItemRoot methodsFor:'initialization'!
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   510
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   511
initialize
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   512
    super initialize.
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   513
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   514
    children   := OrderedCollection new.
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   515
    isExpanded := true.
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   516
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   517
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   518
! !
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   519
2500
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   520
!HierarchicalVersionDiffBrowser::ClassItem methodsFor:'accessing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   521
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   522
myClass
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   523
    "return the value of the instance variable 'myClass' (automatically generated)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   524
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   525
    ^ myClass!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   526
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   527
myClass:something
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   528
    "set the value of the instance variable 'myClass' (automatically generated)"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   529
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   530
    myClass := something.! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   531
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   532
!HierarchicalVersionDiffBrowser::ClassItem methodsFor:'protocol'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   533
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   534
children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   535
"returns list of children. The revision for the class myClass
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   536
are computed via the sourcecode manager. Only when the childrens
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   537
are needed, they are calculated.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   538
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   539
<return: List>
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   540
"
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   541
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   542
    children ifNil:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   543
        self application withWaitCursorDo:[
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   544
            |theRevisionItemColl|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   545
            theRevisionItemColl := (myClass sourceCodeManager revisionsOf:myClass) collect:[:eachRevision|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   546
                |theRevisionItem|
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   547
                theRevisionItem := HierarchicalVersionDiffBrowser::RevisionItem new.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   548
                theRevisionItem revision:eachRevision.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   549
                theRevisionItem].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   550
             children:=theRevisionItemColl.
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   551
             children do:[:aChild| aChild parent:self]]].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   552
    ^children
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   553
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   554
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   555
hasChildren
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   556
    children ifNil:[^ true].
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   557
  ^ children size ~~ 0
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   558
!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   559
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   560
label
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   561
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   562
   ^myClass name
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   563
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   564
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   565
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   566
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   567
!HierarchicalVersionDiffBrowser::ClassItem methodsFor:'testing'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   568
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   569
isClassItem
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   570
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   571
    ^true
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   572
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   573
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   574
! !
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   575
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   576
!HierarchicalVersionDiffBrowser class methodsFor:'documentation'!
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   577
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   578
version
2509
0b7d7aedc1cd checkin from browser
ps
parents: 2508
diff changeset
   579
    ^ '$Header: /cvs/stx/stx/libtool/HierarchicalVersionDiffBrowser.st,v 1.3 1999-12-27 15:36:19 ps Exp $'
2500
e4a8d9c98640 initial checkin
ps
parents:
diff changeset
   580
! !