ProjectBrowser.st
author Claus Gittinger <cg@exept.de>
Thu, 25 Mar 1999 13:26:55 +0100
changeset 1089 9a44f4c861a2
parent 1088 60edf3482db2
child 1090 4b7c3e6fc5f1
permissions -rw-r--r--
checkin from browser

ToolApplicationModel subclass:#ProjectBrowser
	instanceVariableNames:'projectTree modifiedChannel'
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-Smalltalk'
!

TreeItemWithImage subclass:#ProjectTreeItem
	instanceVariableNames:'action spec'
	classVariableNames:''
	poolDictionaries:''
	privateIn:ProjectBrowser
!

ProjectBrowser::ProjectTreeItem subclass:#ProjectNode
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	privateIn:ProjectBrowser
!


!ProjectBrowser class methodsFor:'image specs'!

classesIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self classesIcon inspect
     ImageEditor openOnClass:self andSelector:#classesIcon
    "

    <resource: #image>

    ^Icon
        constantNamed:#'ProjectBrowser classesIcon'
        ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@ADA@AD"H"DPDPD@@@@@@@@@@P@QDQDQDA@A@AH"H"HPD@@@DQDQDQ@PD@@@@@@@@A@P@ADQDQDPDA@@DRH"HQ@PD@@QDQDQDA@P@ADQDQDPDA@@@@@@@@@PD@DPDQDQDQ@P@Q@@@@@@@A@ADQ@QDQDQD@DQD@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 132 130 132]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O?8??#??/?>??;??/?>??;??/?>O?8?? ?>C?8b') ; yourself); yourself]!

commentIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self commentIcon inspect
     ImageEditor openOnClass:self andSelector:#commentIcon
    "

    <resource: #image>

    ^Icon
        constantNamed:#'ProjectBrowser commentIcon'
        ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDAA@PD@PDA@PDA@PDA@PDA@PPDA@DA@PDA@PDA@PDA@PDDA@PA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PPDA@DA@PDA@PDA@PDA@P@DA@P@@PDA@PDA@PDA@PD@A@PD@@DA@PDA@PDA@PDA@@PDA@@A@PDA@PDA@PDA@P@DA@P@@PDA@PDA@PDA@PD@A@PD@@DA@PDA@PDA@PDA@@PDA@@A@PDA@PDA@PDA@PD@@@@A@PDA@PDA@PDA@PDA@PD@@PDA@PDA@P@a') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@8@C @N@@@@C @N@@8@C @N@@8@C @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!

deploymentIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self deploymentIcon inspect
     ImageEditor openOnClass:self andSelector:#deploymentIcon
    "

    <resource: #image>

    ^Icon
        constantNamed:#'ProjectBrowser deploymentIcon'
        ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@CL0@3L0@@@CL3@3@3@@@CL@LC@CL@@@L0@0LCL0@@@CMCP3MD@@@@L3L3L3M@@@ADP3QD@4@@@@@3@@ACP@@DQCMDPDM@@@QDL4Q@P4@@ADP3QDACP@@DQCMDPDM@@@QDL4Q@P0@@ADP3QDAC@@@DQCMDP@@@@@@@L0@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 132 132 0 0 132 0 132 255 255 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A30O[A%LF?<O?0??G?<??3??O?<??3??O?8??C?8O?@b') ; yourself); yourself]!

filesIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self filesIcon inspect
     ImageEditor openOnClass:self andSelector:#filesIcon
    "

    <resource: #image>

    ^Icon
        constantNamed:#'ProjectBrowser filesIcon'
        ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@DQDQ@P@@@@@P@@@@@@@@@A@QDQDA@@@@DA@@@@@@@@@PDADQDPD@@A@PDQDQ@Q@@DA@QDQD@@@@PDADQDQDQ@A@PDQDQDQD@@A@QDQDQDP@@DADQDQDQ@@@@DQDQDQD@@@@QDQDQDP@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O?@?>C?<O?8??3??/??????????O?<??0??C?<b') ; yourself); yourself]!

methodsIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self multipleUnlockedMagentaIcon inspect
     ImageEditor openOnClass:self andSelector:#multipleUnlockedMagentaIcon
    "

    <resource: #image>

    ^Icon
        constantNamed:#'ProjectBrowser methodsIcon'
        ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@DH@@@@@@@@4QA@@@@@@@TQDPP@@@@@@MDQDH@@@@@@PQDQA@@@@@@LTQA@@@@@@M@I@L@@@@@EDPQD@@@@@@CQDIB@@@@@@DDQDPP@@@@@CEDPP@@@@@@@BPC@@@@@@@@DQ@@@@@@@@@B@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 132 132 0 0 132 0 132 255 0 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'B@@\@C8@_0A? C?@G<@? G<@_8@?0A?@C8@G@@H@@@@b') ; yourself); yourself]


!

prerequisitesIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self prerequisitesIcon inspect
     ImageEditor openOnClass:self andSelector:#prerequisitesIcon
    "

    <resource: #image>

    ^Icon
        constantNamed:#'ProjectBrowser prerequisitesIcon'
        ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A8@D(@RPA80@C@^@=HRT/)^D$@C7#@RLAI@G(@@@@b') ; yourself); yourself]

    "Modified: / 23.3.1999 / 14:28:11 / cg"
! !

!ProjectBrowser class methodsFor:'interface specs'!

emptyRightCanvasSpec
    "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:ProjectBrowser andSelector:#emptyRightCanvasSpec
     ProjectBrowser new openInterface:#emptyRightCanvasSpec
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #window: 
           #(#WindowSpec
              #name: 'NewApplication'
              #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
              #label: 'NewApplication'
              #min: #(#Point 10 10)
              #max: #(#Point 1280 1024)
              #bounds: #(#Rectangle 216 173 516 473)
              #usePreferredExtent: false
          )
          #component: 
           #(#SpecCollection
              #collection: 
               #(
                 #(#TextEditorSpec
                    #name: 'TextEditor1'
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
                    #model: #rightCanvasTextHolder
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #miniScrollerHorizontal: true
                    #isReadOnly: true
                )
              )
          )
      )
!

