Tools__HierarchicalChangeList.st
author Claus Gittinger <cg@exept.de>
Fri, 08 Jul 2011 08:50:25 +0200
changeset 10274 baa3a285f686
parent 10063 95afc8c9529d
child 10447 c824b3df5121
permissions -rw-r--r--
changed: #isAvailable keep the working stuff active, until the experimental stuff is finished.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10008
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
10063
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
     2
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
     3
              All Rights Reserved
10008
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
10063
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
     5
Permission is hereby granted, free of charge, to any person
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
     6
obtaining a copy of this software and associated documentation
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
     7
files (the 'Software'), to deal in the Software without
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
     8
restriction, including without limitation the rights to use,
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
     9
copy, modify, merge, publish, distribute, sublicense, and/or sell
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    10
copies of the Software, and to permit persons to whom the
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    11
Software is furnished to do so, subject to the following
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    12
conditions:
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    13
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    14
The above copyright notice and this permission notice shall be
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    15
included in all copies or substantial portions of the Software.
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    16
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    17
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    18
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    19
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    20
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    21
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    22
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    23
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    24
OTHER DEALINGS IN THE SOFTWARE.
10008
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"{ Package: 'stx:libtool' }"
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ NameSpace: Tools }"
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
ChangeList subclass:#HierarchicalChangeList
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	instanceVariableNames:''
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	classVariableNames:''
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	poolDictionaries:''
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	category:'Interface-Browsers-ChangeSet'
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!HierarchicalChangeList class methodsFor:'documentation'!
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
copyright
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
10063
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    41
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    42
              All Rights Reserved
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    43
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    44
Permission is hereby granted, free of charge, to any person
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    45
obtaining a copy of this software and associated documentation
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    46
files (the 'Software'), to deal in the Software without
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    47
restriction, including without limitation the rights to use,
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    48
copy, modify, merge, publish, distribute, sublicense, and/or sell
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    49
copies of the Software, and to permit persons to whom the
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    50
Software is furnished to do so, subject to the following
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    51
conditions:
10008
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
10063
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    53
The above copyright notice and this permission notice shall be
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    54
included in all copies or substantial portions of the Software.
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    55
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    56
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    57
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    58
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    59
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    60
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    61
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    62
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
    63
OTHER DEALINGS IN THE SOFTWARE.
10008
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
"
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
! !
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
!HierarchicalChangeList class methodsFor:'interface specs'!
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
windowSpec
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    "This resource specification was automatically generated
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
     by the UIPainter of ST/X."
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    "Do not manually edit this!! If it is corrupted,
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
     the UIPainter may not be able to read the specification."
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    "
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
     UIPainter new openOnClass:Tools::HierarchicalChangeList andSelector:#windowSpec
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
     Tools::HierarchicalChangeList new openInterface:#windowSpec
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
     Tools::HierarchicalChangeList open
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    "
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    <resource: #canvas>
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    ^ 
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
     #(FullSpec
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
        name: windowSpec
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
        window: 
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
       (WindowSpec
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
          label: 'ChangeList'
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
          name: 'ChangeList'
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
          min: (Point 10 10)
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
          bounds: (Rectangle 0 0 300 300)
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
        )
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
        component: 
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
       (SpecCollection
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
          collection: (
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
           (HierarchicalListViewSpec
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
              name: 'ChangeList'
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
              model: selectionHolder
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
              menu: listMenu
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
              hasHorizontalScrollBar: true
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
              hasVerticalScrollBar: true
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
              listModel: listHolder
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
              multipleSelectOk: true
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
              useIndex: false
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
              highlightMode: line
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
              showLines: false
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
              useDefaultIcons: false
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
              postBuildCallback: postBuildList:
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
            )
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
           )
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
         
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
        )
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
      )
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
! !
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
!HierarchicalChangeList methodsFor:'aspects'!
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
listHolder
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
    "return/create the 'changeList' value holder (automatically generated)"
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
    
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
    listHolder isNil ifTrue:[
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
        listHolder := (HierarchicalList new)            
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
                    showRoot:false;
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
                    application: self;
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
                    yourself
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    ].
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    ^ listHolder
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
    "Created: / 25-07-2009 / 23:34:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
! !
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
!HierarchicalChangeList methodsFor:'private'!
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
updateList
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
    |inGenerator changeset root|
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
    inGenerator := self inGeneratorHolder value.
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
    changeset := inGenerator ifNil:[ #() ] ifNotNil:[ inGenerator ].
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
    root := (Tools::ChangeList::ListEntry 
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
                    change:(CompositeChange name:'Change set' changes:changeset))
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
                    parent: self listHolder;
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
                    expand;
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
                    yourself.
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    root children do:[:e|e expand].
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
    self listHolder root:root
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
! !
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
!HierarchicalChangeList class methodsFor:'documentation'!
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
version_CVS
10063
95afc8c9529d copyright
Claus Gittinger <cg@exept.de>
parents: 10008
diff changeset
   154
    ^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalChangeList.st,v 1.2 2011-07-03 17:47:18 cg Exp $'
10008
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
!
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
version_SVN
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
    ^ '§Id: Tools__HierarchicalChangeList.st 7486 2009-10-26 22:06:24Z vranyj1 §'
5c7883f08877 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
! !