ProjectBrowser.st
changeset 1149 00b17864e6ef
parent 1148 3e42f8601522
child 1206 25053439af63
equal deleted inserted replaced
1148:3e42f8601522 1149:00b17864e6ef
   727         #name: #rightCanvasSpecForPrerequisiteClasses
   727         #name: #rightCanvasSpecForPrerequisiteClasses
   728         #window: 
   728         #window: 
   729        #(#WindowSpec
   729        #(#WindowSpec
   730           #label: 'NewApplication'
   730           #label: 'NewApplication'
   731           #name: 'NewApplication'
   731           #name: 'NewApplication'
   732           #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
   732           #layout: #(#LayoutFrame 220 0 200 0 519 0 499 0)
   733           #level: 0
   733           #level: 0
   734           #min: #(#Point 10 10)
   734           #min: #(#Point 10 10)
   735           #max: #(#Point 1280 1024)
   735           #max: #(#Point 1280 1024)
   736           #bounds: #(#Rectangle 216 173 516 473)
   736           #bounds: #(#Rectangle 220 200 520 500)
   737           #usePreferredExtent: false
   737           #usePreferredExtent: false
   738           #returnIsOKInDialog: true
   738           #returnIsOKInDialog: true
   739           #escapeIsCancelInDialog: true
   739           #escapeIsCancelInDialog: true
   740         )
   740         )
   741         #component: 
   741         #component: 
   818               )
   818               )
   819             )
   819             )
   820            #(#HorizontalPanelViewSpec
   820            #(#HorizontalPanelViewSpec
   821               #name: 'HorizontalPanel1'
   821               #name: 'HorizontalPanel1'
   822               #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0)
   822               #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0)
   823               #initiallyInvisible: true
       
   824               #horizontalLayout: #fitSpace
   823               #horizontalLayout: #fitSpace
   825               #verticalLayout: #center
   824               #verticalLayout: #center
   826               #horizontalSpace: 3
   825               #horizontalSpace: 3
   827               #verticalSpace: 3
   826               #verticalSpace: 3
   828               #component: 
   827               #component: 
   873         #name: #rightCanvasSpecForPrerequisiteProjects
   872         #name: #rightCanvasSpecForPrerequisiteProjects
   874         #window: 
   873         #window: 
   875        #(#WindowSpec
   874        #(#WindowSpec
   876           #label: 'NewApplication'
   875           #label: 'NewApplication'
   877           #name: 'NewApplication'
   876           #name: 'NewApplication'
   878           #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
   877           #layout: #(#LayoutFrame 220 0 200 0 519 0 499 0)
   879           #level: 0
   878           #level: 0
   880           #min: #(#Point 10 10)
   879           #min: #(#Point 10 10)
   881           #max: #(#Point 1280 1024)
   880           #max: #(#Point 1280 1024)
   882           #bounds: #(#Rectangle 216 173 516 473)
   881           #bounds: #(#Rectangle 220 200 520 500)
   883           #usePreferredExtent: false
   882           #usePreferredExtent: false
   884           #returnIsOKInDialog: true
   883           #returnIsOKInDialog: true
   885           #escapeIsCancelInDialog: true
   884           #escapeIsCancelInDialog: true
   886         )
   885         )
   887         #component: 
   886         #component: 
   962               )
   961               )
   963             )
   962             )
   964            #(#HorizontalPanelViewSpec
   963            #(#HorizontalPanelViewSpec
   965               #name: 'HorizontalPanel1'
   964               #name: 'HorizontalPanel1'
   966               #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0)
   965               #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0)
   967               #initiallyInvisible: true
       
   968               #horizontalLayout: #fitSpace
   966               #horizontalLayout: #fitSpace
   969               #verticalLayout: #center
   967               #verticalLayout: #center
   970               #horizontalSpace: 3
   968               #horizontalSpace: 3
   971               #verticalSpace: 3
   969               #verticalSpace: 3
   972               #component: 
   970               #component: 
  1275         #name: #windowSpec
  1273         #name: #windowSpec
  1276         #window: 
  1274         #window: 
  1277        #(#WindowSpec
  1275        #(#WindowSpec
  1278           #label: 'ProjectBrowser'
  1276           #label: 'ProjectBrowser'
  1279           #name: 'ProjectBrowser'
  1277           #name: 'ProjectBrowser'
  1280           #layout: #(#LayoutFrame 216 0 173 0 779 0 563 0)
  1278           #layout: #(#LayoutFrame 220 0 116 0 783 0 590 0)
  1281           #level: 0
  1279           #level: 0
  1282           #min: #(#Point 10 10)
  1280           #min: #(#Point 10 10)
  1283           #max: #(#Point 1024 768)
  1281           #max: #(#Point 1024 768)
  1284           #bounds: #(#Rectangle 216 173 780 564)
  1282           #bounds: #(#Rectangle 220 116 784 591)
  1285           #menu: #mainMenu
  1283           #menu: #mainMenu
  1286           #usePreferredExtent: false
  1284           #usePreferredExtent: false
  1287           #returnIsOKInDialog: true
  1285           #returnIsOKInDialog: true
  1288           #escapeIsCancelInDialog: true
  1286           #escapeIsCancelInDialog: true
  1289         )
  1287         )
  2163         builder aspectAt:#htmlDocumentURLHolder put:(holder :=  ValueHolder new).
  2161         builder aspectAt:#htmlDocumentURLHolder put:(holder :=  ValueHolder new).
  2164     ].
  2162     ].
  2165     ^ holder.
  2163     ^ holder.
  2166 !
  2164 !
  2167 
  2165 
       
  2166 installDirectoryMacOS
       
  2167     "automatically generated by UIPainter ..."
       
  2168 
       
  2169     |holder|
       
  2170 
       
  2171     (holder := builder bindingAt:#installDirectoryMacOS) isNil ifTrue:[
       
  2172         builder aspectAt:#installDirectoryMacOS put:(holder := '' asValue).
       
  2173         holder onChangeSend:#value to:[modifiedChannel value:true].
       
  2174     ].
       
  2175     ^ holder.
       
  2176 
       
  2177     "Created: / 23.3.1999 / 14:18:05 / cg"
       
  2178 !
       
  2179 
  2168 installDirectoryUnix
  2180 installDirectoryUnix
  2169     "automatically generated by UIPainter ..."
  2181     "automatically generated by UIPainter ..."
  2170 
  2182 
  2171     |holder|
  2183     |holder|
  2172 
  2184 
  2173     (holder := builder bindingAt:#installDirectoryUnix) isNil ifTrue:[
  2185     (holder := builder bindingAt:#installDirectoryUnix) isNil ifTrue:[
  2174         builder aspectAt:#installDirectoryUnix put:(holder := '/opt/smalltalk' asValue).
  2186         builder aspectAt:#installDirectoryUnix put:(holder := '/opt/smalltalk' asValue).
       
  2187         holder onChangeSend:#value to:[modifiedChannel value:true].
       
  2188     ].
       
  2189     ^ holder.
       
  2190 
       
  2191     "Created: / 23.3.1999 / 14:18:05 / cg"
       
  2192 !
       
  2193 
       
  2194 installDirectoryVMS
       
  2195     "automatically generated by UIPainter ..."
       
  2196 
       
  2197     |holder|
       
  2198 
       
  2199     (holder := builder bindingAt:#installDirectoryVMS) isNil ifTrue:[
       
  2200         builder aspectAt:#installDirectoryVMS put:(holder := '' asValue).
  2175         holder onChangeSend:#value to:[modifiedChannel value:true].
  2201         holder onChangeSend:#value to:[modifiedChannel value:true].
  2176     ].
  2202     ].
  2177     ^ holder.
  2203     ^ holder.
  2178 
  2204 
  2179     "Created: / 23.3.1999 / 14:18:05 / cg"
  2205     "Created: / 23.3.1999 / 14:18:05 / cg"
  2851                 value:(p propertyAt:#installDirectoryUnix) ? 
  2877                 value:(p propertyAt:#installDirectoryUnix) ? 
  2852                         ((p propertyAt:#installDirectory) ? '/opt/smalltalk').
  2878                         ((p propertyAt:#installDirectory) ? '/opt/smalltalk').
  2853         self installDirectoryWin32 
  2879         self installDirectoryWin32 
  2854                 value:(p propertyAt:#installDirectoryWin32) ? 
  2880                 value:(p propertyAt:#installDirectoryWin32) ? 
  2855                         ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX').
  2881                         ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX').
       
  2882 "/        self installDirectoryVMS 
       
  2883 "/                value:(p propertyAt:#installDirectoryVMS) ? 
       
  2884 "/                        ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX').
       
  2885 "/        self installDirectoryMacOS 
       
  2886 "/                value:(p propertyAt:#installDirectoryMacOS) ? 
       
  2887 "/                        ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX').
  2856 
  2888 
  2857         l := p prerequisitePackages collect:[:entry |
  2889         l := p prerequisitePackages collect:[:entry |
  2858                     |pName|
  2890                     |pName|
  2859 
  2891 
  2860                     entry isString ifTrue:[
  2892                     entry isString ifTrue:[
  2915         p propertyAt:#deliverGZipArchive put:self deliverGZipArchive value.
  2947         p propertyAt:#deliverGZipArchive put:self deliverGZipArchive value.
  2916         p propertyAt:#deliverLoadAllFile put:self deliverLoadAllFile value.
  2948         p propertyAt:#deliverLoadAllFile put:self deliverLoadAllFile value.
  2917 
  2949 
  2918         p propertyAt:#installDirectoryUnix put:self installDirectoryUnix value.
  2950         p propertyAt:#installDirectoryUnix put:self installDirectoryUnix value.
  2919         p propertyAt:#installDirectoryWin32 put:self installDirectoryWin32 value.
  2951         p propertyAt:#installDirectoryWin32 put:self installDirectoryWin32 value.
       
  2952         p propertyAt:#installDirectoryVMS put:self installDirectoryVMS value.
       
  2953         p propertyAt:#installDirectoryMacOS put:self installDirectoryMacOS value.
  2920         p prerequisiteClasses:(self listOfRequiredClassesInPrerequisites value
  2954         p prerequisiteClasses:(self listOfRequiredClassesInPrerequisites value
  2921                                collect:[:entry | entry string asSymbol]).
  2955                                collect:[:entry | entry string asSymbol]).
  2922 
  2956 
  2923         p addDependent:self.
  2957         p addDependent:self.
  2924     ].
  2958     ].
  2927     "Modified: / 23.3.1999 / 14:18:38 / cg"
  2961     "Modified: / 23.3.1999 / 14:18:38 / cg"
  2928 !
  2962 !
  2929 
  2963 
  2930 updateRightCanvas
  2964 updateRightCanvas
  2931     |selectedNode nodeContents spec|
  2965     |selectedNode nodeContents spec|
       
  2966 
       
  2967     self builder bindings removeKey:#listOfAllClassesInPrerequisites ifAbsent:nil.  "/ force recompute
       
  2968     self builder bindings removeKey:#listOfAllProjectsInPrerequisites ifAbsent:nil.  "/ force recompute
  2932 
  2969 
  2933     self selectedProjectInPrerequisites value:nil.
  2970     self selectedProjectInPrerequisites value:nil.
  2934     self selectedRequiredProjectInPrerequisites value:nil.
  2971     self selectedRequiredProjectInPrerequisites value:nil.
  2935 
  2972 
  2936     selectedNode := self selectedTreeNode.
  2973     selectedNode := self selectedTreeNode.
  3058         ]
  3095         ]
  3059     ]
  3096     ]
  3060 !
  3097 !
  3061 
  3098 
  3062 browseClasses
  3099 browseClasses
  3063     |ns p classes nBad|
  3100     |ns p classes nBad uniqueClasses|
  3064 
  3101 
  3065     p := self currentProject.
  3102     p := self currentProject.
  3066     classes := p classes
  3103     classes := p classes
  3067                 collect:[:clsOrName |
  3104                 collect:[:clsOrName |
  3068                             |cls|
  3105                             |cls realName|
  3069 
  3106 
  3070                             clsOrName isSymbol ifTrue:[
  3107                             clsOrName isSymbol ifTrue:[
  3071                                 cls := Smalltalk at:clsOrName
  3108                                 realName := clsOrName.
       
  3109                                 (realName includes:$:) ifTrue:[
       
  3110                                     (realName startsWith:'Smalltalk::') ifTrue:[
       
  3111                                         realName := (realName copyFrom:'Smalltalk::' size + 1) asSymbol
       
  3112                                     ]
       
  3113                                 ].
       
  3114                                 cls := Smalltalk at:realName
  3072                             ] ifFalse:[
  3115                             ] ifFalse:[
  3073                                 cls := clsOrName
  3116                                 cls := clsOrName
  3074                             ].
  3117                             ].
  3075                             cls
  3118                             cls
  3076                         ].
  3119                         ].
       
  3120 
       
  3121     "/ remove duplicates - but want to preserve order
       
  3122     "/ thats why we do not use asIdentitySet asOrderedCollection
       
  3123     uniqueClasses := OrderedCollection new.
       
  3124     classes do:[:cls | (uniqueClasses includesIdentical:cls) ifFalse:[uniqueClasses add:cls]].
       
  3125 
  3077     nBad := classes inject:0 into:[:sum :el | el isNil ifTrue:[sum+1] ifFalse:[sum]].
  3126     nBad := classes inject:0 into:[:sum :el | el isNil ifTrue:[sum+1] ifFalse:[sum]].
  3078     nBad ~~ 0 ifTrue:[
  3127     nBad ~~ 0 ifTrue:[
  3079         classes := classes select:[:cls | cls notNil].
  3128         classes := classes select:[:cls | cls notNil].
  3080         self warn:('Oops - %1 classes could not be found.\\You should probably load the first.' bindWith:nBad) withCRs.
  3129         self warn:('Oops - %1 classes could not be found.\\You should probably load them first.' bindWith:nBad) withCRs.
  3081     ].
  3130     ].
  3082 
  3131 
  3083 
  3132 
  3084     SystemBrowser
  3133     SystemBrowser
  3085         browseClasses:classes title:('Classes in ' , p name) sort:true.
  3134         browseClasses:classes title:('Classes in ' , p name) sort:true.