rightCanvasSpecForClassList
    "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:ProjectBrowser andSelector:#rightCanvasSpecForClassList
     ProjectBrowser new openInterface:#rightCanvasSpecForClassList
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #window: 
           #(#WindowSpec
              #name: 'NewApplication'
              #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
              #level: 0
              #label: 'NewApplication'
              #min: #(#Point 10 10)
              #max: #(#Point 1280 1024)
              #bounds: #(#Rectangle 216 173 516 473)
              #usePreferredExtent: false
          )
          #component: 
           #(#SpecCollection
              #collection: 
               #(
                 #(#DataSetSpec
                    #name: 'classTable'
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #dataList: #classList
                    #has3Dsepartors: false
                    #columnHolder: #classTableColumns
                    #columnAdaptor: #classTableAdaptor
                )
              )
          )
      )
!

rightCanvasSpecForDeployment
    "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:ProjectBrowser andSelector:#rightCanvasSpecForDeployment
     ProjectBrowser new openInterface:#rightCanvasSpecForDeployment
    "

    <resource: #canvas>

    ^ 
     #(#FullSpec
        #name: #rightCanvasSpecForDeployment
        #window: 
       #(#WindowSpec
          #label: 'NewApplication'
          #name: 'NewApplication'
          #layout: #(#LayoutFrame 908 0 40 0 1207 0 339 0)
          #level: 0
          #min: #(#Point 10 10)
          #max: #(#Point 1280 1024)
          #bounds: #(#Rectangle 908 40 1208 340)
          #usePreferredExtent: false
          #returnIsOKInDialog: true
          #escapeIsCancelInDialog: true
        )
        #component: 
       #(#SpecCollection
          #collection: #(
           #(#HorizontalPanelViewSpec
              #name: 'HorizontalPanel1'
              #layout: #(#LayoutFrame 0 0 -30 1 0 1 0 1)
              #horizontalLayout: #fitSpace
              #verticalLayout: #center
              #horizontalSpace: 3
              #verticalSpace: 3
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#ActionButtonSpec
                    #label: 'Cancel'
                    #name: 'Button1'
                    #translateLabel: true
                    #model: #cancel
                    #enableChannel: #modifiedChannel
                    #extent: #(#Point 145 22)
                  )
                 #(#ActionButtonSpec
                    #label: 'OK'
                    #name: 'Button2'
                    #translateLabel: true
                    #model: #accept
                    #enableChannel: #modifiedChannel
                    #extent: #(#Point 146 22)
                  )
                 )
               
              )
            )
           #(#FramedBoxSpec
              #label: 'Delivery'
              #name: 'FramedBox1'
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 150 0)
              #labelPosition: #topLeft
              #translateLabel: true
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#CheckBoxSpec
                    #label: 'Compiled Binary'
                    #name: 'CheckBox1'
                    #layout: #(#LayoutFrame 0 0.0 10 0 0 1.0 32 0)
                    #model: #deliverCompiledBinary
                    #translateLabel: true
                  )
                 #(#CheckBoxSpec
                    #label: 'Zip Archive'
                    #name: 'CheckBox2'
                    #layout: #(#LayoutFrame 0 0.0 38 0 0 1.0 60 0)
                    #model: #deliverZipArchive
                    #translateLabel: true
                  )
                 #(#CheckBoxSpec
                    #label: 'GZip Archive (self extracting)'
                    #name: 'CheckBox3'
                    #layout: #(#LayoutFrame 0 0.0 66 0 0 1.0 88 0)
                    #model: #deliverSources
                    #translateLabel: true
                  )
                 #(#CheckBoxSpec
                    #label: 'Sources'
                    #name: 'CheckBox4'
                    #layout: #(#LayoutFrame 0 0.0 94 0 0 1.0 116 0)
                    #model: #deliverGZipArchive
                    #translateLabel: true
                  )
                 )
               
              )
            )
           #(#FramedBoxSpec
              #label: 'Install Directory'
              #name: 'FramedBox2'
              #layout: #(#LayoutFrame 0 0.0 153 0 0 1.0 218 0)
              #labelPosition: #topLeft
              #translateLabel: true
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#InputFieldSpec
                    #name: 'EntryField1'
                    #layout: #(#LayoutFrame 0 0.0 5 0 0 1.0 27 0)
                    #model: #installDirectory
                    #modifiedChannel: #modifiedChannel
                  )
                 )
               
              )
            )
           )
         
        )
      )
!

rightCanvasSpecForEditableText
    "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:ProjectBrowser andSelector:#emptyRightCanvasSpec
     ProjectBrowser new openInterface:#emptyRightCanvasSpec
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #window: 
           #(#WindowSpec
              #name: 'NewApplication'
              #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
              #label: 'NewApplication'
              #min: #(#Point 10 10)
              #max: #(#Point 1280 1024)
              #bounds: #(#Rectangle 216 173 516 473)
              #usePreferredExtent: false
          )
          #component: 
           #(#SpecCollection
              #collection: 
               #(
                 #(#TextEditorSpec
                    #name: 'TextEditor1'
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
                    #model: #rightCanvasTextHolder
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #miniScrollerHorizontal: true
                    #isReadOnly: false
                )
              )
          )
      )
!

rightCanvasSpecForHTMLText
    "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:ProjectBrowser andSelector:#rightCanvasSpecForHTMLText
     ProjectBrowser new openInterface:#rightCanvasSpecForHTMLText
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #window: 
           #(#WindowSpec
              #name: 'NewApplication'
              #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
              #level: 0
              #label: 'NewApplication'
              #min: #(#Point 10 10)
              #max: #(#Point 1280 1024)
              #bounds: #(#Rectangle 216 173 516 473)
              #usePreferredExtent: false
          )
          #component: 
           #(#SpecCollection
              #collection: 
               #(
                 #(#HTMLViewSpec
                    #name: 'HTMLBrowser1'
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
                    #model: #htmlDocumentURLHolder
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                )
              )
          )
      )
!

rightCanvasSpecForPatchesList
    "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:ProjectBrowser andSelector:#rightCanvasSpecForPatchesList
     ProjectBrowser new openInterface:#rightCanvasSpecForPatchesList
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #window: 
           #(#WindowSpec
              #name: 'NewApplication'
              #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
              #level: 0
              #label: 'NewApplication'
              #min: #(#Point 10 10)
              #max: #(#Point 1280 1024)
              #bounds: #(#Rectangle 216 173 516 473)
              #usePreferredExtent: false
          )
          #component: 
           #(#SpecCollection
              #collection: 
               #(
                 #(#DataSetSpec
                    #name: 'patchesTable'
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #dataList: #patchesList
                    #has3Dsepartors: false
                    #columnHolder: #patchesTableColumns
                    #columnAdaptor: #classTableAdaptor
                )
              )
          )
      )
