Tools__HierarchicalChangeList.st
author Claus Gittinger <cg@exept.de>
Mon, 08 Aug 2011 18:23:04 +0200
changeset 10547 1003e0421fcf
parent 10447 c824b3df5121
child 10940 9e5da39fd96e
permissions -rw-r--r--
category of: #menuItemFolder:

"
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
              All Rights Reserved

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the 'Software'), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"
"{ Package: 'stx:libtool' }"

"{ NameSpace: Tools }"

ChangeList subclass:#HierarchicalChangeList
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-Browsers-ChangeSet'
!

!HierarchicalChangeList class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
              All Rights Reserved

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the 'Software'), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"
! !

!HierarchicalChangeList class methodsFor:'interface specs'!

windowSpec
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIPainter may not be able to read the specification."

    "
     UIPainter new openOnClass:Tools::HierarchicalChangeList andSelector:#windowSpec
     Tools::HierarchicalChangeList new openInterface:#windowSpec
     Tools::HierarchicalChangeList open
    "

    <resource: #canvas>

    ^ 
     #(FullSpec
        name: windowSpec
        window: 
       (WindowSpec
          label: 'ChangeList'
          name: 'ChangeList'
          min: (Point 10 10)
          bounds: (Rectangle 0 0 300 300)
        )
        component: 
       (SpecCollection
          collection: (
           (HierarchicalListViewSpec
              name: 'List'
              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
              model: selectionHolder
              menu: menuHolder
              hasHorizontalScrollBar: true
              hasVerticalScrollBar: true
              listModel: listHolder
              multipleSelectOk: true
              useIndex: false
              highlightMode: line
              showLines: false
              useDefaultIcons: false
              postBuildCallback: postBuildList:
            )
           )
         
        )
      )
! !

!HierarchicalChangeList class methodsFor:'plugIn spec'!

aspectSelectors
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this. If it is corrupted,
     the UIPainter may not be able to read the specification."

    "Return a description of exported aspects;
     these can be connected to aspects of an embedding application
     (if this app is embedded in a subCanvas)."

    ^ #(
        #acceptEnabledHolder
        #inGeneratorHolder
        #menuHolder
        #outGeneratorHolder
        #selectionHolder
        #showRemovedHolder
      ).

! !

!HierarchicalChangeList methodsFor:'aspects'!

listHolder
    "return/create the 'changeList' value holder (automatically generated)"
    
    listHolder isNil ifTrue:[
        listHolder := (HierarchicalList new)            
                    showRoot:false;
                    application: self;
                    yourself
    ].
    ^ listHolder

    "Created: / 25-07-2009 / 23:34:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!HierarchicalChangeList methodsFor:'private'!

updateList
    |inGenerator changeset root|

    inGenerator := self inGeneratorHolder value.
    changeset := inGenerator ifNil:[ #() ] ifNotNil:[ inGenerator ].
    root := (Tools::ChangeList::ListEntry 
                    change:(CompositeChange name:'Change set' changes:changeset))
                    parent: self listHolder;
                    expand;
                    yourself.
    root children do:[:e|e expand].

    self listHolder root:root
! !

!HierarchicalChangeList class methodsFor:'documentation'!

version_CVS
    ^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalChangeList.st,v 1.3 2011-08-04 18:02:49 vrany Exp $'
!

version_SVN
    ^ '§Id: Tools__HierarchicalChangeList.st 7486 2009-10-26 22:06:24Z vranyj1 §'
! !