ToolApplicationModel subclass:#ProjectBrowser
instanceVariableNames:'projectTree modifiedChannel'
classVariableNames:'AlreadCheckedExistingModulesAndPackages'
poolDictionaries:''
category:'Interface-Smalltalk'
!
TreeItemWithImage subclass:#ProjectTreeItem
instanceVariableNames:'action spec info'
classVariableNames:''
poolDictionaries:''
privateIn:ProjectBrowser
!
ProjectBrowser::ProjectTreeItem subclass:#ProjectNode
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
privateIn:ProjectBrowser
!
!ProjectBrowser class methodsFor:'help specs'!
helpSpec
"This resource specification was automatically generated
by the UIHelpTool of ST/X."
"Do not manually edit this!! If it is corrupted,
the UIHelpTool may not be able to read the specification."
"
UIHelpTool openOnClass:ProjectBrowser
"
<resource: #help>
^super helpSpec addPairsFrom:#(
#accept
'Accept modifications made here.'
#appType
'An application - ie an executable program (and support files if any).'
#cancel
'Undo modifications made here.'
#defaultNamespace
'Namespace for new classes when created in the Browser.'
#deliverAsGZIP
'Package delivery into a gzip archive (for unix)'
#deliverAsTar
'Package delivery into a tar archive (for unix)'
#deliverAsZIP
'Package delivery into a zip archive (for win32)'
#deliverBinary
'Create and deliver a compiled binary (classLibrary) - only possible for the running systems architecture.'
#deliverLoadAll
'Deliver a loadAll script file, which files-In the other files.'
#deliverSource
'Include smalltalk sourceCode in the delivery.'
#includeSource
'Include smalltalk sourceCode in the delivery.'
#installDirMacOS
'The final install directory for MacOS deliveries.'
#installDirUnix
'The final install directory for UNIX deliveries.'
#installDirVMS
'The final install directory for VMS deliveries.'
#installDirWin32
'The final install directory for Win32 deliveries.'
#libType
'A classLibrary addOn (and support files if any)'
#packageID
'Package ID used to associate classes & methods to this project.'
#projectDir
'The projects directory.'
#repositoryDirectory
'The directory path below the module in the source-repository.'
#repositoryModule
'The module (top directory) in the source-repository.'
)
! !
!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@PD@A@PDA@P@@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@G0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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]
!
prerequisiteClassesIcon
<resource: #programImage>
^ self classesIcon
!
prerequisiteProjectsIcon
<resource: #programImage>
^ self projectsIcon
!
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"
!
projectsIcon
"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 projectsIcon inspect
ImageEditor openOnClass:self andSelector:#projectsIcon
"
<resource: #image>
^Icon
constantNamed:#'ProjectBrowser projectsIcon'
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"@@@@@"H"H"@ @@@"H"H"@"@@@@@@@@@"H@@BH"H"HBH @@H"H"H H"@@@"H"H"@"H@@BH"H"HBH @@H"H"H H @@@"H"H"@ @@@BH"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 132 255 128 128]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@G? ?>G?8??''?>_?9??''?>_?9??G?8_?A?8@@@@@@b') ; yourself); yourself]! !
!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 40 0 71 0 392 0 413 0)
#level: 0
#min: #(#Point 10 10)
#max: #(#Point 1280 1024)
#bounds: #(#Rectangle 40 71 393 414)
#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 140 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#CheckBoxSpec
#label: 'Compiled Binary'
#name: 'CheckBox1'
#layout: #(#LayoutFrame 0 0.0 10 0 0 0.5 32 0)
#activeHelpKey: #deliverBinary
#tabable: true
#model: #deliverCompiledBinary
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'Zip Archive'
#name: 'CheckBox2'
#layout: #(#LayoutFrame 0 0.5 10 0 0 1.0 32 0)
#activeHelpKey: #deliverAsZIP
#tabable: true
#model: #deliverZipArchive
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'GZip Archive (self extracting)'
#name: 'CheckBox3'
#layout: #(#LayoutFrame 0 0.5 38 0 0 1.0 60 0)
#activeHelpKey: #deliverAsGZIP
#tabable: true
#model: #deliverGZipArchive
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'Include Sources'
#name: 'CheckBox4'
#layout: #(#LayoutFrame 0 0.0 39 0 0 0.5 61 0)
#activeHelpKey: #deliverSource
#tabable: true
#model: #deliverSources
#translateLabel: true
)
#(#CheckBoxSpec
#label: 'loadAll-File'
#name: 'CheckBox5'
#layout: #(#LayoutFrame 0 0.0 67 0 0 0.5 89 0)
#activeHelpKey: #deliverLoadAll
#tabable: true
#model: #deliverLoadAllFile
#translateLabel: true
)
)
)
)
#(#FramedBoxSpec
#label: 'Install Directory'
#name: 'FramedBox2'
#layout: #(#LayoutFrame 0 0.0 140 0 0 1.0 293 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#LabelSpec
#label: 'Unix:'
#name: 'Label1'
#layout: #(#LayoutFrame 0 0.0 5 0 60 0.0 27 0)
#translateLabel: true
#adjust: #right
)
#(#InputFieldSpec
#name: 'EntryField1'
#layout: #(#LayoutFrame 64 0.0 4 0 0 1.0 26 0)
#activeHelpKey: #installDirUnix
#enableChannel: #canDeliverForUnix
#tabable: true
#model: #installDirectoryUnix
#acceptChannel: #acceptChannel
#modifiedChannel: #modifiedChannel
)
#(#LabelSpec
#label: 'Win32:'
#name: 'Label2'
#layout: #(#LayoutFrame 0 0.0 36 0 60 0.0 58 0)
#translateLabel: true
#adjust: #right
)
#(#InputFieldSpec
#name: 'EntryField2'
#layout: #(#LayoutFrame 64 0.0 34 0 0 1.0 56 0)
#activeHelpKey: #installDirWin32
#enableChannel: #canDeliverForWin32
#tabable: true
#model: #installDirectoryWin32
#acceptChannel: #acceptChannel
#modifiedChannel: #modifiedChannel
)
#(#LabelSpec
#label: 'VMS:'
#name: 'Label3'
#layout: #(#LayoutFrame 0 0.0 65 0 60 0.0 87 0)
#translateLabel: true
#adjust: #right
)
#(#InputFieldSpec
#name: 'EntryField3'
#layout: #(#LayoutFrame 64 0.0 63 0 0 1.0 85 0)
#activeHelpKey: #installDirVMS
#initiallyDisabled: true
#enableChannel: #canDeliverForVMS
#tabable: true
#model: #installDirectoryVMS
#acceptChannel: #acceptChannel
#modifiedChannel: #modifiedChannel
)
#(#LabelSpec
#label: 'MacOS:'
#name: 'Label4'
#layout: #(#LayoutFrame 0 0.0 95 0 60 0.0 117 0)
#translateLabel: true
#adjust: #right
)
#(#InputFieldSpec
#name: 'EntryField4'
#layout: #(#LayoutFrame 64 0.0 93 0 0 1.0 115 0)
#activeHelpKey: #installDirMacOS
#initiallyDisabled: true
#enableChannel: #canDeliverForMacOS
#tabable: true
#model: #installDirectoryMac
#acceptChannel: #acceptChannel
#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
#name: #rightCanvasSpecForPatchesList
#window:
#(#WindowSpec
#label: 'NewApplication'
#name: 'NewApplication'
#min: #(#Point 10 10)
#max: #(#Point 1280 1024)
#bounds: #(#Rectangle 16 49 316 349)
)
#component:
#(#SpecCollection
#collection: #(
#(#DataSetSpec
#name: 'patchesTable'
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
#model: #selectedPatch
#menu: #menu
#hasHorizontalScrollBar: true
#hasVerticalScrollBar: true
#dataList: #patchesList
#has3Dsepartors: false
#columnHolder: #patchesTableColumns
#columnAdaptor: #classTableAdaptor
)
)
)
)
!
rightCanvasSpecForPrerequisiteClasses
"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:#rightCanvasSpecForPrerequisiteClasses
ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisiteClasses
"
<resource: #canvas>
^
#(#FullSpec
#name: #rightCanvasSpecForPrerequisiteClasses
#window:
#(#WindowSpec
#label: 'NewApplication'
#name: 'NewApplication'
#layout: #(#LayoutFrame 220 0 200 0 519 0 499 0)
#level: 0
#min: #(#Point 10 10)
#max: #(#Point 1280 1024)
#bounds: #(#Rectangle 220 200 520 500)
#usePreferredExtent: false
#returnIsOKInDialog: true
#escapeIsCancelInDialog: true
)
#component:
#(#SpecCollection
#collection: #(
#(#LabelSpec
#label: 'Known Classes'
#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: #selectedClassInPrerequisites
#hasHorizontalScrollBar: true
#hasVerticalScrollBar: true
#miniScrollerHorizontal: true
#miniScrollerVertical: true
#doubleClickSelector: #addClassToPrerequisites
#valueChangeSelector: #showInfoForRequiredClass:
#useIndex: false
#sequenceList: #listOfAllClassesInPrerequisites
)
#(#LabelSpec
#label: 'Required Classes'
#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: #selectedRequiredClassInPrerequisites
#hasHorizontalScrollBar: true
#hasVerticalScrollBar: true
#miniScrollerHorizontal: true
#miniScrollerVertical: true
#doubleClickSelector: #removeClassFromPrerequisites
#valueChangeSelector: #showInfoForRequiredClass:
#useIndex: false
#sequenceList: #listOfRequiredClassesInPrerequisites
)
#(#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: #addClassToPrerequisites
#enableChannel: #canAddSelectedClassToPrerequisites
#actionValue: ''
#useDefaultExtent: true
)
#(#ActionButtonSpec
#label: 'Remove'
#name: 'removeButton'
#translateLabel: true
#resizeForLabel: false
#tabable: true
#model: #removeClassFromPrerequisites
#enableChannel: #canRemoveSelectedClassFromPrerequisites
#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
)
)
)
)
)
)
)
!
rightCanvasSpecForPrerequisiteProjects
"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:#rightCanvasSpecForPrerequisiteProjects
ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisiteProjects
"
<resource: #canvas>
^
#(#FullSpec
#name: #rightCanvasSpecForPrerequisiteProjects
#window:
#(#WindowSpec
#label: 'NewApplication'
#name: 'NewApplication'
#layout: #(#LayoutFrame 220 0 200 0 519 0 499 0)
#level: 0
#min: #(#Point 10 10)
#max: #(#Point 1280 1024)
#bounds: #(#Rectangle 220 200 520 500)
#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
#doubleClickSelector: #addProjectToPrerequisites
#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
#doubleClickSelector: #removeProjectFromPrerequisites
#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: #addProjectToPrerequisites
#enableChannel: #canAddSelectedProjectToPrerequisites
#actionValue: ''
#useDefaultExtent: true
)
#(#ActionButtonSpec
#label: 'Remove'
#name: 'removeButton'
#translateLabel: true
#resizeForLabel: false
#tabable: true
#model: #removeProjectFromPrerequisites
#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 119 0 158 0 479 0 520 0)
#level: 0
#min: #(#Point 10 10)
#max: #(#Point 1280 1024)
#bounds: #(#Rectangle 119 158 480 521)
#usePreferredExtent: false
#returnIsOKInDialog: true
#escapeIsCancelInDialog: true
)
#component:
#(#SpecCollection
#collection: #(
#(#FramedBoxSpec
#label: 'Project Type'
#name: 'FramedBox1'
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 61 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#RadioButtonSpec
#label: 'Application'
#name: 'RadioButton1'
#layout: #(#LayoutFrame -1 0.0 5 0 0 0.5 27 0)
#activeHelpKey: #appType
#translateLabel: true
#model: #projectType
#isTriggerOnDown: true
#select: #application
)
#(#RadioButtonSpec
#label: 'Class Library'
#name: 'RadioButton2'
#layout: #(#LayoutFrame 0 0.5 5 0 0 1.0 27 0)
#activeHelpKey: #libType
#translateLabel: true
#model: #projectType
#isTriggerOnDown: true
#select: #library
)
)
)
)
#(#FramedBoxSpec
#label: 'Project Directory'
#name: 'FramedBox2'
#layout: #(#LayoutFrame 0 0.0 62 0.0 0 1.0 122 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#InputFieldSpec
#name: 'EntryField1'
#layout: #(#LayoutFrame 0 0.0 1 0 0 1.0 23 0)
#activeHelpKey: #projectDir
#enableChannel: #currentProjectWasNotLoadedFromFile
#model: #projectDirectory
#acceptChannel: #acceptChannel
#modifiedChannel: #modifiedChannel
)
)
)
)
#(#FramedBoxSpec
#label: 'Projects Package ID'
#name: 'FramedBox5'
#layout: #(#LayoutFrame 0 0.0 127 0.0 0 1.0 187 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#InputFieldSpec
#name: 'EntryField5'
#layout: #(#LayoutFrame 0 0.0 1 0 0 1.0 23 0)
#activeHelpKey: #packageID
#model: #projectPackage
#acceptChannel: #acceptChannel
#modifiedChannel: #modifiedChannel
)
)
)
)
#(#FramedBoxSpec
#label: 'Repository'
#name: 'FramedBox3'
#layout: #(#LayoutFrame 0 0.0 191 0.0 0 1.0 274 0)
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#LabelSpec
#label: 'Module:'
#name: 'Label1'
#layout: #(#LayoutFrame 0 0 0 0 86 0 22 0)
#translateLabel: true
#adjust: #right
)
#(#InputFieldSpec
#name: 'EntryField2'
#layout: #(#LayoutFrame 92 0.0 0 0 0 1.0 22 0)
#activeHelpKey: #repositoryModule
#model: #repositoryModule
#acceptChannel: #acceptChannel
#modifiedChannel: #modifiedChannel
)
#(#LabelSpec
#label: 'Directory:'
#name: 'Label2'
#layout: #(#LayoutFrame 0 0 25 0 86 0 47 0)
#translateLabel: true
#adjust: #right
)
#(#InputFieldSpec
#name: 'EntryField3'
#layout: #(#LayoutFrame 92 0.0 25 0 0 1.0 47 0)
#activeHelpKey: #repositoryDirectory
#model: #repositoryDirectory
#acceptChannel: #acceptChannel
#modifiedChannel: #modifiedChannel
)
)
)
)
#(#FramedBoxSpec
#label: 'Default Namespace'
#name: 'FramedBox4'
#layout: #(#LayoutFrame 0 0.0 279 0 0 1.0 337 0)
#activeHelpKey: #defaultNamespace
#labelPosition: #topLeft
#translateLabel: true
#component:
#(#SpecCollection
#collection: #(
#(#InputFieldSpec
#name: 'EntryField4'
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 22 0)
#model: #projectNamespace
#acceptChannel: #acceptChannel
#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'
#activeHelpKey: #cancel
#translateLabel: true
#model: #cancel
#enableChannel: #modifiedChannel
#actionValue: ''
#useDefaultExtent: true
)
#(#ActionButtonSpec
#label: 'OK'
#name: 'Button2'
#activeHelpKey: #accept
#translateLabel: true
#model: #accept
#enableChannel: #modifiedChannel
#useDefaultExtent: true
)
)
)
)
)
)
)
!
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 220 0 116 0 783 0 590 0)
#level: 0
#min: #(#Point 10 10)
#max: #(#Point 1024 768)
#bounds: #(#Rectangle 220 116 784 591)
#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: #selectedTreeNodeHolder
#menu: #itemMenuHolder
#performer: #itemMenuPerformer
#hasHorizontalScrollBar: true
#hasVerticalScrollBar: true
#miniScrollerHorizontal: true
#showRoot: false
#showDirectoryIndicatorForRoot: false
#showDirectoryIndicator: true
#valueChangeSelector: #itemSelected:
#doubleClickSelector: #itemDoubleClicked:
#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: 'Add Classes from files found in directory'
#translateLabel: true
#value: #addClassesFromFilesInDirectory
#enabled: #hasClassesSelectedHolder
)
#(#MenuItem
#label: 'Add Classes from files found in directory if present in image'
#translateLabel: true
#value: #addClassesFromFilesInDirectoryIfPresentInImage
#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: 'New'
#translateLabel: true
#value: #newProject
)
#(#MenuItem
#label: 'Load From...'
#translateLabel: true
#value: #openProject
)
#(#MenuItem
#label: '-'
)
#(#MenuItem
#label: 'Save'
#translateLabel: true
#value: #saveProject
#enabled: #hasProjectSelectedAndProjectFilenameHolder
)
#(#MenuItem
#label: '-'
)
#(#MenuItem
#label: 'Exit'
#translateLabel: true
#value: #closeRequest
)
)
nil
nil
)
)
#(#MenuItem
#label: 'View'
#translateLabel: true
#submenu:
#(#Menu
#(
#(#MenuItem
#label: 'Current Project'
#translateLabel: true
#choice: #showWhat
#choiceValue: #current
)
#(#MenuItem
#label: 'Non BaseSystem Projects'
#translateLabel: true
#choice: #showWhat
#choiceValue: #userProjects
)
#(#MenuItem
#label: 'All Projects'
#translateLabel: true
#choice: #showWhat
#choiceValue: #all
)
#(#MenuItem
#label: '-'
)
#(#MenuItem
#label: 'Update'
#translateLabel: true
#value: #updateListOfProjects
)
)
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: 'Browse'
#translateLabel: true
#value: #browseMethod
)
#(#MenuItem
#label: 'Browse Full'
#translateLabel: true
#value: #browseMethodFull
)
)
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
)
!
prerequisiteClassesItemMenu
"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:#prerequisiteClassesItemMenu
(Menu new fromLiteralArrayEncoding:(ProjectBrowser prerequisiteClassesItemMenu)) startUp
"
<resource: #menu>
^
#(#Menu
#(
#(#MenuItem
#label: 'Update'
#translateLabel: true
#value: #updateListOfRequiredPrerequisiteClasses
#enabled: #hasClassesSelectedHolder
)
)
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: 'Inspect'
#translateLabel: true
#value: #inspectCurrentProject
#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
#menu: #patchesMethodMenu
#model: #classNameFromPatchesInfo:
#doubleClickedSelector: #methodPatchDoubleClick:
#canSelect: false
)
#(#DataSetColumnSpec
#label: 'Selector'
#id: 'selectorColumn'
#labelAlignment: #left
#model: #selectorFromPatchesInfo:
#canSelect: false
)
)
! !
!ProjectBrowser methodsFor:'accessing'!
selectedTreeNode
"automatically generated by UIPainter ..."
^ self selectedTreeNodeHolder value
! !
!ProjectBrowser methodsFor:'aspects'!
acceptChannel
|holder|
(holder := builder bindingAt:#acceptChannel) isNil ifTrue:[
holder := false asValue.
builder aspectAt:#acceptChannel put:holder.
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
browseClass
|node classOrClassName cls|
self hasClassNodeSelected ifFalse:[^ self].
node := self selectedTreeNode.
classOrClassName := node contents value.
classOrClassName isBehavior ifTrue:[
cls := classOrClassName.
] ifFalse:[
cls := Smalltalk at:classOrClassName.
].
cls isNil ifTrue:[
self information:'The class is not (yet) loaded'.
^ self.
].
cls isLoaded ifFalse:[
self information:'The class is an autoloaded class.'.
].
SystemBrowser openInClass:cls selector:nil.
!
canAddSelectedClassToPrerequisites
|holder|
(holder := builder bindingAt:#canAddSelectedClassToPrerequisites) isNil ifTrue:[
holder := BlockValue
with:[:m | self canAddClassToPrerequisites:m]
argument:(self selectedClassInPrerequisites).
builder aspectAt:#canAddSelectedClassToPrerequisites put:holder.
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
canAddSelectedProjectToPrerequisites
|holder|
(holder := builder bindingAt:#canAddSelectedProjectToPrerequisites) isNil ifTrue:[
holder := BlockValue
with:[:m | self canAddProjectToPrerequisites:m]
argument:(self selectedProjectInPrerequisites).
builder aspectAt:#canAddSelectedProjectToPrerequisites put:holder.
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
canDeliverBinaryForMacOS
^ OperatingSystem platformName == #macOS
!
canDeliverBinaryForUnix
^ OperatingSystem platformName == #unix
!
canDeliverBinaryForVMS
^ OperatingSystem platformName == #vms
!
canDeliverBinaryForWin32
^ OperatingSystem platformName == #win32
!
canDeliverForMacOS
|holder|
(holder := builder bindingAt:#canDeliverForMacOS) isNil ifTrue:[
holder := BlockValue
with:[:a1 :a2 | a1 or:[a2 not]]
arguments:(Array
with:self canDeliverBinaryForMacOS
with:self deliverCompiledBinary).
builder aspectAt:#canDeliverForMacOS put:holder.
].
^ holder.
!
canDeliverForUnix
|holder|
(holder := builder bindingAt:#canDeliverForUnix) isNil ifTrue:[
holder := BlockValue
with:[:a1 :a2 | a1 or:[a2 not]]
arguments:(Array
with:self canDeliverBinaryForUnix
with:self deliverCompiledBinary).
builder aspectAt:#canDeliverForUnix put:holder.
].
^ holder.
!
canDeliverForVMS
|holder|
(holder := builder bindingAt:#canDeliverForVMS) isNil ifTrue:[
holder := BlockValue
with:[:a1 :a2 | a1 or:[a2 not]]
arguments:(Array
with:self canDeliverBinaryForVMS
with:self deliverCompiledBinary).
builder aspectAt:#canDeliverForVMS put:holder.
].
^ holder.
!
canDeliverForWin32
|holder|
(holder := builder bindingAt:#canDeliverForWin32) isNil ifTrue:[
holder := BlockValue
with:[:a1 :a2 | a1 or:[a2 not]]
arguments:(Array
with:self canDeliverBinaryForWin32
with:self deliverCompiledBinary).
builder aspectAt:#canDeliverForWin32 put:holder.
].
^ holder.
!
canRemoveSelectedClassFromPrerequisites
|holder|
(holder := builder bindingAt:#canRemoveSelectedClassFromPrerequisites) isNil ifTrue:[
holder := BlockValue with:[:m | m notNil] argument:(self selectedRequiredClassInPrerequisites).
builder aspectAt:#canRemoveSelectedClassFromPrerequisites 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"
!
hasProjectSelectedAndProjectFilenameHolder
^ [ |dir|
dir := self projectDirectory value asFilename.
(dir exists and:[dir isDirectory]) ifTrue:[
self hasProjectSelectedHolder value
] ifFalse:[
false
]
].
!
hasProjectSelectedHolder
|holder|
(holder := builder bindingAt:#hasProjectSelectedHolder) isNil ifTrue:[
holder := false asValue.
builder aspectAt:#hasProjectSelectedHolder put:holder.
].
^ holder.
"Modified: / 26.4.1999 / 22:47:33 / cg"
!
hasSubProjectsSelectedHolder
^ [
self hasSubProjectsNodeSelected
]
!
htmlDocumentURLHolder
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#htmlDocumentURLHolder) isNil ifTrue:[
builder aspectAt:#htmlDocumentURLHolder put:(holder := ValueHolder new).
].
^ holder.
!
installDirectoryMacOS
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#installDirectoryMacOS) isNil ifTrue:[
builder aspectAt:#installDirectoryMacOS put:(holder := '' asValue).
holder onChangeSend:#value to:[modifiedChannel value:true].
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
installDirectoryUnix
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#installDirectoryUnix) isNil ifTrue:[
builder aspectAt:#installDirectoryUnix put:(holder := '/opt/smalltalk' asValue).
holder onChangeSend:#value to:[modifiedChannel value:true].
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
installDirectoryVMS
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#installDirectoryVMS) isNil ifTrue:[
builder aspectAt:#installDirectoryVMS put:(holder := '' asValue).
holder onChangeSend:#value to:[modifiedChannel value:true].
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
installDirectoryWin32
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#installDirectoryWin32) isNil ifTrue:[
builder aspectAt:#installDirectoryWin32 put:(holder := '\Programme\SmalltalkX' asValue).
holder onChangeSend:#value to:[modifiedChannel value:true].
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
listOfAllClassesInPrerequisites
|holder classes|
(holder := builder bindingAt:#listOfAllClassesInPrerequisites) isNil ifTrue:[
builder aspectAt:#listOfAllClassesInPrerequisites put:(holder := SortedCollection new asValue).
"/ all unloaded classes and classes which where
"/ loaded are candidates.
classes := Smalltalk allClasses
select:[:cls |
cls isMeta not
and:[
cls isLoaded not
or:[cls wasAutoloaded]]
].
"/ mark currently loaded classes as bold;
"/ LATER: those which are superclasses of any of my classes bold-red.
classes := classes collect:[:cls | |nm|
nm := cls name.
cls isLoaded ifTrue:[
nm := nm asText allBold.
].
nm
].
holder value addAll:classes.
self currentProject wasLoadedFromFile ifFalse:[
self updateListOfRequiredPrerequisiteClasses.
]
].
^ 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 := SortedCollection new asValue).
currentProject := self currentProject.
projects := Set new.
Project allInstancesDo:[:p |
(p ~~ currentProject
and:[p ~~ Project defaultProject]) ifTrue:[
projects add:p name.
]
].
holder value addAll:projects.
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
listOfRequiredClassesInPrerequisites
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#listOfRequiredClassesInPrerequisites) isNil ifTrue:[
builder aspectAt:#listOfRequiredClassesInPrerequisites put:(holder := SortedCollection new asValue).
self currentProject wasLoadedFromFile ifFalse:[
self updateListOfRequiredPrerequisiteClasses.
]
].
^ 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 := SortedCollection new asValue).
].
^ 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"
!
projectPackage
|holder dir module|
(holder := builder bindingAt:#projectPackage) isNil ifTrue:[
builder aspectAt:#projectPackage put:(holder := '' asValue).
].
holder value size == 0 ifTrue:[
(module := self repositoryModule value) notNil ifTrue:[
(dir := self repositoryDirectory value) notNil ifTrue:[
holder value:(module , ':' , dir)
]
]
].
^ 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.
!
selectedClassInPrerequisites
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#selectedClassInPrerequisites) isNil ifTrue:[
builder aspectAt:#selectedClassInPrerequisites put:(holder := ValueHolder new).
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
!
selectedPatch
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#selectedPatch) isNil ifTrue:[
builder aspectAt:#selectedPatch 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"
!
selectedRequiredClassInPrerequisites
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#selectedRequiredClassInPrerequisites) isNil ifTrue:[
builder aspectAt:#selectedRequiredClassInPrerequisites 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"
!
selectedTreeNodeHolder
"automatically generated by UIPainter ..."
|holder|
(holder := builder bindingAt:#selectedTreeNodeHolder) isNil ifTrue:[
builder aspectAt:#selectedTreeNodeHolder put:(holder := ValueHolder new).
].
^ holder.
!
showWhat
|holder|
(holder := builder bindingAt:#showWhat) isNil ifTrue:[
holder := ValueHolder with:#current.
builder aspectAt:#showWhat put:holder.
holder onChangeSend:#updateProjectTree to:self.
].
^ holder.
"Created: / 23.3.1999 / 14:18:05 / cg"
! !
!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 readAspectsFromProject.
].
"Modified: / 26.4.1999 / 23:39:04 / cg"
! !
!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
].
self hasPrerequisiteClassesNodeSelected ifTrue:[
^ self class prerequisiteClassesItemMenu
].
^ nil
!
itemMenuHolder
^ [ self itemMenu]
!
itemMenuPerformer
^ self
! !
!ProjectBrowser methodsFor:'private'!
canAddClassToPrerequisites:aClassName
^ aClassName notNil
!
canAddProjectToPrerequisites: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 ?
"/ since this is a slow operation (involving the CVS manager,
"/ remember checked modules here in a classVar
AlreadCheckedExistingModulesAndPackages isNil ifTrue:[
AlreadCheckedExistingModulesAndPackages := OrderedCollection new
].
AlreadCheckedExistingModulesAndPackages do:[:entry |
(entry at:1) = moduleDir ifTrue:[
(entry at:2) = packageDir ifTrue:[
^ true
]
]
].
(manager checkForExistingModule:moduleDir package:packageDir) ifFalse:[^ false].
AlreadCheckedExistingModulesAndPackages add:(Array with:moduleDir with:packageDir).
^ true
!
currentProject
|node|
node := self selectedTreeNode.
node isNil ifTrue:[^ nil].
[node notNil and:[node isProjectNode not]] whileTrue:[
node := node parent.
].
node notNil ifTrue:[
^ node contents
].
^ nil
!
currentProjectsClassNames
|p|
p := self currentProject.
^ (p classes ? #())
collect:[:classOrSymbol |
classOrSymbol isBehavior ifTrue:[
classOrSymbol name
] ifFalse:[
classOrSymbol
]
]
!
hasClassNodeSelected
|selectedNode|
selectedNode := self selectedTreeNode.
selectedNode isNil ifTrue:[^ false].
^ selectedNode contents isAssociation
and:[selectedNode contents key == #class]
!
hasClassesNodeSelected
|selectedNode|
selectedNode := self selectedTreeNode.
selectedNode isNil ifTrue:[^ false].
^ selectedNode contents == #classes
!
hasNodeSelected
^ self selectedTreeNode notNil
!
hasPrerequisiteClassesNodeSelected
|selectedNode|
selectedNode := self selectedTreeNode.
selectedNode isNil ifTrue:[^ false].
^ selectedNode contents == #prerequisiteClasses
!
hasProjectNodeSelected
|selectedNode|
selectedNode := self selectedTreeNode.
selectedNode isNil ifTrue:[^ false].
^ selectedNode isProjectNode
!
hasSubProjectsNodeSelected
|selectedNode|
selectedNode := self selectedTreeNode.
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
prerequisiteProjectsNode prerequisiteClassesNode|
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 info:'Some comment describing the project'.
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 icon:(self class prerequisitesIcon).
prerequisitesNode add:(prerequisiteProjectsNode := ProjectTreeItem name:'Projects').
prerequisitesNode add:(prerequisiteClassesNode := ProjectTreeItem name:'Classes').
prerequisitesNode info:'Other projects and classes required by the project'.
prerequisiteProjectsNode contents:#prerequisiteProjects.
prerequisiteProjectsNode icon:(self class prerequisiteProjectsIcon).
prerequisiteProjectsNode spec:[self class rightCanvasSpecForPrerequisiteProjects].
prerequisiteProjectsNode info:'Other projects required by the project'.
prerequisiteClassesNode contents:#prerequisiteClasses.
prerequisiteClassesNode icon:(self class prerequisiteClassesIcon).
prerequisiteClassesNode spec:[self class rightCanvasSpecForPrerequisiteClasses].
prerequisiteClassesNode info:'Other (autoloaded-) classes required by the project'.
classIcon := self class classIcon.
classesNode contents:#classes.
classesNode icon:(self class classesIcon).
classesNode info:'Classes contained in the project'.
((aProject classes ? #()) copy sort:[:a :b |
|nmA nmB|
nmA := a isBehavior ifTrue:[a name] ifFalse:[a].
nmB := b isBehavior ifTrue:[b name] ifFalse:[b].
nmA < nmB
])
do:[:aClass |
|cNode cName|
cName := aClass isBehavior ifTrue:[aClass name] ifFalse:[aClass].
cNode := ProjectTreeItem name:cName.
cNode contents:(#class -> aClass).
cNode icon:classIcon.
classesNode add:cNode.
].
propertiesNode contents:#properties.
propertiesNode spec:[self class rightCanvasSpecForProperties].
propertiesNode info:'Project propreties'.
filesNode contents:#files.
filesNode icon:(self class filesIcon).
filesNode info:'Other files (bitmaps, data) contained in the project'.
patchesNode contents:#patches.
patchesNode icon:(self class methodsIcon).
patchesNode info:'Patches (system-changes) contained in the project'.
deploymentNode icon:(self class deploymentIcon).
deploymentNode spec:[self class rightCanvasSpecForDeployment].
deploymentNode info:'Deployment & packaging specification.'.
^ pNode
"Modified: / 23.3.1999 / 14:27:30 / cg"
!
projectTree
projectTree isNil ifTrue:[
self updateProjectTree
].
^ projectTree
!
readAspectsFromProject
|p l|
p := self currentProject.
p notNil ifTrue:[
self selectedTreeNode 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 projectPackage value:(p packageName).
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 installDirectoryUnix
value:(p propertyAt:#installDirectoryUnix) ?
((p propertyAt:#installDirectory) ? '/opt/smalltalk').
self installDirectoryWin32
value:(p propertyAt:#installDirectoryWin32) ?
((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX').
"/ self installDirectoryVMS
"/ value:(p propertyAt:#installDirectoryVMS) ?
"/ ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX').
"/ self installDirectoryMacOS
"/ value:(p propertyAt:#installDirectoryMacOS) ?
"/ ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX').
l := p prerequisitePackages collect:[:entry |
|pName|
entry isString ifTrue:[
pName := entry
] ifFalse:[
entry isArray ifTrue:[
pName := entry at:1
] ifFalse:[
pName := entry name
]
]
].
self listOfRequiredProjectsInPrerequisites value:(l sort).
self listOfRequiredClassesInPrerequisites value:(p prerequisiteClasses copy sort).
modifiedChannel value:false.
p addDependent:self.
].
"Created: / 23.3.1999 / 14:16:12 / cg"
"Modified: / 26.4.1999 / 23:38:14 / cg"
!
saveAspectsIntoProject
|p s ns dir|
p := self currentProject.
p notNil ifTrue:[
p removeDependent:self.
self acceptChannel value:true; value:false.
"/ self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not.
p type:self projectType value.
dir := self projectDirectory value asFilename.
(dir exists and:[dir isDirectory]) ifFalse:[
self warn:'Invalid project directory: ' , dir pathName
].
p directory:self projectDirectory value.
p packageName:(self projectPackage value) asSymbol.
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:#installDirectoryUnix put:self installDirectoryUnix value.
p propertyAt:#installDirectoryWin32 put:self installDirectoryWin32 value.
p propertyAt:#installDirectoryVMS put:self installDirectoryVMS value.
p propertyAt:#installDirectoryMacOS put:self installDirectoryMacOS value.
p prerequisiteClasses:(self listOfRequiredClassesInPrerequisites value
collect:[:entry | entry string asSymbol]).
p addDependent:self.
].
"Created: / 23.3.1999 / 14:16:12 / cg"
"Modified: / 23.3.1999 / 14:18:38 / cg"
!
updateProjectTree
|tree root showWhat|
showWhat := self showWhat value.
tree := SelectionInTree new.
tree root:(root := TreeItem name:'invisibleRoot').
root hide:false.
showWhat == #current ifTrue:[
root add:(self nodeFor:Project current).
] ifFalse:[
(Project knownProjects asOrderedCollection
sort:[:a :b | a packageName < b packageName])
do:[:aProject |
|doShow|
(doShow := showWhat == #all) ifFalse:[
doShow := (aProject package startsWith:'stx:') not
].
doShow ifTrue:[
root add:(self nodeFor:aProject).
]
].
].
projectTree := root.
self projectTreeHolder root:projectTree.
^ projectTree
!
updateRightCanvas
|selectedNode nodeContents spec|
self builder bindings removeKey:#listOfAllClassesInPrerequisites ifAbsent:nil. "/ force recompute
self builder bindings removeKey:#listOfAllProjectsInPrerequisites ifAbsent:nil. "/ force recompute
self selectedProjectInPrerequisites value:nil.
self selectedRequiredProjectInPrerequisites value:nil.
selectedNode := self selectedTreeNode.
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'!
addClassesFromFilesInDirectory
self addClassesFromFilesInDirectoryWithFilter:nil
!
addClassesFromFilesInDirectoryIfPresentInImage
self addClassesFromFilesInDirectoryWithFilter:[:classOrName | classOrName isBehavior]
!
addClassesFromFilesInDirectoryWithFilter:aFilterBlockOrNil
|project existingClasses prjDirectory anyChange numSTFilesFound|
project := self currentProject.
existingClasses := project classInfo.
anyChange := false.
numSTFilesFound := 0.
prjDirectory := project directory asFilename.
(prjDirectory exists and:[prjDirectory isDirectory]) ifFalse:[
self warn:'Invalid project directory: ' , prjDirectory pathName.
^ self
].
prjDirectory directoryContents do:[:fn |
|f oldInfo cls|
f := prjDirectory construct:fn.
(f hasSuffix:'st') ifTrue:[
numSTFilesFound := numSTFilesFound + 1.
oldInfo := existingClasses
detect:[:clsInfo |
clsInfo classFileName = fn
]
ifNone:nil.
oldInfo isNil ifTrue:[
"/ extract className from fileName ...
cls := Smalltalk filenameAbbreviations keyAtValue:(f withoutSuffix baseName ).
cls isNil ifTrue:[
cls := f withoutSuffix baseName asSymbol.
project defaultNameSpace notNil ifTrue:[
cls := (project defaultNameSpace name , '::' , cls) asSymbol
]
].
(aFilterBlockOrNil isNil
or:[aFilterBlockOrNil value:cls]) ifTrue:[
project addClass:cls classFileName:fn.
anyChange := true.
Transcript showCR:'added ' , fn , ' as class: ' , cls printString.
] ifFalse:[
Transcript showCR:'skipped ' , fn , ' as class: ' , cls printString.
]
]
]
].
anyChange ifTrue:[
self updateClassListForProject:project
] ifFalse:[
numSTFilesFound == 0 ifTrue:[
self information:'No st-sourcefiles found in ' , prjDirectory pathName.
]
]
!
browseClasses
|ns p classes nBad uniqueClasses|
p := self currentProject.
classes := p classes
collect:[:clsOrName |
|cls realName|
clsOrName isSymbol ifTrue:[
realName := clsOrName.
(realName includes:$:) ifTrue:[
(realName startsWith:'Smalltalk::') ifTrue:[
realName := (realName copyFrom:'Smalltalk::' size + 1) asSymbol
]
].
cls := Smalltalk at:realName
] ifFalse:[
cls := clsOrName
].
cls
].
"/ remove duplicates - but want to preserve order
"/ thats why we do not use asIdentitySet asOrderedCollection
uniqueClasses := OrderedCollection new.
classes do:[:cls | (uniqueClasses includesIdentical:cls) ifFalse:[uniqueClasses add: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.\\You should probably load them first.' bindWith:nBad) withCRs.
].
SystemBrowser
browseClasses:classes title:('Classes in ' , p name) sort:true.
!
buildAll
|p deliverLoadAllFile|
p := self currentProject.
p isNil ifTrue:[
self information:'No project selected'.
^ self
].
deliverLoadAllFile := p propertyAt:#deliverLoadAllFile.
deliverLoadAllFile ifTrue:[
p createLoadAllFile
].
!
inspectCurrentProject
"make the selected Project the current project"
|project selectedNode|
self hasProjectNodeSelected ifTrue:[
selectedNode := self selectedTreeNode.
project := selectedNode contents.
project inspect.
]
!
itemDoubleClicked:index
|node classOrClassName cls|
self hasClassNodeSelected ifTrue:[
node := self selectedTreeNode.
classOrClassName := node contents value.
classOrClassName isBehavior ifTrue:[
cls := classOrClassName.
] ifFalse:[
cls := Smalltalk at:classOrClassName.
].
cls isNil ifTrue:[
self information:'The class is not (yet) loaded'.
^ self
].
SystemBrowser browseClass:cls.
].
!
itemSelected:index
|item action|
self withWaitCursorDo:[
self updateRightCanvas.
].
self readAspectsFromProject.
item := self projectTreeHolder value at:index.
action := item action.
action notNil ifTrue:[
action value:item.
].
self valueOfInfoLabel value: item info.
self hasProjectSelectedHolder value:self hasProjectNodeSelected.
"Modified: / 26.4.1999 / 22:49:20 / cg"
!
loadClassesFromDirectory
"load all classes as contained in the project into the system"
self withReadCursorDo:[
self currentProject loadClassesFromProjectDirectory.
].
!
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.
project := selectedNode contents.
Project current:project.
self showWhat value == #current ifTrue:[
self updateProjectTree
]
]
!
methodPatchDoubleClick:arg
self halt.
!
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.
self readAspectsFromProject.
newProject wasLoadedFromFile ifFalse:[
self updateListOfRequiredPrerequisiteClasses.
]
!
newSubProject
|selectedNode subProjectsNode newNode parentProject newProject|
selectedNode := self selectedTreeNode.
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.
]
!
removeProject
|projectToRemove selectedNode subNode newNode parentNode parentProject newProject|
self hasProjectNodeSelected ifTrue:[
selectedNode := self selectedTreeNode.
projectToRemove := selectedNode contents.
(self confirm:'Really remove the project ?') ifTrue:[
self withExecuteCursorDo:[
self projectTreeHolder removeSelection.
projectToRemove removeFromSystem.
]
]
]
!
renameProject
|nm selectedNode selectedProject|
self hasProjectNodeSelected ifTrue:[
selectedNode := self selectedTreeNode.
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|
self modifiedChannel value ifTrue:[
(self confirm:'Changes not confirmed; save anyway ?') ifFalse:[^ self]
].
p := self currentProject.
p isNil ifTrue:[
self information:'Select a project first.'.
^self
].
p directory isNil ifTrue:[
d := (Dialog request:'Project Directory:').
d size == 0 ifTrue:[
^ self
].
p directory:d
].
self withCursor:Cursor write do:[
p saveAsProjectFile.
]
"Modified: / 26.4.1999 / 22:43:57 / cg"
!
selectionChangeAllowed:newNode
|answer|
newNode == self selectedTreeNode ifTrue:[
^ true
].
modifiedChannel value ifTrue:[
answer := Dialog confirmWithCancel:'Accept changes ?'.
answer isNil ifTrue:[
^ false
].
answer == true ifTrue:[
self accept.
].
].
^ true
!
showClassDefinitionOf:anItem
|node classOrClassName cls text|
self hasClassNodeSelected ifFalse:[^ self].
self currentCanvasHolder value:(self class rightCanvasSpecForEditableText).
node := self selectedTreeNode.
classOrClassName := node contents value.
classOrClassName isBehavior ifTrue:[
cls := classOrClassName.
] ifFalse:[
cls := Smalltalk at:classOrClassName.
].
cls isNil ifTrue:[
text := 'The class is not (yet) loaded'.
] ifFalse:[
text := cls definition
].
self rightCanvasTextHolder value:text.
!
showClassListOf:anItem
|projectItem project|
projectItem := anItem parent.
project := projectItem contents.
self updateClassListForProject:project.
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 |
|w1Nm w2Nm|
w1Nm := w1 methodClass name.
w2Nm := w2 methodClass name.
w1Nm < w2Nm ifTrue:[
true
] ifFalse:[
w1Nm = w2Nm 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.
!
updateClassListForProject:aProject
|classInfo l|
classInfo := aProject classInfo copy asOrderedCollection.
classInfo sort:[:a :b | a className < b className].
l := self classList.
l removeAll.
l addAll:classInfo.
!
updateListOfProjects
"scan all classes/methods for new projects"
self withWaitCursorDo:[
Project initKnownProjects.
self updateProjectTree
].
!
updateListOfRequiredPrerequisiteClasses
"all autoloaded superclasses of my classes are definitely required"
|p anyChange allInPre requiredInPre nTotal nMissing msg|
p := self currentProject.
p isNil ifTrue:[^ self].
anyChange := false.
nTotal := 0.
nMissing := 0.
allInPre := self listOfAllClassesInPrerequisites value.
requiredInPre := self listOfRequiredClassesInPrerequisites value.
self currentProjectsClassNames do:[:aClassName |
|cls|
cls := Smalltalk at:aClassName asSymbol.
(cls notNil and:[cls isLoaded]) ifTrue:[
cls allSuperclasses do:[:superClass |
|sName idx|
(superClass notNil
and:[superClass isLoaded
and:[superClass wasAutoloaded]]) ifTrue:[
|sName entry|
sName := superClass name.
idx := allInPre findFirst:[:item | item string = sName].
idx ~~ 0 ifTrue:[
allInPre removeIndex:idx.
requiredInPre add:sName asText allBold.
anyChange := true.
]
]
]
] ifFalse:[
nMissing := nMissing + 1.
].
nTotal := nTotal + 1.
].
anyChange ifTrue:[
self listOfRequiredClassesInPrerequisites changed.
self listOfAllClassesInPrerequisites changed.
].
nMissing ~~ 0 ifTrue:[
nMissing == nTotal ifTrue:[
msg := 'Project is not loaded (' , nMissing printString
, ' unloaded classes)'.
] ifFalse:[
msg := 'Project is not loaded completely - ' , nMissing printString
, ' of the projects ' , nTotal printString , ' classes are not loaded'.
].
"/ self notify:msg.
].
modifiedChannel value:false.
! !
!ProjectBrowser methodsFor:'user actions - canvas'!
accept
"save values from aspects into the project"
self saveAspectsIntoProject.
modifiedChannel value:false.
!
addClassToPrerequisites
|sel cls|
sel := self selectedClassInPrerequisites value.
self listOfRequiredClassesInPrerequisites value add:sel.
self listOfAllClassesInPrerequisites value remove:sel.
self selectedClassInPrerequisites value:nil.
"/ also add any autoloaded superclass(es)
cls := Smalltalk at:sel asSymbol.
(cls notNil and:[cls isLoaded]) ifTrue:[
cls allSuperclasses do:[:superClass |
|sName|
(superClass notNil
and:[superClass isLoaded
and:[superClass wasAutoloaded]]) ifTrue:[
|sName idx|
sName := superClass name.
idx := self listOfAllClassesInPrerequisites value findFirst:[:s | s string = sName].
idx ~~ 0 ifTrue:[
self listOfAllClassesInPrerequisites value removeIndex:idx.
self listOfRequiredClassesInPrerequisites value add:sName asString allBold.
].
]
]
].
self listOfRequiredClassesInPrerequisites changed.
self listOfAllClassesInPrerequisites changed.
self accept
!
addProjectToPrerequisites
|sel|
sel := self selectedProjectInPrerequisites value.
self listOfRequiredProjectsInPrerequisites value add:sel.
self listOfAllProjectsInPrerequisites value remove:sel.
self selectedProjectInPrerequisites value:nil.
self listOfRequiredProjectsInPrerequisites changed.
self listOfAllProjectsInPrerequisites changed.
self accept
!
browseMethod
"browse the selected table-rows method (from patches canvas)"
|patchWho patchIndex|
patchIndex := self selectedPatch value.
patchWho := self patchesList at:patchIndex.
SystemBrowser browseClass:patchWho methodClass selector:patchWho methodSelector.
!
browseMethodFull
"browse the selected table-rows method (from patches canvas)"
|patchWho patchIndex|
patchIndex := self selectedPatch value.
patchWho := self patchesList at:patchIndex.
SystemBrowser openInClass:patchWho methodClass selector:patchWho methodSelector.
!
cancel
"reload aspects from the project"
self readAspectsFromProject
!
removeClassFromPrerequisites
|sel cls myClasses|
sel := self selectedRequiredClassInPrerequisites value.
cls := Smalltalk at:sel asSymbol.
"/ check if this affects my classes
(cls notNil and:[cls isLoaded and:[cls wasAutoloaded]]) ifTrue:[
myClasses := self currentProjectsClassNames.
cls allSubclassesDo:[:cls |
(myClasses includes:cls name) ifTrue:[
self valueOfInfoLabel value:'Attention - this class is required by ' , cls name.
(self confirm:'Attention - this class is required by ' , cls name asText allBold, '.\(The project could later fail to load correctly)\\Really remove ?' withCRs) ifFalse:[
^ self
].
].
]
].
self listOfAllClassesInPrerequisites value add:sel.
self listOfRequiredClassesInPrerequisites value remove:sel.
self selectedRequiredClassInPrerequisites value:nil.
"/ also remove any autoloaded subclass(es)
(cls notNil and:[cls isLoaded and:[cls wasAutoloaded]]) ifTrue:[
cls allSubclassesDo:[:cls |
|entry|
entry := self listOfRequiredClassesInPrerequisites value remove:cls name ifAbsent:nil.
entry notNil ifTrue:[
self listOfAllClassesInPrerequisites value add:cls name.
]
]
].
self listOfRequiredClassesInPrerequisites changed.
self listOfAllClassesInPrerequisites changed.
self accept
!
removeProjectFromPrerequisites
|sel|
sel := self selectedRequiredProjectInPrerequisites value.
self listOfAllProjectsInPrerequisites value add:sel.
self listOfRequiredProjectsInPrerequisites value remove:sel.
self selectedRequiredProjectInPrerequisites value:nil.
self listOfRequiredProjectsInPrerequisites changed.
self listOfAllProjectsInPrerequisites changed.
self accept
!
showInfoForRequiredClass:entry
"show why a class is required"
|cls myClasses|
entry notNil ifTrue:[
myClasses := self currentProjectsClassNames asSet.
cls := Smalltalk at:entry string asSymbol.
cls allSubclasses do:[:subClass |
(myClasses includes:subClass name) ifTrue:[
self valueOfInfoLabel value:('Required by ' , subClass name).
^ self.
]
].
].
self valueOfInfoLabel value:nil
! !
!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.!
info
"return the value of the instance variable 'info' (automatically generated)"
^ info!
info:something
"set the value of the instance variable 'info' (automatically generated)"
info := 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$'
! !