!

rightCanvasSpecForPrerequisites
    "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:ProjectBrowser andSelector:#rightCanvasSpecForPrerequisites
     ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisites
    "

    <resource: #canvas>

    ^ 
     #(#FullSpec
        #name: #rightCanvasSpecForPrerequisites
        #window: 
       #(#WindowSpec
          #label: 'NewApplication'
          #name: 'NewApplication'
          #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
          #level: 0
          #min: #(#Point 10 10)
          #max: #(#Point 1280 1024)
          #bounds: #(#Rectangle 216 173 516 473)
          #usePreferredExtent: false
          #returnIsOKInDialog: true
          #escapeIsCancelInDialog: true
        )
        #component: 
       #(#SpecCollection
          #collection: #(
           #(#LabelSpec
              #label: 'Projects'
              #name: 'Label1'
              #layout: #(#LayoutFrame 0 0 0 0 0 0.5 30 0)
              #translateLabel: true
            )
           #(#SequenceViewSpec
              #name: 'List1'
              #layout: #(#LayoutFrame 0 0 30 0 0 0.5 -62 1)
              #tabable: true
              #model: #selectedProjectInPrerequisites
              #hasHorizontalScrollBar: true
              #hasVerticalScrollBar: true
              #miniScrollerHorizontal: true
              #miniScrollerVertical: true
              #useIndex: false
              #sequenceList: #listOfAllProjectsInPrerequisites
            )
           #(#LabelSpec
              #label: 'Prerequisites'
              #name: 'Label2'
              #layout: #(#LayoutFrame 0 0.5 0 0 0 1 30 0)
              #translateLabel: true
            )
           #(#SequenceViewSpec
              #name: 'List2'
              #layout: #(#LayoutFrame 0 0.5 30 0 0 1 -62 1)
              #tabable: true
              #model: #selectedRequiredProjectInPrerequisites
              #hasHorizontalScrollBar: true
              #hasVerticalScrollBar: true
              #miniScrollerHorizontal: true
              #miniScrollerVertical: true
              #useIndex: false
              #sequenceList: #listOfRequiredProjectsInPrerequisites
            )
           #(#HorizontalPanelViewSpec
              #name: 'HorizontalPanel2'
              #layout: #(#LayoutFrame 0 0 -62 1 0 1 -32 1)
              #horizontalLayout: #fitSpace
              #verticalLayout: #center
              #horizontalSpace: 3
              #verticalSpace: 3
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#ActionButtonSpec
                    #label: 'Add'
                    #name: 'addButton'
                    #translateLabel: true
                    #resizeForLabel: false
                    #tabable: true
                    #model: #addToPrerequisites
                    #enableChannel: #canAddSelectedProjectToPrerequisites
                    #actionValue: ''
                    #useDefaultExtent: true
                  )
                 #(#ActionButtonSpec
                    #label: 'Remove'
                    #name: 'removeButton'
                    #translateLabel: true
                    #resizeForLabel: false
                    #tabable: true
                    #model: #removeFromPrerequisites
                    #enableChannel: #canRemoveSelectedProjectFromPrerequisites
                    #actionValue: ''
                    #useDefaultExtent: true
                  )
                 )
               
              )
            )
           #(#HorizontalPanelViewSpec
              #name: 'HorizontalPanel1'
              #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0)
              #horizontalLayout: #fitSpace
              #verticalLayout: #center
              #horizontalSpace: 3
              #verticalSpace: 3
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#ActionButtonSpec
                    #label: 'Cancel'
                    #name: 'Button1'
                    #translateLabel: true
                    #tabable: true
                    #model: #cancel
                    #useDefaultExtent: true
                  )
                 #(#ActionButtonSpec
                    #label: 'OK'
                    #name: 'Button2'
                    #translateLabel: true
                    #tabable: true
                    #model: #accept
                    #useDefaultExtent: true
                  )
                 )
               
              )
            )
           )
         
        )
      )
!

rightCanvasSpecForProperties
    "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:ProjectBrowser andSelector:#rightCanvasSpecForProperties
     ProjectBrowser new openInterface:#rightCanvasSpecForProperties
    "

    <resource: #canvas>

    ^ 
     #(#FullSpec
        #name: #rightCanvasSpecForProperties
        #window: 
       #(#WindowSpec
          #label: 'NewApplication'
          #name: 'NewApplication'
          #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
          #level: 0
          #min: #(#Point 10 10)
          #max: #(#Point 1280 1024)
          #bounds: #(#Rectangle 216 173 516 473)
          #usePreferredExtent: false
          #returnIsOKInDialog: true
          #escapeIsCancelInDialog: true
        )
        #component: 
       #(#SpecCollection
          #collection: #(
           #(#HorizontalPanelViewSpec
              #name: 'HorizontalPanel1'
              #layout: #(#LayoutFrame 0 0 -30 1 0 1 0 1)
              #horizontalLayout: #fitSpace
              #verticalLayout: #center
              #horizontalSpace: 3
              #verticalSpace: 3
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#ActionButtonSpec
                    #label: 'Cancel'
                    #name: 'Button1'
                    #translateLabel: true
                    #model: #cancel
                    #enableChannel: #modifiedChannel
                    #extent: #(#Point 145 22)
                  )
                 #(#ActionButtonSpec
                    #label: 'OK'
                    #name: 'Button2'
                    #translateLabel: true
                    #model: #accept
                    #enableChannel: #modifiedChannel
                    #extent: #(#Point 146 22)
                  )
                 )
               
              )
            )
           #(#FramedBoxSpec
              #label: 'Project Type'
              #name: 'FramedBox1'
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 93 0)
              #labelPosition: #topLeft
              #translateLabel: true
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#RadioButtonSpec
                    #label: 'Application'
                    #name: 'RadioButton1'
                    #layout: #(#LayoutFrame -1 0.0 10 0 135 0 32 0)
                    #translateLabel: true
                    #model: #projectType
                    #isTriggerOnDown: true
                    #select: #application
                  )
                 #(#RadioButtonSpec
                    #label: 'Class Library'
                    #name: 'RadioButton2'
                    #layout: #(#LayoutFrame -1 0.0 38 0 135 0 60 0)
                    #translateLabel: true
                    #model: #projectType
                    #isTriggerOnDown: true
                    #select: #library
                  )
                 )
               
              )
            )
           #(#FramedBoxSpec
              #label: 'Directory'
              #name: 'FramedBox2'
              #layout: #(#LayoutFrame 0 0.0 94 0.0 0 1.0 159 0)
              #labelPosition: #topLeft
              #translateLabel: true
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#InputFieldSpec
                    #name: 'EntryField1'
                    #layout: #(#LayoutFrame 0 0.0 4 0 0 1.0 26 0)
                    #enableChannel: #currentProjectWasNotLoadedFromFile
                    #model: #projectDirectory
                    #modifiedChannel: #modifiedChannel
                  )
                 )
               
              )
            )
           #(#FramedBoxSpec
              #label: 'Repository'
              #name: 'FramedBox3'
              #layout: #(#LayoutFrame 0 0.0 160 0.0 0 1.0 243 0)
              #labelPosition: #topLeft
              #translateLabel: true
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#InputFieldSpec
                    #name: 'EntryField2'
                    #layout: #(#LayoutFrame 92 0.0 4 0 0 1.0 26 0)
                    #model: #repositoryModule
                    #modifiedChannel: #modifiedChannel
                  )
                 #(#InputFieldSpec
                    #name: 'EntryField3'
                    #layout: #(#LayoutFrame 92 0.0 29 0 0 1.0 51 0)
                    #model: #repositoryDirectory
                    #modifiedChannel: #modifiedChannel
                  )
                 #(#LabelSpec
                    #label: 'Module:'
                    #name: 'Label1'
                    #layout: #(#LayoutFrame 7 0 4 0 86 0 26 0)
                    #translateLabel: true
                    #adjust: #right
                  )
                 #(#LabelSpec
                    #label: 'Directory:'
                    #name: 'Label2'
                    #layout: #(#LayoutFrame 7 0 29 0 86 0 51 0)
                    #translateLabel: true
                    #adjust: #right
                  )
                 )
               
              )
            )
           )
         
        )
      )
