# HG changeset patch # User Claus Gittinger # Date 920222101 -3600 # Node ID 8414736f88460bff8c84eaed0960958b77c96e4e # Parent 10adcd590f2aad85c59673b5502c7ce11241539c checkin from browser diff -r 10adcd590f2a -r 8414736f8846 ProjectBrowser.st --- a/ProjectBrowser.st Sat Feb 27 14:45:35 1999 +0100 +++ b/ProjectBrowser.st Sun Feb 28 18:15:01 1999 +0100 @@ -203,6 +203,53 @@ ) ! +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 + " + + + + ^ + + #(#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 + ) + ) + ) + ) +! + rightCanvasSpecForReadOnlyText "This resource specification was automatically generated by the UIPainter of ST/X." @@ -595,6 +642,36 @@ #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 + " + + + + + ^ #( + #(#DataSetColumnSpec + #label: 'Class' + #id: 'classColumn' + #labelAlignment: #left + #model: #classNameFromPatchesInfo: + ) + #(#DataSetColumnSpec + #label: 'Selector' + #id: 'selectorColumn' + #labelAlignment: #left + #model: #selectorFromPatchesInfo: + ) + ) ! ! !ProjectBrowser methodsFor:'aspects'! @@ -664,6 +741,21 @@ ^ holder. ! +patchesList + "automatically generated by UIPainter ..." + + "*** the code below creates a default model when invoked." + "*** (which may not be the one you wanted)" + "*** Please change as required and accept in the browser." + + |holder| + + (holder := builder bindingAt:#patchesList) isNil ifTrue:[ + builder aspectAt:#patchesList put:(holder := List new). + ]. + ^ holder. +! + projectTreeHolder "automatically generated by UIPainter ..." @@ -769,8 +861,9 @@ "generate and return a treeNode for some project" |projectName pNode - propertiesNode docNode classesNode subprojectsNode filesNode - commentNode prerequisitesNode| + propertiesNode docNode classesNode patchesNode subprojectsNode filesNode + commentNode prerequisitesNode analysisNode designNode codeNode + userDocNode userOverViewNode userGuideNode userRefManNode| projectName := aProject name. pNode := ProjectNode name:projectName. @@ -779,9 +872,10 @@ pNode add:(commentNode := ProjectTreeItem name:'Comment'). pNode add:(docNode := ProjectTreeItem name:'Documentation'). pNode add:(propertiesNode := ProjectTreeItem name:'Properties'). - pNode add:(classesNode := ProjectTreeItem name:'Classes'). 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'). aProject subProjects do:[:aSubProject | @@ -794,16 +888,35 @@ 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. + classesNode contents:#classes. + ((aProject classes ? #()) copy sort:[:a :b | a name < b name]) + do:[:aClass | + |cNode| + + cNode := ProjectTreeItem name:aClass name. + classesNode add:cNode. + ]. propertiesNode contents:#properties. - prerequisitesNode contents:#prerequisites. - subprojectsNode contents:#subprojects. filesNode contents:#files. + patchesNode contents:#patches. + ^ pNode ! @@ -842,6 +955,11 @@ self showClassListOf:selectedNode. ^ self. ]. + selectedNode contents == #patches ifTrue:[ + self showPatchesListOf:selectedNode. + ^ self. + ]. + self currentCanvasHolder value:(self class emptyRightCanvasSpec). self rightCanvasTextHolder value:''. @@ -860,6 +978,14 @@ classNameFromClassInfo:cInfo ^ cInfo className +! + +classNameFromPatchesInfo:pInfo + ^ pInfo methodClass name +! + +selectorFromPatchesInfo:pInfo + ^ pInfo methodSelector ! ! !ProjectBrowser methodsFor:'user actions'! @@ -1022,6 +1148,33 @@ 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.