show stub classes
authorClaus Gittinger <cg@exept.de>
Fri, 29 Mar 1996 13:41:00 +0100
changeset 458 f2e58c66454c
parent 457 d55d8d2e303f
child 459 ec635291b853
show stub classes
Launcher.st
--- a/Launcher.st	Fri Mar 29 04:43:34 1996 +0100
+++ b/Launcher.st	Fri Mar 29 13:41:00 1996 +0100
@@ -305,43 +305,43 @@
 
     moduleListUpdater := Plug new.
     moduleListUpdater 
-	respondTo:#getModules 
-	with:[
-	    |l|
+        respondTo:#getModules 
+        with:[
+            |l|
 
-	    l := Array new.
-	    (showModules value or:[showBuiltIn value]) ifTrue:[
-		allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
-		(showBuiltIn value and:[showModules value]) ifFalse:[
-		    allModules := allModules select:[:i |
-			|wantToSee|
+            l := Array new.
+            (showModules value or:[showBuiltIn value]) ifTrue:[
+                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
+                (showBuiltIn value and:[showModules value]) ifFalse:[
+                    allModules := allModules select:[:i |
+                        |wantToSee|
 
-			wantToSee := (i at:#dynamic).
-			showBuiltIn value ifTrue:[
-			    wantToSee := wantToSee not
-			].
-			wantToSee
-		    ]
-		].
-		"/ sorting by reverse id brings newest ones to the top (a side effect)
-		allModules sort:[:a :b | (a at:#id) > (b at:#id)].
-		moduleNames := allModules collect:[:entry | (entry at:#name)].
-		l := l , moduleNames.
-	    ].
-	    showMethods value ifTrue:[
-		allObjects := ObjectFileLoader loadedObjectHandles.
-		methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
-		methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
-								'compiled method - removed' , ' (in ' , mH pathName , ')'
-							    ] ifFalse:[
-								'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
-							    ].
-						     ].
-		l := l , methodNames.
-	    ].
-	    list1 list:l.
-	    unloadButton disable.
-	].
+                        wantToSee := (i at:#dynamic).
+                        showBuiltIn value ifTrue:[
+                            wantToSee := wantToSee not
+                        ].
+                        wantToSee
+                    ]
+                ].
+                "/ sorting by reverse id brings newest ones to the top (a side effect)
+                allModules sort:[:a :b | (a at:#id) > (b at:#id)].
+                moduleNames := allModules collect:[:entry | (entry at:#name)].
+                l := l , moduleNames.
+            ].
+            showMethods value ifTrue:[
+                allObjects := ObjectFileLoader loadedObjectHandles.
+                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
+                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
+                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
+                                                            ] ifFalse:[
+                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
+                                                            ].
+                                                     ].
+                l := l , methodNames.
+            ].
+            list1 list:l.
+            unloadButton disable.
+        ].
 
     list1 := SelectionInList new.
     list2 := SelectionInList new.
@@ -357,55 +357,59 @@
     listView1 model:list1.
     listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.
     listView1 action:[:sel |
-	|info classNames tabs|
+        |info classNames tabs|
 
-	(showModules value or:[showBuiltIn value]) ifTrue:[
-	    info := allModules at:sel ifAbsent:nil.
-	].
-	info isNil ifTrue:[
-	    "/ selected a method
-	    list2 list:#().
-	    unloadButton enable.
-	] ifFalse:[
-	    "/ selected a package
+        (showModules value or:[showBuiltIn value]) ifTrue:[
+            info := allModules at:sel ifAbsent:nil.
+        ].
+        info isNil ifTrue:[
+            "/ selected a method
+            list2 list:#().
+            unloadButton enable.
+        ] ifFalse:[
+            "/ selected a package
 
-	    tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
+            tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
 
-	    "/ fill bottom list with class-info
+            "/ fill bottom list with class-info
 
-	    classNames := (info at:#classNames) asSortedCollection.
-	    classNames := classNames collect:[:cName |
-			    |cls entry rev listEntry|
+            classNames := (info at:#classNames) asSortedCollection.
+            classNames := classNames collect:[:cName |
+                            |cls entry rev listEntry|
 
-			    listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs.
-			    listEntry colAt:1 put:cName.
+                            listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs.
+                            listEntry colAt:1 put:cName.
 
-			    cls := Smalltalk classNamed:cName.
-			    cls isNil ifTrue:[
-				listEntry colAt:2 put:'(class removed)'.
-			    ] ifFalse:[
-				rev := cls binaryRevision.
-				rev notNil ifTrue:[
-				    entry :='(bin: ' , rev.
-				    cls revision ~= rev ifTrue:[
-					entry := entry , ' / src: ' , cls revision    
-				    ].
-				    listEntry colAt:2 put:entry , ')'
-				] ifFalse:[
-				   cls revision notNil ifTrue:[
-					listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' 
-				   ]
-				]
-			    ].
-			    listEntry
-			  ].
-	    list2 list:classNames.
-	    (info at:#dynamic) ifTrue:[
-		unloadButton enable.
-	    ] ifFalse:[
-		unloadButton disable.
-	    ].
-	]
+                            cls := Smalltalk classNamed:cName.
+                            cls isNil ifTrue:[
+                                listEntry colAt:2 put:'(class removed)'.
+                            ] ifFalse:[
+                                rev := cls binaryRevision.
+                                rev notNil ifTrue:[
+                                    cls isLoaded ifFalse:[
+                                        entry := '(stub for: ' , rev.
+                                    ] ifTrue:[
+                                        entry :='(bin: ' , rev.
+                                    ].    
+                                    cls revision ~= rev ifTrue:[
+                                        entry := entry , ' / src: ' , cls revision    
+                                    ].
+                                    listEntry colAt:2 put:entry , ')'
+                                ] ifFalse:[
+                                   cls revision notNil ifTrue:[
+                                        listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' 
+                                   ]
+                                ]
+                            ].
+                            listEntry
+                          ].
+            list2 list:classNames.
+            (info at:#dynamic) ifTrue:[
+                unloadButton enable.
+            ] ifFalse:[
+                unloadButton disable.
+            ].
+        ]
     ].
 
     panel := HorizontalPanelView new.
@@ -416,18 +420,19 @@
     box makeTabable:check.
     panel add:(check := CheckBox label:'modules' model:showModules).
     ObjectFileLoader isNil ifTrue:[
-	check disable
+        check disable
     ] ifFalse:[
-	box makeTabable:check.
+        box makeTabable:check.
     ].
     panel add:(check := CheckBox label:'methods' model:showMethods).
     ObjectFileLoader isNil ifTrue:[
-	check disable
+        check disable
     ] ifFalse:[
-	box makeTabable:check.
+        box makeTabable:check.
     ].
 
     panel horizontalLayout:#fitSpace.
+    "/ panel horizontalLayout:#leftSpace.
 
     box addComponent:panel tabable:false.
 
@@ -450,27 +455,27 @@
 
     unloadButton := Button label:(resources string:'unload').
     unloadButton action:[
-	self withWaitCursorDo:[
-	    box withWaitCursorDo:[
-		|info idx pathName|
+        self withWaitCursorDo:[
+            box withWaitCursorDo:[
+                |info idx pathName|
 
-		idx := list1 selectionIndex.
-		info := allModules at:idx ifAbsent:nil.
+                idx := list1 selectionIndex.
+                info := allModules at:idx ifAbsent:nil.
 
-		info isNil ifTrue:[
-		    "/ selected a method
-		    idx := idx - allModules size.
-		    pathName := (methodObjects at:idx) pathName.
+                info isNil ifTrue:[
+                    "/ selected a method
+                    idx := idx - allModules size.
+                    pathName := (methodObjects at:idx) pathName.
 
-		] ifFalse:[
-		    "/ selected a package
-		    pathName := (info at:#pathName).
-		].
-		ObjectFileLoader unloadObjectFile:pathName.
-		moduleListUpdater getModules.
-		unloadButton disable.
-	    ]
-	]
+                ] ifFalse:[
+                    "/ selected a package
+                    pathName := (info at:#pathName).
+                ].
+                ObjectFileLoader unloadObjectFile:pathName.
+                moduleListUpdater getModules.
+                unloadButton disable.
+            ]
+        ]
     ].
     moduleListUpdater getModules.
 
@@ -481,14 +486,14 @@
     listView2 topInset:(l preferredExtent y + 5).
     listView2 bottomInset:(box preferredExtent y - y).
 
-    box width:(350 min:(box device width * 2 // 3)); 
-	height:(450 min:(box device height - 50)); 
-	sizeFixed:true.
+"/    box width:(400 min:(box device width * 2 // 3)); 
+"/        height:(450 min:(box device height - 50)); 
+"/        sizeFixed:true.
     box showAtPointer.
     box destroy.
 
     "Modified: 17.9.1995 / 16:47:50 / claus"
-    "Modified: 9.12.1995 / 21:08:35 / cg"
+    "Modified: 29.3.1996 / 14:39:25 / cg"
 !
 
 snapshot
@@ -2398,5 +2403,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.101 1996-03-23 18:41:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.102 1996-03-29 12:41:00 cg Exp $'
 ! !