!

rightCanvasSpecForReadOnlyText
    "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:ProjectBrowser andSelector:#emptyRightCanvasSpec
     ProjectBrowser new openInterface:#emptyRightCanvasSpec
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #window: 
           #(#WindowSpec
              #name: 'NewApplication'
              #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
              #label: 'NewApplication'
              #min: #(#Point 10 10)
              #max: #(#Point 1280 1024)
              #bounds: #(#Rectangle 216 173 516 473)
              #usePreferredExtent: false
          )
          #component: 
           #(#SpecCollection
              #collection: 
               #(
                 #(#TextEditorSpec
                    #name: 'TextEditor1'
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
                    #model: #rightCanvasTextHolder
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #miniScrollerHorizontal: true
                    #isReadOnly: true
                )
              )
          )
      )
!

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:ProjectBrowser andSelector:#windowSpec
     ProjectBrowser new openInterface:#windowSpec
     ProjectBrowser open
    "

    <resource: #canvas>

    ^ 
     #(#FullSpec
        #name: #windowSpec
        #window: 
       #(#WindowSpec
          #label: 'ProjectBrowser'
          #name: 'ProjectBrowser'
          #layout: #(#LayoutFrame 218 0 107 0 781 0 497 0)
          #level: 0
          #min: #(#Point 10 10)
          #max: #(#Point 1024 768)
          #bounds: #(#Rectangle 218 107 782 498)
          #menu: #mainMenu
          #usePreferredExtent: false
          #returnIsOKInDialog: true
          #escapeIsCancelInDialog: true
        )
        #component: 
       #(#SpecCollection
          #collection: #(
           #(#MenuPanelSpec
              #name: 'ToolBar1'
              #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
              #menu: #menu
              #textDefault: true
            )
           #(#VariableHorizontalPanelSpec
              #name: 'VariableHorizontalPanel1'
              #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -24 1.0)
              #handles: #(#Any 0.379433 1.0)
              #component: 
             #(#SpecCollection
                #collection: #(
                 #(#SelectionInTreeViewSpec
                    #name: 'TreeList1'
                    #model: #selectedTreeNode
                    #menu: #itemMenuHolder
                    #performer: #itemMenuPerformer
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #miniScrollerHorizontal: true
                    #showRoot: false
                    #showDirectoryIndicatorForRoot: false
                    #showDirectoryIndicator: true
                    #valueChangeSelector: #itemSelected:
                    #hierarchicalList: #projectTreeHolder
                    #selectConditionSelector: #selectionChangeAllowed
                    #highlightMode: #label
                  )
                 #(#SubCanvasSpec
                    #name: 'SubCanvas1'
                    #hasHorizontalScrollBar: false
                    #hasVerticalScrollBar: false
                    #specHolder: #currentCanvasHolder
                  )
                 )
               
              )
            )
           #(#UISubSpecification
              #name: 'infoBarSubSpec'
              #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
              #majorKey: #ToolApplicationModel
              #minorKey: #windowSpecForInfoBar
            )
           )
         
        )
      )
! !

!ProjectBrowser class methodsFor:'menu specs'!

classesItemMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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

    "
     MenuEditor new openOnClass:ProjectBrowser andSelector:#classesItemMenu
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser classesItemMenu)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #label: 'Add Class...'
                #translateLabel: true
                #value: #addClass
                #enabled: #hasClassesSelectedHolder
            )
             #(#MenuItem
                #label: '-'
            )
             #(#MenuItem
                #label: 'Browse...'
                #translateLabel: true
                #value: #browseClasses
                #enabled: #hasClassesSelectedHolder
            )
          ) nil
          nil
      )
!

mainMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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

    "
     MenuEditor new openOnClass:ProjectBrowser andSelector:#mainMenu
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser mainMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'File'
            #translateLabel: true
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Load From...'
                  #translateLabel: true
                  #value: #openProject
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Save'
                  #translateLabel: true
                  #value: #saveProject
                  #enabled: #hasProjectSelectedHolder
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Exit'
                  #translateLabel: true
                  #value: #closeRequest
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'Project'
            #translateLabel: true
            #submenuChannel: #projectItemMenu
          )
         #(#MenuItem
            #label: 'Help'
            #translateLabel: true
            #startGroup: #right
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Documentation'
                  #translateLabel: true
                  #value: #openDocumentation
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'About this Application'
                  #translateLabel: true
                  #value: #openAboutThisApplication
                )
               )
              nil
              nil
            )
          )
         )
        nil
        nil
      )
!

