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'!
classIcon
"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 classIcon inspect
ImageEditor openOnClass:self andSelector:#classIcon
"
<resource: #image>
^Icon
constantNamed:#'ProjectBrowser classIcon'
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'H"H"H"H"H"@"H"H"H"H"HBH@@@@@@@H H H!!DQD"@"@"@@@@@@@BHBHBH"H"H H H HQDQDR@@@@@@@@@@@@@@@BH"H"H @@@@HQDQDR@@@@@"H"H"HBHBHBDQDQD H H H"H"H"@"@"@@@@@@@@@BHBH"H"H"H"H H"H"H"H"Hb') ; colorMapFromArray:#[0 0 0 132 130 132 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?8O? ?>C?8O? ?>C?8O? ?>C?8O? ?>@@@@@@b') ; yourself); yourself]!
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 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: #(
#(#FramedBoxSpec
#label: 'Delivery'
#name: 'FramedBox1'
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 173 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)
#tabable: true
#model: #deliverCompiledBinary
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'Zip Archive'
#name: 'CheckBox2'
#layout: #(#LayoutFrame 0 0.0 38 0 0 1.0 60 0)
#tabable: true
#model: #deliverZipArchive
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'GZip Archive (self extracting)'
#name: 'CheckBox3'
#layout: #(#LayoutFrame 0 0.0 66 0 0 1.0 88 0)
#tabable: true
#model: #deliverGZipArchive
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'Include Sources'
#name: 'CheckBox4'
#layout: #(#LayoutFrame 0 0.0 94 0 0 1.0 116 0)
#tabable: true
#model: #deliverSources
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'loadAll-File'
#name: 'CheckBox5'
#layout: #(#LayoutFrame 0 0.0 122 0 0 1.0 144 0)
#tabable: true
#model: #deliverLoadAllFile
#translateLabel: true
)
)
)
)
#(#FramedBoxSpec
#label: 'Install Directory'
#name: 'FramedBox2'
#layout: #(#LayoutFrame 0 0.0 178 0 0 1.0 243 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#InputFieldSpec
#name: 'EntryField1'
#layout: #(#LayoutFrame 0 0.0 6 0 0 1.0 28 0)
#tabable: true
#model: #installDirectory
#modifiedChannel: #modifiedChannel
)
)
)
)
#(#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
#tabable: true
#model: #cancel
#enableChannel: #modifiedChannel
#actionValue: ''
#useDefaultExtent: true
)
#(#ActionButtonSpec
#label: 'OK'
#name: 'Button2'
#translateLabel: true
#tabable: true
#model: #accept
#enableChannel: #modifiedChannel
#actionValue: ''
#useDefaultExtent: true
)
)
)
)
)
)
)
!
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 208 0 222 0 507 0 521 0)
#level: 0
#min: #(#Point 10 10)
#max: #(#Point 1280 1024)
#bounds: #(#Rectangle 208 222 508 522)
#usePreferredExtent: false
#returnIsOKInDialog: true
#escapeIsCancelInDialog: true
)
#component:
#(#SpecCollection
#collection: #(
#(#LabelSpec
#label: 'Known 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 21 0 21 0 320 0 364 0)
#level: 0
#min: #(#Point 10 10)
#max: #(#Point 1280 1024)
#bounds: #(#Rectangle 21 21 321 365)
#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
#actionValue: ''
#useDefaultExtent: true
)
#(#ActionButtonSpec
#label: 'OK'
#name: 'Button2'
#translateLabel: true
#model: #accept
#enableChannel: #modifiedChannel
#useDefaultExtent: true
)
)
)
)
#(#FramedBoxSpec
#label: 'Project Type'
#name: 'FramedBox1'
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 89 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 89 0.0 0 1.0 149 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 152 0.0 0 1.0 235 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
)
)
)
)
#(#FramedBoxSpec
#label: 'Default Namespace'
#name: 'FramedBox4'
#layout: #(#LayoutFrame 0 0.0 236 0 0 1.0 294 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#InputFieldSpec
#name: 'EntryField4'
#layout: #(#LayoutFrame 0 0.0 4 0 0 1.0 26 0)
#model: #projectNamespace
#modifiedChannel: #modifiedChannel
)
)
)
)
)
)
)
!
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'!
classItemMenu
"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:#classItemMenu
(Menu new fromLiteralArrayEncoding:(ProjectBrowser classItemMenu)) startUp
"
<resource: #menu>
^
#(#Menu
#(
#(#MenuItem
#label: 'Remove from Project...'
#translateLabel: true
#value: #removeClassFromProject
#enabled: #hasClassesSelectedHolder
)
#(#MenuItem
#label: '-'
)
#(#MenuItem
#label: 'Browse...'
#translateLabel: true
#value: #browseClass
#enabled: #hasClassesSelectedHolder
)
)
nil
nil
)
!
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: 'Load Classes from Directory...'
#translateLabel: true
#value: #loadClassesFromDirectory
#enabled: #canLoadClassesFromDirectory
)
#(#MenuItem
#label: 'Load Classes from Repository...'
#translateLabel: true
#value: #loadClassesFromRepository
#enabled: #canLoadClassesFromRepository
)
#(#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: 'Build'
#translateLabel: true
#submenu:
#(#Menu
#(
#(#MenuItem
#label: 'All'
#translateLabel: true
#value: #buildAll
)
#(#MenuItem
#label: '-'
)
#(#MenuItem
#label: 'Make.proto && Makefile'
#translateLabel: true
#value: #generateMakefiles
)
)
nil
nil
)
)
#(#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:'startup'!
openOnFile:aFilename
|browser nodes|
browser := self new.
browser allButOpen.
browser loadFromProjectFile:aFilename.
nodes := browser projectTreeHolder root children.
nodes size > 0 ifTrue:[
"/ browser projectTreeHolder selectNode:nodes first.
browser projectTreeHolder expand:nodes first.
].
browser openWindow
! !
!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'!
browseClass
|node className cls|
self hasClassNodeSelected ifFalse:[^ self].
node := self selectedTreeNode value.
className := node contents value.
cls := Smalltalk at:className.
cls isNil ifTrue:[
self information:'The class is not (yet) loaded'.
^ self.
].
SystemBrowser openInClass:cls selector:nil.
!
canAddSelectedProjectToPrerequisites
|holder|
(holder := builder bindingAt:#canAddSelectedProjectToPrerequisites) isNil ifTrue:[
holder := BlockValue
with:[:m | self canAddToPrerequisites:m]
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 ..."
|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 ..."
|holder|
(holder := builder bindingAt:#currentCanvasHolder) isNil ifTrue:[
builder aspectAt:#currentCanvasHolder put:(holder := ValueHolder new).
].
^ holder.
!
currentProjectWasNotLoadedFromFile
"automatically generated by UIPainter ..."
|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 ..."
|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 ..."
|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"
!
deliverLoadAllFile
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#deliverLoadAllFile) isNil ifTrue:[
builder aspectAt:#deliverLoadAllFile 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 ..."
|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 ..."
|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 ..."
|holder|
(holder := builder bindingAt:#htmlDocumentURLHolder) isNil ifTrue:[
builder aspectAt:#htmlDocumentURLHolder put:(holder := ValueHolder new).
].
^ holder.
!
installDirectory
"automatically generated by UIPainter ..."
|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 ..."
|holder projects currentProject|
(holder := builder bindingAt:#listOfAllProjectsInPrerequisites) isNil ifTrue:[
builder aspectAt:#listOfAllProjectsInPrerequisites put:(holder := List new).
currentProject := self currentProject.
projects := Set new.
Project allInstancesDo:[:p |
(p ~~ currentProject
and:[p ~~ Project defaultProject]) ifTrue:[
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 ..."
|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 ..."
modifiedChannel isNil ifTrue:[
modifiedChannel := false asValue.
].
^ modifiedChannel.
!
patchesList
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#patchesList) isNil ifTrue:[
builder aspectAt:#patchesList put:(holder := List new).
].
^ holder.
!
projectDirectory
"automatically generated by UIPainter ..."
|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"
!
projectNamespace
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#projectNamespace) isNil ifTrue:[
builder aspectAt:#projectNamespace put:(holder := ValueHolder new).
holder onChangeSend:#value to:[modifiedChannel value:true].
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
projectTreeHolder
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#projectTree) isNil ifTrue:[
builder aspectAt:#projectTree put:(holder := SelectionInTree new).
holder root:self projectTree.
].
^ holder.
!
projectType
"automatically generated by UIPainter ..."
|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 ..."
|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 ..."
|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 ..."
|holder|
(holder := builder bindingAt:#rightCanvasTextHolder) isNil ifTrue:[
builder aspectAt:#rightCanvasTextHolder put:(holder := ValueHolder new).
].
^ holder.
!
selectedProjectInPrerequisites
"automatically generated by UIPainter ..."
|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 ..."
|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 ..."
|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.
self readAspectsFromProject.
self halt.
].
! !
!ProjectBrowser methodsFor:'initialization'!
postBuildWith:aBuiler
self modifiedChannel value:false.
self updateRightCanvas.
^ 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
].
self hasClassNodeSelected ifTrue:[
^ self class classItemMenu
].
^ nil
!
itemMenuHolder
^ [ self itemMenu]
!
itemMenuPerformer
^ self
! !
!ProjectBrowser methodsFor:'private'!
canAddToPrerequisites:aProjectName
^ aProjectName notNil
and:[aProjectName ~= self currentProject name]
!
canLoadClassesFromDirectory
|p projectDir|
self hasClassesNodeSelected ifFalse:[^ false].
(p := self currentProject) isNil ifTrue:[^ false].
(projectDir := p directory) size == 0 ifTrue:[^ false].
projectDir asFilename exists ifFalse:[^ false].
^ true
!
canLoadClassesFromRepository
|manager p moduleDir packageDir|
self hasClassesNodeSelected ifFalse:[^ false].
(p := self currentProject) isNil ifTrue:[^ false].
(moduleDir := p repositoryModule) size == 0 ifTrue:[^ false].
(packageDir := p repositoryDirectory) size == 0 ifTrue:[^ false].
"/ SourceCodeManager available ?
(AbstractSourceCodeManager notNil
and:[AbstractSourceCodeManager isLoaded not]) ifTrue:[
AbstractSourceCodeManager autoload.
].
AbstractSourceCodeManager isNil ifTrue:[^ false].
AbstractSourceCodeManager isLoaded ifFalse:[^ false].
(manager := Smalltalk at:#SourceCodeManager) isNil ifTrue:[^ false].
"/ does the repository contain the module/package ?
(manager checkForExistingModule:moduleDir package:packageDir) ifFalse:[^ false].
^ true
!
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
!
hasClassNodeSelected
|selectedNode|
selectedNode := self selectedTreeNode value.
selectedNode isNil ifTrue:[^ false].
^ selectedNode contents isAssociation
and:[selectedNode contents key == #class]
!
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 classIcon|
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].
classIcon := self class classIcon.
classesNode contents:#classes.
classesNode icon:(self class classesIcon).
((aProject classes ? #()) copy sort:[:a :b |
|nmA nmB|
nmA := a isSymbol ifTrue:[a] ifFalse:[a name].
nmB := b isSymbol ifTrue:[b] ifFalse:[b name].
nmA < nmB
])
do:[:aClass |
|cNode cName|
cName := aClass isSymbol ifTrue:[aClass] ifFalse:[aClass name].
cNode := ProjectTreeItem name:cName.
cNode contents:(#class -> aClass).
cNode icon:classIcon.
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 selectedTreeNode value contents == #comment ifTrue:[
self rightCanvasTextHolder value:p comment.
].
self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not.
self projectType value:(p type).
self projectDirectory value:(p directory).
self projectNamespace value:(p defaultNameSpace ? Smalltalk) name.
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.
self deliverLoadAllFile value:(p propertyAt:#deliverLoadAllFile) ? false.
self installDirectory value:(p propertyAt:#installDirectory) ? '/opt'.
modifiedChannel value:false.
p addDependent:self.
].
"Created: / 23.3.1999 / 14:16:12 / cg"
"Modified: / 23.3.1999 / 14:18:38 / cg"
!
saveAspectsIntoProject
|p s ns|
p := self currentProject.
p notNil ifTrue:[
p removeDependent:self.
"/ 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.
s := self projectNamespace value.
(s size == 0) ifTrue:[
ns := Smalltalk
] ifFalse:[
ns := Namespace name:s
].
p defaultNameSpace:ns.
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.
p propertyAt:#deliverLoadAllFile put:self deliverLoadAllFile value.
p propertyAt:#installDirectory put:self installDirectory value.
p addDependent:self.
].
"Created: / 23.3.1999 / 14:16:12 / cg"
"Modified: / 23.3.1999 / 14:18:38 / cg"
!
updateRightCanvas
|selectedNode nodeContents spec|
self selectedProjectInPrerequisites value:nil.
self selectedRequiredProjectInPrerequisites value:nil.
selectedNode := self selectedTreeNode value.
selectedNode isNil ifTrue:[
self setupCanvasForNoSelection.
^ self
].
(spec := selectedNode spec) notNil ifTrue:[
self currentCanvasHolder value:spec value.
^ 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 hasClassNodeSelected ifTrue:[
self showClassDefinitionOf: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.
modifiedChannel value:false.
!
addToPrerequisites
|sel|
sel := self selectedProjectInPrerequisites value.
self listOfRequiredProjectsInPrerequisites add:sel.
self listOfAllProjectsInPrerequisites remove:sel.
self selectedProjectInPrerequisites value:nil.
!
browseClasses
|ns p classes nBad|
p := self currentProject.
classes := p classes
collect:[:clsOrName |
|cls|
clsOrName isSymbol ifTrue:[
cls := Smalltalk at:clsOrName
] ifFalse:[
cls := clsOrName
].
cls
].
nBad := classes inject:0 into:[:sum :el | el isNil ifTrue:[sum+1] ifFalse:[sum]].
nBad ~~ 0 ifTrue:[
classes := classes select:[:cls | cls notNil].
self warn:('Oops - %1 classes could not be found.' bindWith:nBad).
].
SystemBrowser
browseClasses:classes title:('Classes in ' , p name) sort:true.
!
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.
].
!
loadClassesFromDirectory
"load all classes as contained in the project into the system"
|p ns cls|
p := self currentProject.
ns := p defaultNameSpace.
self withReadCursorDo:[
"/ read once ...
p classInfo do:[:clsInfo |
|clsName clsFileName|
clsName := clsInfo className.
clsFileName := clsInfo classFileName.
clsFileName isNil ifTrue:[clsFileName := clsName , '.st'].
clsName isSymbol ifTrue:[
cls := ns at:clsName.
cls isNil ifTrue:[
"/ ok - really not yet loaded.
Transcript showCR:'loading ' , (p directory asFilename construct:clsFileName) pathName , ' ...'.
Smalltalk fileIn:(p directory asFilename construct:clsFileName)
] ifFalse:[
self halt
].
] ifFalse:[
self halt
].
].
"/ read again; if the load order was not correct,
"/ this will fix things (i.e. nil superclasses ...)
p classInfo do:[:clsInfo |
|clsName clsFileName|
clsName := clsInfo className.
clsFileName := clsInfo classFileName.
clsFileName isNil ifTrue:[clsFileName := clsName , '.st'].
clsName isSymbol ifTrue:[
Transcript showCR:'loading ' , (p directory asFilename construct:clsFileName) pathName , ' ...'.
Smalltalk fileIn:(p directory asFilename construct:clsFileName)
] ifFalse:[
self halt
].
].
].
self halt.
!
loadFromProjectFile:aFilenameString
|newProject|
self withReadCursorDo:[
newProject := Project new loadFromProjectFile:aFilenameString.
newProject notNil ifTrue:[
self newProject:newProject
]
]
!
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.
"/ self projectTreeHolder selectNode:newNode.
"/ self projectTreeHolder expand:newNode.
!
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|
fn := Dialog
requestFileName:'filename:'
default:nil
ifFail:nil
pattern:'*.prj'
fromDirectory:(FileSelectionBox lastFileSelectionDirectory).
fn notNil ifTrue:[
self loadFromProjectFile:fn.
]
!
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
!
showClassDefinitionOf:anItem
|node className cls text|
self hasClassNodeSelected ifFalse:[^ self].
self currentCanvasHolder value:(self class rightCanvasSpecForEditableText).
node := self selectedTreeNode value.
className := node contents value.
cls := Smalltalk at:className.
cls isNil ifTrue:[
text := 'The class is not (yet) loaded'.
] ifFalse:[
text := cls definition
].
self rightCanvasTextHolder value:text.
!
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$'
! !