menu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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

    "
     MenuEditor new openOnClass:ProjectBrowser andSelector:#menu
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser menu)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #label: 'New...'
                #translateLabel: true
                #isButton: true
                #value: #newProject
                #labelImage: #(#ResourceRetriever #Icon #newIcon)
            )
             #(#MenuItem
                #label: 'Open...'
                #translateLabel: true
                #isButton: true
                #value: #openProject
                #labelImage: #(#ResourceRetriever #Icon #loadIcon)
            )
             #(#MenuItem
                #label: 'SaveAs...'
                #translateLabel: true
                #isButton: true
                #value: #saveProject
                #labelImage: #(#ResourceRetriever #Icon #saveIcon)
            )
          ) nil
          nil
      )
!

noItemMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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

    "
     MenuEditor new openOnClass:ProjectBrowser andSelector:#projectItemMenu
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser projectItemMenu)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #label: 'New Project'
                #translateLabel: true
                #value: #newProject
            )
          ) nil
          nil
      )
!

projectItemMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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

    "
     MenuEditor new openOnClass:ProjectBrowser andSelector:#projectItemMenu
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser projectItemMenu)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #label: 'Make Current'
                #translateLabel: true
                #value: #makeCurrentProject
                #enabled: #hasProjectSelectedHolder
            )
             #(#MenuItem
                #label: '-'
            )
             #(#MenuItem
                #label: 'New SubProject'
                #translateLabel: true
                #value: #newSubProject
                #enabled: #hasProjectSelectedHolder
            )
             #(#MenuItem
                #label: '-'
            )
             #(#MenuItem
                #label: 'Rename...'
                #translateLabel: true
                #value: #renameProject
                #enabled: #hasProjectSelectedHolder
            )
             #(#MenuItem
                #label: '-'
            )
             #(#MenuItem
                #label: 'Remove...'
                #translateLabel: true
                #value: #removeProject
                #enabled: #hasProjectSelectedHolder
            )
          ) nil
          nil
      )
!

subProjectsItemMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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

    "
     MenuEditor new openOnClass:ProjectBrowser andSelector:#subProjectsItemMenu
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser subProjectsItemMenu)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #label: 'New SubProject'
                #translateLabel: true
                #value: #newSubProject
                #enabled: #hasSubProjectsSelectedHolder
            )
          ) nil
          nil
      )
! !

!ProjectBrowser class methodsFor:'tableColumns specs'!

classTableColumns
    "This resource specification was automatically generated
     by the DataSetBuilder of ST/X."

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

    "
     DataSetBuilder new openOnClass:ProjectBrowser andSelector:#classTableColumns
    "

    <resource: #tableColumns>


    ^ #(
        #(#DataSetColumnSpec
           #label: 'Class'
           #id: 'classColumn'
           #labelAlignment: #left
           #model: #classNameFromClassInfo:
       )
        #(#DataSetColumnSpec
           #label: 'Included'
           #id: 'inclusion'
           #columnAlignment: #center
           #width: 100
           #editorType: #ComboList
           #model: #classIncludeConditionFromClassInfo:
       )
        #(#DataSetColumnSpec
           #label: 'Filename'
           #labelAlignment: #left
           #minWidth: 200
           #model: #classFilenameFromClassInfo:
       )
     )
!

patchesTableColumns
    "This resource specification was automatically generated
     by the DataSetBuilder of ST/X."

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

    "
     DataSetBuilder new openOnClass:ProjectBrowser andSelector:#patchesTableColumns
    "

    <resource: #tableColumns>


    ^ #(
        #(#DataSetColumnSpec
           #label: 'Class'
           #id: 'classColumn'
           #labelAlignment: #left
           #model: #classNameFromPatchesInfo:
       )
        #(#DataSetColumnSpec
           #label: 'Selector'
           #id: 'selectorColumn'
           #labelAlignment: #left
           #model: #selectorFromPatchesInfo:
       )
     )
! !

!ProjectBrowser methodsFor:'aspects'!

canAddSelectedProjectToPrerequisites
    |holder|

    (holder := builder bindingAt:#canAddSelectedProjectToPrerequisites) isNil ifTrue:[
        holder := BlockValue with:[:m | m notNil] argument:(self selectedProjectInPrerequisites).
        builder aspectAt:#canAddSelectedProjectToPrerequisites put:holder.
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

canRemoveSelectedProjectFromPrerequisites
    |holder|

    (holder := builder bindingAt:#canRemoveSelectedProjectFromPrerequisites) isNil ifTrue:[
        holder := BlockValue with:[:m | m notNil] argument:(self selectedRequiredProjectInPrerequisites).
        builder aspectAt:#canRemoveSelectedProjectFromPrerequisites put:holder.
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

classList
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#classList) isNil ifTrue:[
        builder aspectAt:#classList put:(holder :=  List new).
    ].
    ^ holder.
!

classTableAdaptor
    ^ self
!

classTableColumns
    ^ self class classTableColumns
!

currentCanvasHolder
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#currentCanvasHolder) isNil ifTrue:[
        builder aspectAt:#currentCanvasHolder put:(holder :=  ValueHolder new).
    ].
    ^ holder.
!

currentProjectWasNotLoadedFromFile
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#currentProjectWasNotLoadedFromFile) isNil ifTrue:[
        builder aspectAt:#currentProjectWasNotLoadedFromFile put:(holder :=  ValueHolder new).
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:01:09 / cg"
!

deliverCompiledBinary
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#deliverCompiledBinary) isNil ifTrue:[
        builder aspectAt:#deliverCompiledBinary put:(holder :=  ValueHolder new).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

deliverGZipArchive
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#deliverGZipArchive) isNil ifTrue:[
        builder aspectAt:#deliverGZipArchive put:(holder :=  ValueHolder new).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

deliverSources
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#deliverSources) isNil ifTrue:[
        builder aspectAt:#deliverSources put:(holder :=  ValueHolder new).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

deliverZipArchive
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#deliverZipArchive) isNil ifTrue:[
        builder aspectAt:#deliverZipArchive put:(holder :=  ValueHolder new).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

hasProjectSelectedHolder
    ^ [
        self hasProjectNodeSelected
      ]
!

hasSubProjectsSelectedHolder
    ^ [
        self hasSubProjectsNodeSelected
      ]
!

htmlDocumentURLHolder
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#htmlDocumentURLHolder) isNil ifTrue:[
        builder aspectAt:#htmlDocumentURLHolder put:(holder :=  ValueHolder new).
    ].
    ^ holder.
!

installDirectory
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#installDirectory) isNil ifTrue:[
        builder aspectAt:#installDirectory put:(holder := '/opt' asValue).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

listOfAllProjectsInPrerequisites
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder projects|

    (holder := builder bindingAt:#listOfAllProjectsInPrerequisites) isNil ifTrue:[
        builder aspectAt:#listOfAllProjectsInPrerequisites put:(holder := List new).
        projects := Set new.
        Project allInstancesDo:[:p |
            projects add:p name
        ].
        projects := projects asOrderedCollection sort.
        holder addAll:projects.
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

listOfRequiredProjectsInPrerequisites
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#listOfRequiredProjectsInPrerequisites) isNil ifTrue:[
        builder aspectAt:#listOfRequiredProjectsInPrerequisites put:(holder := List new).
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

modifiedChannel
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    modifiedChannel isNil ifTrue:[
        modifiedChannel := false asValue.
    ].
    ^ modifiedChannel.

!

patchesList
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#patchesList) isNil ifTrue:[
        builder aspectAt:#patchesList put:(holder :=  List new).
    ].
    ^ holder.
!

projectDirectory
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#projectDirectory) isNil ifTrue:[
        builder aspectAt:#projectDirectory put:(holder := '.' asValue).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

projectTreeHolder
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#projectTree) isNil ifTrue:[
        builder aspectAt:#projectTree put:(holder :=  SelectionInTree new).
        holder root:self projectTree.
    ].
    ^ holder.
!

projectType
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#projectType) isNil ifTrue:[
        builder aspectAt:#projectType put:(holder :=  ValueHolder new).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

repositoryDirectory
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#repositoryDirectory) isNil ifTrue:[
        builder aspectAt:#repositoryDirectory put:(holder :=  ValueHolder new).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

repositoryModule
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#repositoryModule) isNil ifTrue:[
        builder aspectAt:#repositoryModule put:(holder :=  ValueHolder new).
        holder onChangeSend:#value to:[modifiedChannel value:true].
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

rightCanvasTextHolder
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#rightCanvasTextHolder) isNil ifTrue:[
        builder aspectAt:#rightCanvasTextHolder put:(holder :=  ValueHolder new).
    ].
    ^ holder.
!

selectedProjectInPrerequisites
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#selectedProjectInPrerequisites) isNil ifTrue:[
        builder aspectAt:#selectedProjectInPrerequisites put:(holder := ValueHolder new).
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

selectedRequiredProjectInPrerequisites
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#selectedRequiredProjectInPrerequisites) isNil ifTrue:[
        builder aspectAt:#selectedRequiredProjectInPrerequisites put:(holder := ValueHolder new).
    ].
    ^ holder.

    "Created: / 23.3.1999 / 14:18:05 / cg"
!

selectedTreeNode
    "automatically generated by UIPainter ..."

    "*** the code below creates a default model when invoked."
    "*** (which may not be the one you wanted)"
    "*** Please change as required and accept in the browser."

    |holder|

    (holder := builder bindingAt:#selectedTreeNode) isNil ifTrue:[
        builder aspectAt:#selectedTreeNode put:(holder :=  ValueHolder new).
    ].
    ^ holder.
! !

!ProjectBrowser methodsFor:'change & update'!

update:something with:aParameter from:changedObject
    something == #name ifTrue:[
        "/ a project was renamed - update my tree
        self projectTree children do:[:pNode |
            pNode contents == changedObject ifTrue:[
                pNode name:changedObject name.
                pNode changed.
            ]
        ].
        ^ self.
    ].

    changedObject == self currentProject ifTrue:[
        self halt
    ].
! !

!ProjectBrowser methodsFor:'initialization'!

postBuildWith:aBuiler
    self modifiedChannel value:false.

    self setupCanvasForNoSelection.
    ^ super postBuildWith:aBuiler
!

setupCanvasForNoSelection
    self 
        showReadOnlyText:'Please select an existing project,
load one from a (''.prj'')-file,
or create a new project.'.
! !

!ProjectBrowser methodsFor:'menus'!

itemMenu
    |m|

    self hasNodeSelected ifFalse:[
        ^ self class noItemMenu
    ].

    self hasProjectNodeSelected ifTrue:[
        ^ self class projectItemMenu
    ].      
    self hasSubProjectsNodeSelected ifTrue:[
        ^ self class subProjectsItemMenu
    ].      
    self hasClassesNodeSelected ifTrue:[
        ^ self class classesItemMenu
    ].      
    ^ nil
!

itemMenuHolder
    ^ [ self itemMenu]
!

itemMenuPerformer
    ^ self
! !

!ProjectBrowser methodsFor:'private'!

currentProject
    |node|

    node := self selectedTreeNode value.
    node isNil ifTrue:[^ nil].

    [node notNil and:[node isProjectNode not]] whileTrue:[
        node := node parent.
    ].
    node notNil ifTrue:[
        ^ node contents
    ].
    ^ nil

!

hasClassesNodeSelected
    |selectedNode|

    selectedNode := self selectedTreeNode value.
    selectedNode isNil ifTrue:[^ false].

    ^ selectedNode contents == #classes

!

hasNodeSelected
    ^ self selectedTreeNode value notNil

!

hasProjectNodeSelected
    |selectedNode|

    selectedNode := self selectedTreeNode value.
    selectedNode isNil ifTrue:[^ false].

    ^ selectedNode isProjectNode

!

hasSubProjectsNodeSelected
    |selectedNode|

    selectedNode := self selectedTreeNode value.
    selectedNode isNil ifTrue:[^ false].

    ^ selectedNode contents == #subprojects

!

nodeFor:aProject
    "generate and return a treeNode for some project"

    |projectName pNode 
     propertiesNode docNode classesNode patchesNode subprojectsNode filesNode
     commentNode prerequisitesNode analysisNode designNode codeNode
     userDocNode userOverViewNode userGuideNode userRefManNode
     deploymentNode|

    projectName := aProject name.
    pNode := ProjectNode name:projectName.
    pNode contents:aProject.

    pNode add:(commentNode := ProjectTreeItem name:'Comment').
"/    pNode add:(docNode := ProjectTreeItem name:'Documentation').
    pNode add:(propertiesNode := ProjectTreeItem name:'Properties').
    pNode add:(prerequisitesNode := ProjectTreeItem name:'Prerequisites').
"/    pNode add:(subprojectsNode := ProjectTreeItem name:'SubProjects').
    pNode add:(classesNode := ProjectTreeItem name:'Classes').
    pNode add:(patchesNode := ProjectTreeItem name:'Patches').
    pNode add:(filesNode := ProjectTreeItem name:'Files').
    pNode add:(deploymentNode := ProjectTreeItem name:'Deployment').

    subprojectsNode notNil ifTrue:[
        subprojectsNode contents:#subprojects.
        aProject subProjects do:[:aSubProject |
            subprojectsNode add:(self nodeFor:aSubProject)
        ].
    ].

    commentNode icon:(self class commentIcon).
    commentNode action:[:item | self showCommentOf:item].
    commentNode contents:#comment.

    docNode notNil ifTrue:[
        docNode contents:#documentation.
        docNode action:[:item | self showDocumentationFor:item].

        docNode add:(analysisNode := ProjectTreeItem name:'Analysis').
        docNode add:(designNode := ProjectTreeItem name:'Design').
        docNode add:(codeNode := ProjectTreeItem name:'Code').
        docNode add:(userDocNode := ProjectTreeItem name:'User Documentation').
        userDocNode add:(userOverViewNode := ProjectTreeItem name:'Overview').
        userDocNode add:(userGuideNode := ProjectTreeItem name:'Guide').
        userDocNode add:(userRefManNode := ProjectTreeItem name:'Reference').
        docNode add:(userDocNode := ProjectTreeItem name:'Error Reports').
        docNode add:(userDocNode := ProjectTreeItem name:'Other').
    ].

    prerequisitesNode contents:#prerequisites.
    prerequisitesNode icon:(self class prerequisitesIcon).
    prerequisitesNode spec:(self class rightCanvasSpecForPrerequisites).

    classesNode contents:#classes.
    classesNode icon:(self class classesIcon).
    ((aProject classes ? #()) copy sort:[:a :b | a name < b name]) 
    do:[:aClass |
        |cNode|

        cNode := ProjectTreeItem name:aClass name.
        classesNode add:cNode.
    ].

    propertiesNode contents:#properties.
    propertiesNode spec:(self class rightCanvasSpecForProperties).

    filesNode contents:#files.
    filesNode icon:(self class filesIcon).

    patchesNode contents:#patches.
    patchesNode icon:(self class methodsIcon).

    deploymentNode icon:(self class deploymentIcon).
    deploymentNode spec:(self class rightCanvasSpecForDeployment).

    ^ pNode

    "Modified: / 23.3.1999 / 14:27:30 / cg"
!

projectTree
    |tree root|

    projectTree isNil ifTrue:[
        tree := SelectionInTree new.
        tree root:(root := TreeItem name:'invisibleRoot').

        Project knownProjects do:[:aProject |
            root add:(self nodeFor:aProject).
        ].
        projectTree := root.
    ].

    ^ projectTree
!

readAspectsFromProject
    |p|

    p := self currentProject.
    p notNil ifTrue:[
        self rightCanvasTextHolder value:p comment.

        self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not.
        self projectType value:(p type).
        self projectDirectory value:(p directory).

        self repositoryModule value:(p repositoryModule).
        self repositoryDirectory value:(p repositoryDirectory).

        self deliverCompiledBinary value:(p propertyAt:#deliverCompiledBinary) ? false.
        self deliverGZipArchive value:(p propertyAt:#deliverGZipArchive) ? false.
        self deliverZipArchive value:(p propertyAt:#deliverZipArchive) ? false.
        self deliverSources value:(p propertyAt:#deliverSources) ? false.

        modifiedChannel value:false.
        p addDependent:self.
    ].

    "Created: / 23.3.1999 / 14:16:12 / cg"
    "Modified: / 23.3.1999 / 14:18:38 / cg"
!

saveAspectsIntoProject
    |p|

    p := self currentProject.
    p notNil ifTrue:[
"/        self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not.
        p type:self projectType value.
"/        p directory:self projectDirectory value.

        p repositoryModule:self repositoryModule value.
        p repositoryDirectory:self repositoryDirectory value.

        p propertyAt:#deliverCompiledBinary put:self deliverCompiledBinary value.
        p propertyAt:#deliverSources put:self deliverSources value.
        p propertyAt:#deliverZipArchive put:self deliverZipArchive value.
        p propertyAt:#deliverGZipArchive put:self deliverGZipArchive value.

"/        modifiedChannel value:false.
    ].

    "Created: / 23.3.1999 / 14:16:12 / cg"
    "Modified: / 23.3.1999 / 14:18:38 / cg"
!

updateRightCanvas
    |selectedNode nodeContents spec|

    selectedNode := self selectedTreeNode value.
    selectedNode isNil ifTrue:[
        self setupCanvasForNoSelection.
        ^ self
    ].

    (spec := selectedNode spec) notNil ifTrue:[
        self currentCanvasHolder value:spec.
        ^ self
    ].

    selectedNode isProjectNode ifTrue:[
        self showCommentOf:selectedNode.
        ^ self.
    ].

    selectedNode contents == #classes ifTrue:[
        self showClassListOf:selectedNode.
        ^ self.
    ].
    selectedNode contents == #patches ifTrue:[
        self showPatchesListOf:selectedNode.
        ^ self.
    ].

    self currentCanvasHolder value:(self class emptyRightCanvasSpec).
    self rightCanvasTextHolder value:''.

    "Modified: / 23.3.1999 / 14:16:02 / cg"
! !

!ProjectBrowser methodsFor:'private - table col access'!

classFilenameFromClassInfo:cInfo
    ^ cInfo classFileName
!

classIncludeConditionFromClassInfo:cInfo
    ^ cInfo conditionForInclusion
!

classNameFromClassInfo:cInfo
    ^ cInfo className
!

classNameFromPatchesInfo:pInfo
    ^ pInfo methodClass name
!

selectorFromPatchesInfo:pInfo
    ^ pInfo methodSelector
! !

!ProjectBrowser methodsFor:'user actions'!

accept
    "save values from aspects into the project"

    self saveAspectsIntoProject.
!

addToPrerequisites
    |sel|

    sel := self selectedProjectInPrerequisites value.
    self listOfRequiredProjectsInPrerequisites add:sel.
    self listOfAllProjectsInPrerequisites remove:sel.
    self selectedProjectInPrerequisites value:nil.
!

cancel
    "reload aspects from the project"

    self readAspectsFromProject
!

itemSelected:index
    |item action|

    self updateRightCanvas.

    self readAspectsFromProject.

    item := self projectTreeHolder value at:index.
    action := item action.
    action notNil ifTrue:[
        action value:item.
    ].
!

makeCurrentProject
    "make the selected Project the current project"

    |project selectedNode|

    self hasProjectNodeSelected ifTrue:[
        selectedNode := self selectedTreeNode value.
        project := selectedNode contents.

        Project current:project.
    ]
!

newProject
    self newProject:Project new.

!

newProject:newProject
    |newNode|

    newNode := self nodeFor:newProject.
    projectTree add:newNode.
    self projectTreeHolder root:projectTree.

!

newSubProject
    |selectedNode subProjectsNode newNode parentProject newProject|

    selectedNode := self selectedTreeNode value.

    self hasProjectNodeSelected ifTrue:[
        parentProject := selectedNode contents.
        subProjectsNode := selectedNode children detect:[:child | child contents == #subprojects].
    ] ifFalse:[
        self hasSubProjectsNodeSelected ifTrue:[
            subProjectsNode := selectedNode.
            parentProject := selectedNode parent contents.
        ].
    ].
self halt.
    parentProject notNil ifTrue:[
        newProject := Project new.
        newNode := self nodeFor:newProject.

        parentProject addSubProject:newProject.
        subProjectsNode add:newNode.
        self projectTreeHolder root:projectTree.
        self projectTreeHolder selectNode:newNode.
    ]    
!

openProject
    |fn newProject|

    fn := Dialog 
        requestFileName:'filename:' 
        default:nil
        ifFail:nil
        pattern:'*.prj'
        fromDirectory:(FileSelectionBox lastFileSelectionDirectory).

    fn notNil ifTrue:[
        newProject := Project new loadFromProjectFile:fn.
        newProject notNil ifTrue:[
            self newProject:newProject
        ]
    ]
!

removeFromPrerequisites
    |sel|

    sel := self selectedRequiredProjectInPrerequisites value.
    self listOfAllProjectsInPrerequisites add:sel.
    self listOfRequiredProjectsInPrerequisites remove:sel.
    self selectedRequiredProjectInPrerequisites value:nil.
!

removeProject
    |projectToRemove selectedNode subNode newNode parentNode parentProject newProject|

    self hasProjectNodeSelected ifTrue:[
        selectedNode := self selectedTreeNode value.
        projectToRemove := selectedNode contents.

        (self confirm:'Really remove the project ?') ifTrue:[
            self projectTreeHolder removeSelection
        ]
    ]
!

renameProject
    |nm selectedNode selectedProject|

    self hasProjectNodeSelected ifTrue:[
        selectedNode := self selectedTreeNode value.
        selectedProject := selectedNode contents.

        nm := Dialog 
                request:'Rename to:'
                initialAnswer:selectedProject name.

        nm size > 0 ifTrue:[
            selectedProject name:nm.
"/            selectedNode name:nm.
"/            selectedNode changed.
        ]
    ]
!

saveProject
    |d p|

    p := self currentProject.
    p directory isNil ifTrue:[
        d := (Dialog request:'Project Directory:').
        d size == 0 ifTrue:[
            ^ self
        ].
        p directory:d
    ].

    p saveAsProjectFile.
!

selectionChangeAllowed
    |answer|

    modifiedChannel value ifTrue:[
        answer := Dialog confirmWithCancel:'Accept changes ?'.
        answer isNil ifTrue:[
            ^ false
        ].
        answer == true ifTrue:[
            self accept.
        ].
    ].
    ^ true

!

showClassListOf:anItem
    |projectItem project classInfo l|

    projectItem := anItem parent.
    project := projectItem contents.

    classInfo := project classInfo asOrderedCollection.
    classInfo sort:[:a :b | a className < b className].

    l := self classList.
    l removeAll.
    l addAll:classInfo.

    self currentCanvasHolder value:(self class rightCanvasSpecForClassList).
!

showCommentOf:anItem
    |projectItem project|

    anItem contents == #comment ifTrue:[
        projectItem := anItem parent
    ] ifFalse:[
        projectItem := anItem
    ].
    project := projectItem contents.

    self currentCanvasHolder value:(self class rightCanvasSpecForEditableText).
    self rightCanvasTextHolder value:project comment.

!

showDocumentationFor:anItem
    |projectItem project|

    anItem contents == #documentation ifTrue:[
        projectItem := anItem parent
    ] ifFalse:[
        projectItem := anItem
    ].
    project := projectItem contents.

    self currentCanvasHolder value:(self class rightCanvasSpecForHTMLText).
    self htmlDocumentURLHolder value:project documentationURL.
!

showPatchesListOf:anItem
    |projectItem project patches l|

    projectItem := anItem parent.
    project := projectItem contents.

    patches := project individualMethods.
    patches := patches collect:[:m | m who].
    patches := patches sort:[:w1 :w2 |
                        w1 methodClass name < w2 methodClass name ifTrue:[
                            true
                        ] ifFalse:[
                            w1 methodClass name = w2 methodClass name ifFalse:[
                                false
                            ] ifTrue:[
                                w1 methodSelector < w2 methodSelector
                            ]
                        ]
                       ].

    l := self patchesList.
    l removeAll.
    l addAll:patches.

    self currentCanvasHolder value:(self class rightCanvasSpecForPatchesList).
!

showReadOnlyText:someText
    self currentCanvasHolder value:(self class rightCanvasSpecForReadOnlyText).
    self rightCanvasTextHolder value:someText.

! !

!ProjectBrowser::ProjectTreeItem methodsFor:'accessing'!

action
    "return the value of the instance variable 'action' (automatically generated)"

    ^ action!

action:something
    "set the value of the instance variable 'action' (automatically generated)"

    action := something.!

spec
    "return the value of the instance variable 'spec' (automatically generated)"

    ^ spec!

spec:something
    "set the value of the instance variable 'spec' (automatically generated)"

    spec := something.! !

!ProjectBrowser::ProjectTreeItem methodsFor:'queries'!

isProjectNode
    ^ false
! !

!ProjectBrowser::ProjectNode methodsFor:'queries'!

isProjectNode
    ^ true


! !

!ProjectBrowser class methodsFor:'documentation'!

version
    ^ '$Header$'
! !