.
--- a/AboutBox.st Thu Aug 03 03:38:05 1995 +0200
+++ b/AboutBox.st Thu Aug 10 15:14:54 1995 +0200
@@ -23,7 +23,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/AboutBox.st,v 1.5 1995-07-03 02:36:31 claus Exp $
+$Header: /cvs/stx/stx/libtool/AboutBox.st,v 1.6 1995-08-10 13:13:10 claus Exp $
+$Revision: 1.6 $
"
!
--- a/BrowserView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/BrowserView.st Thu Aug 10 15:14:54 1995 +0200
@@ -29,7 +29,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.13 1995-08-03 01:37:22 claus Exp $
+$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.14 1995-08-10 13:13:21 claus Exp $
'!
!BrowserView class methodsFor:'documentation'!
@@ -50,7 +50,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.13 1995-08-03 01:37:22 claus Exp $
+$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.14 1995-08-10 13:13:21 claus Exp $
+$Revision: 1.14 $
"
!
@@ -312,6 +313,9 @@
aMethod isWrapped ifTrue:[
sel := sel , ' !!'
].
+ aMethod isInvalid ifTrue:[
+ sel := sel , ' (not executable)'
+ ].
"mhmh - can this happen ?"
"/ (newList includes:sel) ifFalse:[
@@ -529,8 +533,14 @@
|l il|
myLabel notNil ifTrue:[
- l := il := myLabel
- ] ifFalse:[
+ "if I have been given an explicit label,
+ and its not the default, take that one"
+
+ myLabel ~= 'System Browser' ifTrue:[
+ l := il := myLabel
+ ]
+ ].
+ l isNil ifTrue:[
l := resources string:'System Browser'.
currentClass notNil ifTrue:[
@@ -3846,6 +3856,7 @@
].
labels := #(
'inspect method'
+ 'decompile '
'-'
'make private'
'make protected'
@@ -3853,6 +3864,7 @@
).
selectors := #(
methodInspect
+ methodDecompile
nil
methodMakePrivate
methodMakeProtected
@@ -4384,6 +4396,29 @@
self checkMethodSelected ifFalse:[^ self].
currentMethod inspect.
+!
+
+methodDecompile
+ "decompile the current methods bytecodes.
+ The Decompiler is delivered as an extra, and not normally
+ avaliable with the system."
+
+ self checkMethodSelected ifFalse:[^ self].
+ Decompiler notNil ifTrue:[
+ Autoload autoloadFailedSignal handle:[:ex |
+ ex return
+ ] do:[
+ Decompiler autoload.
+ ].
+ ].
+ Decompiler isLoaded ifFalse:[
+ Smalltalk fileIn:'/phys/clam/claus/work/libcomp/not_delivered/Decomp.st'.
+ ].
+ Decompiler isLoaded ifFalse:[
+ ^ self warn:'No decompiler available'.
+ ].
+
+ Decompiler decompile:currentMethod.
! !
!BrowserView methodsFor:'method category list menu'!
--- a/BrwsrView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/BrwsrView.st Thu Aug 10 15:14:54 1995 +0200
@@ -29,7 +29,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.13 1995-08-03 01:37:22 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.14 1995-08-10 13:13:21 claus Exp $
'!
!BrowserView class methodsFor:'documentation'!
@@ -50,7 +50,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.13 1995-08-03 01:37:22 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.14 1995-08-10 13:13:21 claus Exp $
+$Revision: 1.14 $
"
!
@@ -312,6 +313,9 @@
aMethod isWrapped ifTrue:[
sel := sel , ' !!'
].
+ aMethod isInvalid ifTrue:[
+ sel := sel , ' (not executable)'
+ ].
"mhmh - can this happen ?"
"/ (newList includes:sel) ifFalse:[
@@ -529,8 +533,14 @@
|l il|
myLabel notNil ifTrue:[
- l := il := myLabel
- ] ifFalse:[
+ "if I have been given an explicit label,
+ and its not the default, take that one"
+
+ myLabel ~= 'System Browser' ifTrue:[
+ l := il := myLabel
+ ]
+ ].
+ l isNil ifTrue:[
l := resources string:'System Browser'.
currentClass notNil ifTrue:[
@@ -3846,6 +3856,7 @@
].
labels := #(
'inspect method'
+ 'decompile '
'-'
'make private'
'make protected'
@@ -3853,6 +3864,7 @@
).
selectors := #(
methodInspect
+ methodDecompile
nil
methodMakePrivate
methodMakeProtected
@@ -4384,6 +4396,29 @@
self checkMethodSelected ifFalse:[^ self].
currentMethod inspect.
+!
+
+methodDecompile
+ "decompile the current methods bytecodes.
+ The Decompiler is delivered as an extra, and not normally
+ avaliable with the system."
+
+ self checkMethodSelected ifFalse:[^ self].
+ Decompiler notNil ifTrue:[
+ Autoload autoloadFailedSignal handle:[:ex |
+ ex return
+ ] do:[
+ Decompiler autoload.
+ ].
+ ].
+ Decompiler isLoaded ifFalse:[
+ Smalltalk fileIn:'/phys/clam/claus/work/libcomp/not_delivered/Decomp.st'.
+ ].
+ Decompiler isLoaded ifFalse:[
+ ^ self warn:'No decompiler available'.
+ ].
+
+ Decompiler decompile:currentMethod.
! !
!BrowserView methodsFor:'method category list menu'!
--- a/CBrowser.st Thu Aug 03 03:38:05 1995 +0200
+++ b/CBrowser.st Thu Aug 10 15:14:54 1995 +0200
@@ -25,7 +25,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/CBrowser.st,v 1.38 1995-07-23 03:18:47 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/CBrowser.st,v 1.39 1995-08-10 13:13:33 claus Exp $
'!
!ChangesBrowser class methodsFor:'documentation'!
@@ -46,7 +46,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/CBrowser.st,v 1.38 1995-07-23 03:18:47 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/CBrowser.st,v 1.39 1995-08-10 13:13:33 claus Exp $
+$Revision: 1.39 $
"
!
--- a/ChangeSetBrowser.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ChangeSetBrowser.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.5 1995-06-27 02:29:17 claus Exp $
+$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.6 1995-08-10 13:13:39 claus Exp $
'!
!ChangeSetBrowser class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.5 1995-06-27 02:29:17 claus Exp $
+$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.6 1995-08-10 13:13:39 claus Exp $
+$Revision: 1.6 $
"
!
--- a/ChangesBrowser.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ChangesBrowser.st Thu Aug 10 15:14:54 1995 +0200
@@ -25,7 +25,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.38 1995-07-23 03:18:47 claus Exp $
+$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.39 1995-08-10 13:13:33 claus Exp $
'!
!ChangesBrowser class methodsFor:'documentation'!
@@ -46,7 +46,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.38 1995-07-23 03:18:47 claus Exp $
+$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.39 1995-08-10 13:13:33 claus Exp $
+$Revision: 1.39 $
"
!
--- a/ChgSetBrwsr.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ChgSetBrwsr.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/ChgSetBrwsr.st,v 1.5 1995-06-27 02:29:17 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ChgSetBrwsr.st,v 1.6 1995-08-10 13:13:39 claus Exp $
'!
!ChangeSetBrowser class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/ChgSetBrwsr.st,v 1.5 1995-06-27 02:29:17 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ChgSetBrwsr.st,v 1.6 1995-08-10 13:13:39 claus Exp $
+$Revision: 1.6 $
"
!
--- a/ClassInspV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ClassInspV.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/ClassInspV.st,v 1.2 1994-11-17 14:44:24 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ClassInspV.st,v 1.3 1995-08-10 13:13:42 claus Exp $
'!
!ClassInspectorView methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/ClassInspV.st,v 1.2 1994-11-17 14:44:24 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ClassInspV.st,v 1.3 1995-08-10 13:13:42 claus Exp $
+$Revision: 1.3 $
"
!
--- a/ClassInspectorView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ClassInspectorView.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/ClassInspectorView.st,v 1.2 1994-11-17 14:44:24 claus Exp $
+$Header: /cvs/stx/stx/libtool/ClassInspectorView.st,v 1.3 1995-08-10 13:13:42 claus Exp $
'!
!ClassInspectorView methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/ClassInspectorView.st,v 1.2 1994-11-17 14:44:24 claus Exp $
+$Header: /cvs/stx/stx/libtool/ClassInspectorView.st,v 1.3 1995-08-10 13:13:42 claus Exp $
+$Revision: 1.3 $
"
!
--- a/ClrInspV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ClrInspV.st Thu Aug 10 15:14:54 1995 +0200
@@ -25,7 +25,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/ClrInspV.st,v 1.2 1995-03-26 17:28:29 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ClrInspV.st,v 1.3 1995-08-10 13:13:45 claus Exp $
+$Revision: 1.3 $
"
! !
--- a/ColorInspectorView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ColorInspectorView.st Thu Aug 10 15:14:54 1995 +0200
@@ -25,7 +25,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.2 1995-03-26 17:28:29 claus Exp $
+$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.3 1995-08-10 13:13:45 claus Exp $
+$Revision: 1.3 $
"
! !
--- a/ConInspV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ConInspV.st Thu Aug 10 15:14:54 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/ConInspV.st,v 1.11 1995-07-03 02:37:07 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ConInspV.st,v 1.12 1995-08-10 13:13:48 claus Exp $
'!
!ContextInspectorView class methodsFor:'documentation'!
@@ -44,7 +44,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/ConInspV.st,v 1.11 1995-07-03 02:37:07 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ConInspV.st,v 1.12 1995-08-10 13:13:48 claus Exp $
+$Revision: 1.12 $
"
!
--- a/ContextInspectorView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ContextInspectorView.st Thu Aug 10 15:14:54 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.11 1995-07-03 02:37:07 claus Exp $
+$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.12 1995-08-10 13:13:48 claus Exp $
'!
!ContextInspectorView class methodsFor:'documentation'!
@@ -44,7 +44,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.11 1995-07-03 02:37:07 claus Exp $
+$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.12 1995-08-10 13:13:48 claus Exp $
+$Revision: 1.12 $
"
!
--- a/DebugView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/DebugView.st Thu Aug 10 15:14:54 1995 +0200
@@ -29,7 +29,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.40 1995-07-23 03:18:58 claus Exp $
+$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.41 1995-08-10 13:13:53 claus Exp $
'!
!DebugView class methodsFor:'documentation'!
@@ -50,7 +50,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.40 1995-07-23 03:18:58 claus Exp $
+$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.41 1995-08-10 13:13:53 claus Exp $
+$Revision: 1.41 $
"
!
@@ -1588,11 +1589,15 @@
] ifFalse:[
codeView contents:code.
(lineNrInMethod notNil and:[lineNrInMethod ~~ 0]) ifTrue:[
- lineNrInMethod > codeView list size ifTrue:[
- lineNrInMethod := codeView list size + 1
- ].
- codeView selectLine:lineNrInMethod.
- codeView makeSelectionVisible
+"/ lineNrInMethod > codeView list size ifTrue:[
+"/ lineNrInMethod := codeView list size + 1
+"/ ].
+"/ codeView selectLine:lineNrInMethod.
+"/ codeView makeSelectionVisible
+ lineNrInMethod <= codeView list size ifTrue:[
+ codeView selectLine:lineNrInMethod.
+ codeView makeSelectionVisible
+ ]
].
].
--- a/DictInspV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/DictInspV.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/DictInspV.st,v 1.13 1995-07-23 03:19:04 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/DictInspV.st,v 1.14 1995-08-10 13:14:00 claus Exp $
'!
!DictionaryInspectorView class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/DictInspV.st,v 1.13 1995-07-23 03:19:04 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/DictInspV.st,v 1.14 1995-08-10 13:14:00 claus Exp $
+$Revision: 1.14 $
"
!
--- a/DictionaryInspectorView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/DictionaryInspectorView.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.13 1995-07-23 03:19:04 claus Exp $
+$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.14 1995-08-10 13:14:00 claus Exp $
'!
!DictionaryInspectorView class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.13 1995-07-23 03:19:04 claus Exp $
+$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.14 1995-08-10 13:14:00 claus Exp $
+$Revision: 1.14 $
"
!
--- a/DiffTextView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/DiffTextView.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.5 1995-02-22 01:24:40 claus Exp $
+$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.6 1995-08-10 13:14:03 claus Exp $
'!
!DiffTextView class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.5 1995-02-22 01:24:40 claus Exp $
+$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.6 1995-08-10 13:14:03 claus Exp $
+$Revision: 1.6 $
"
!
@@ -236,7 +237,7 @@
!DiffTextView methodsFor:'accessing'!
text1:t1 text2:t2
- |tmpFile1 tmpFile2 Name1 tmpName2 stream line text1 text2 diffList pidString|
+ |tmpFile1 tmpFile2 name1 tmpName2 stream line text1 text2 diffList pidString|
text1 := t1 asStringCollection.
text2 := t2 asStringCollection.
--- a/DiffTxtV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/DiffTxtV.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/DiffTxtV.st,v 1.5 1995-02-22 01:24:40 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/DiffTxtV.st,v 1.6 1995-08-10 13:14:03 claus Exp $
'!
!DiffTextView class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/DiffTxtV.st,v 1.5 1995-02-22 01:24:40 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/DiffTxtV.st,v 1.6 1995-08-10 13:14:03 claus Exp $
+$Revision: 1.6 $
"
!
@@ -236,7 +237,7 @@
!DiffTextView methodsFor:'accessing'!
text1:t1 text2:t2
- |tmpFile1 tmpFile2 Name1 tmpName2 stream line text1 text2 diffList pidString|
+ |tmpFile1 tmpFile2 name1 tmpName2 stream line text1 text2 diffList pidString|
text1 := t1 asStringCollection.
text2 := t2 asStringCollection.
--- a/DirBrwsr.st Thu Aug 03 03:38:05 1995 +0200
+++ b/DirBrwsr.st Thu Aug 10 15:14:54 1995 +0200
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/DirBrwsr.st,v 1.9 1995-05-03 01:12:28 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/DirBrwsr.st,v 1.10 1995-08-10 13:14:06 claus Exp $
'!
!DirectoryBrowser class methodsFor:'documentation'!
@@ -43,7 +43,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/DirBrwsr.st,v 1.9 1995-05-03 01:12:28 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/DirBrwsr.st,v 1.10 1995-08-10 13:14:06 claus Exp $
+$Revision: 1.10 $
"
!
--- a/EvMonitor.st Thu Aug 03 03:38:05 1995 +0200
+++ b/EvMonitor.st Thu Aug 10 15:14:54 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/EvMonitor.st,v 1.6 1995-02-28 21:56:01 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/EvMonitor.st,v 1.7 1995-08-10 13:14:09 claus Exp $
'!
!EventMonitor class methodsFor:'documentation'!
@@ -44,7 +44,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/EvMonitor.st,v 1.6 1995-02-28 21:56:01 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/EvMonitor.st,v 1.7 1995-08-10 13:14:09 claus Exp $
+$Revision: 1.7 $
"
!
--- a/EventMonitor.st Thu Aug 03 03:38:05 1995 +0200
+++ b/EventMonitor.st Thu Aug 10 15:14:54 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.6 1995-02-28 21:56:01 claus Exp $
+$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.7 1995-08-10 13:14:09 claus Exp $
'!
!EventMonitor class methodsFor:'documentation'!
@@ -44,7 +44,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.6 1995-02-28 21:56:01 claus Exp $
+$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.7 1995-08-10 13:14:09 claus Exp $
+$Revision: 1.7 $
"
!
--- a/FBrowser.st Thu Aug 03 03:38:05 1995 +0200
+++ b/FBrowser.st Thu Aug 10 15:14:54 1995 +0200
@@ -27,7 +27,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.40 1995-07-23 03:19:11 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.41 1995-08-10 13:14:13 claus Exp $
'!
!FileBrowser class methodsFor:'documentation'!
@@ -48,7 +48,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.40 1995-07-23 03:19:11 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.41 1995-08-10 13:14:13 claus Exp $
+$Revision: 1.41 $
"
!
--- a/FileBrowser.st Thu Aug 03 03:38:05 1995 +0200
+++ b/FileBrowser.st Thu Aug 10 15:14:54 1995 +0200
@@ -27,7 +27,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.40 1995-07-23 03:19:11 claus Exp $
+$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.41 1995-08-10 13:14:13 claus Exp $
'!
!FileBrowser class methodsFor:'documentation'!
@@ -48,7 +48,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.40 1995-07-23 03:19:11 claus Exp $
+$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.41 1995-08-10 13:14:13 claus Exp $
+$Revision: 1.41 $
"
!
--- a/ImageInspectorView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ImageInspectorView.st Thu Aug 10 15:14:54 1995 +0200
@@ -23,9 +23,32 @@
this class allows better inspection of images
-$Header: /cvs/stx/stx/libtool/ImageInspectorView.st,v 1.4 1995-07-03 02:37:22 claus Exp $
+$Header: /cvs/stx/stx/libtool/ImageInspectorView.st,v 1.5 1995-08-10 13:14:18 claus Exp $
'!
+!ImageInspectorView class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1993 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libtool/ImageInspectorView.st,v 1.5 1995-08-10 13:14:18 claus Exp $
+$Revision: 1.5 $
+"
+! !
+
!ImageInspectorView methodsFor:'accessing'!
inspect:anObject
--- a/ImgInspV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ImgInspV.st Thu Aug 10 15:14:54 1995 +0200
@@ -23,9 +23,32 @@
this class allows better inspection of images
-$Header: /cvs/stx/stx/libtool/Attic/ImgInspV.st,v 1.4 1995-07-03 02:37:22 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ImgInspV.st,v 1.5 1995-08-10 13:14:18 claus Exp $
'!
+!ImageInspectorView class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1993 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libtool/Attic/ImgInspV.st,v 1.5 1995-08-10 13:14:18 claus Exp $
+$Revision: 1.5 $
+"
+! !
+
!ImageInspectorView methodsFor:'accessing'!
inspect:anObject
--- a/InspView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/InspView.st Thu Aug 10 15:14:54 1995 +0200
@@ -24,7 +24,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/InspView.st,v 1.26 1995-07-23 03:19:18 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/InspView.st,v 1.27 1995-08-10 13:14:22 claus Exp $
'!
!InspectorView class methodsFor:'documentation'!
@@ -45,7 +45,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/InspView.st,v 1.26 1995-07-23 03:19:18 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/InspView.st,v 1.27 1995-08-10 13:14:22 claus Exp $
+$Revision: 1.27 $
"
!
@@ -92,6 +93,7 @@
icon:self defaultIcon
minExtent:(100 @ 100).
+ topView iconLabel:(self labelNameFor:anObject).
topView extent:(Screen current extent // 3).
inspectorView := self origin:(0.0 @ 0.0)
@@ -134,6 +136,15 @@
!
labelFor:anObject
+ "return the windowLabel to use in my topView, when inspecting anObject."
+
+ ^ ClassResources string:'Inspector on: %1' with:(self labelNameFor:anObject)
+!
+
+labelNameFor:anObject
+ "return the iconLabel to use in my topView, when inspecting anObject.
+ Simply returns the className or name of anObjects class"
+
|nm|
anObject isClass ifTrue:[
@@ -143,7 +154,7 @@
nm := anObject classNameWithArticle
].
- ^ 'Inspector on: ' , nm
+ ^ nm
! !
!InspectorView methodsFor:'accessing'!
--- a/InspectorView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/InspectorView.st Thu Aug 10 15:14:54 1995 +0200
@@ -24,7 +24,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.26 1995-07-23 03:19:18 claus Exp $
+$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.27 1995-08-10 13:14:22 claus Exp $
'!
!InspectorView class methodsFor:'documentation'!
@@ -45,7 +45,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.26 1995-07-23 03:19:18 claus Exp $
+$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.27 1995-08-10 13:14:22 claus Exp $
+$Revision: 1.27 $
"
!
@@ -92,6 +93,7 @@
icon:self defaultIcon
minExtent:(100 @ 100).
+ topView iconLabel:(self labelNameFor:anObject).
topView extent:(Screen current extent // 3).
inspectorView := self origin:(0.0 @ 0.0)
@@ -134,6 +136,15 @@
!
labelFor:anObject
+ "return the windowLabel to use in my topView, when inspecting anObject."
+
+ ^ ClassResources string:'Inspector on: %1' with:(self labelNameFor:anObject)
+!
+
+labelNameFor:anObject
+ "return the iconLabel to use in my topView, when inspecting anObject.
+ Simply returns the className or name of anObjects class"
+
|nm|
anObject isClass ifTrue:[
@@ -143,7 +154,7 @@
nm := anObject classNameWithArticle
].
- ^ 'Inspector on: ' , nm
+ ^ nm
! !
!InspectorView methodsFor:'accessing'!
--- a/Launcher.st Thu Aug 03 03:38:05 1995 +0200
+++ b/Launcher.st Thu Aug 10 15:14:54 1995 +0200
@@ -37,7 +37,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.20 1995-08-03 01:37:59 claus Exp $
+$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.21 1995-08-10 13:14:38 claus Exp $
+$Revision: 1.21 $
"
!
@@ -309,6 +310,7 @@
'language'
'show keyboard mappings'
'view style'
+ 'messages'
'compilation'
'misc'
))
@@ -316,6 +318,7 @@
#languageSetting
#keyboardSetting
#viewStyleSetting
+ #messageSettings
#compilerSettings
#miscSettings
)
@@ -1032,8 +1035,9 @@
compilerSettings
|box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays
- warnSTXBox warnUnderscoreBox warnOldStyleBox enabler|
-
+ warnSTXBox warnUnderscoreBox warnOldStyleBox
+ stcCompilation compilationList stcCompilationOptions
+ enabler|
warnings := Compiler warnings asValue.
@@ -1042,6 +1046,9 @@
warnOldStyle := Compiler warnOldStyleAssignment asValue.
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
immutableArrays := Compiler arraysAreImmutable asValue.
+ stcCompilationOptions := #( always default never).
+ stcCompilation := SelectionInList new list:(resources array:#('always' 'primitive code only' 'never')).
+ stcCompilation selectionIndex:2.
enabler := Plug new.
enabler
@@ -1074,6 +1081,22 @@
box addHorizontalLine.
"/ box addVerticalSpace.
+ "/ kludge for now (to get size computation right)
+
+ compilationList := box addPopUpList:(resources string:'compilation to machine code') on:stcCompilation.
+ stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
+ box addVerticalSpace.
+"/ box addVerticalSpace.
+ box addHorizontalLine.
+"/ box addVerticalSpace.
+
+ "/ if there is no compiler around,
+ "/ change to compile nothing, and disable the checkBoxes
+ Compiler canCreateMachineCode ifFalse:[
+ stcCompilation selectionIndex:3.
+ compilationList disable.
+ ].
+
box addCheckBox:(resources string:'warnings') on:warnings.
box addVerticalSpace.
box leftIndent:30.
@@ -1097,6 +1120,34 @@
Compiler warnUnderscoreInIdentifier:warnUnderscore value.
Compiler allowUnderscoreInIdentifier:allowUnderscore value.
Compiler arraysAreImmutable:immutableArrays value.
+ Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex)
+ ]
+!
+
+messageSettings
+ |box vmInfo vmErrors classInfos|
+
+ vmInfo := ObjectMemory infoPrinting asValue.
+ vmErrors := ObjectMemory debugPrinting asValue.
+ classInfos := Object infoPrinting asValue.
+
+ box := DialogBox new.
+ box label:(resources string:'Messages').
+"/ box extent:200@300.
+
+ box addCheckBox:(resources string:'VM info messages') on:vmInfo.
+ box addCheckBox:(resources string:'VM error messages') on:vmErrors.
+ box addHorizontalLine.
+
+ box addCheckBox:(resources string:'Other info messages') on:classInfos.
+
+ box addAbortButton; addOkButton.
+ box showAtPointer.
+
+ box accepted ifTrue:[
+ ObjectMemory infoPrinting:vmInfo value.
+ ObjectMemory debugPrinting:vmErrors value.
+ Object infoPrinting:classInfos value.
]
!
--- a/MemMonitor.st Thu Aug 03 03:38:05 1995 +0200
+++ b/MemMonitor.st Thu Aug 10 15:14:54 1995 +0200
@@ -25,7 +25,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/Attic/MemMonitor.st,v 1.18 1995-08-03 01:37:52 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/MemMonitor.st,v 1.19 1995-08-10 13:14:30 claus Exp $
'!
!MemoryMonitor class methodsFor:'documentation'!
@@ -46,7 +46,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/MemMonitor.st,v 1.18 1995-08-03 01:37:52 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/MemMonitor.st,v 1.19 1995-08-10 13:14:30 claus Exp $
+$Revision: 1.19 $
"
!
--- a/MemUsageV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/MemUsageV.st Thu Aug 10 15:14:54 1995 +0200
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/MemUsageV.st,v 1.9 1995-07-23 03:19:29 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/MemUsageV.st,v 1.10 1995-08-10 13:14:34 claus Exp $
+$Revision: 1.10 $
"
!
--- a/MemoryMonitor.st Thu Aug 03 03:38:05 1995 +0200
+++ b/MemoryMonitor.st Thu Aug 10 15:14:54 1995 +0200
@@ -25,7 +25,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.18 1995-08-03 01:37:52 claus Exp $
+$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.19 1995-08-10 13:14:30 claus Exp $
'!
!MemoryMonitor class methodsFor:'documentation'!
@@ -46,7 +46,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.18 1995-08-03 01:37:52 claus Exp $
+$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.19 1995-08-10 13:14:30 claus Exp $
+$Revision: 1.19 $
"
!
--- a/MemoryUsageView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/MemoryUsageView.st Thu Aug 10 15:14:54 1995 +0200
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.9 1995-07-23 03:19:29 claus Exp $
+$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.10 1995-08-10 13:14:34 claus Exp $
+$Revision: 1.10 $
"
!
--- a/OCInspView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/OCInspView.st Thu Aug 10 15:14:54 1995 +0200
@@ -35,7 +35,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/OCInspView.st,v 1.8 1995-03-26 17:35:34 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/OCInspView.st,v 1.9 1995-08-10 13:14:42 claus Exp $
+$Revision: 1.9 $
"
! !
--- a/OldLauncher.st Thu Aug 03 03:38:05 1995 +0200
+++ b/OldLauncher.st Thu Aug 10 15:14:54 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.30 1995-06-27 02:29:44 claus Exp $
+$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.31 1995-08-10 13:14:25 claus Exp $
'!
!Launcher class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.30 1995-06-27 02:29:44 claus Exp $
+$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.31 1995-08-10 13:14:25 claus Exp $
+$Revision: 1.31 $
"
!
--- a/OrderedCollectionInspectorView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/OrderedCollectionInspectorView.st Thu Aug 10 15:14:54 1995 +0200
@@ -35,7 +35,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/OrderedCollectionInspectorView.st,v 1.8 1995-03-26 17:35:34 claus Exp $
+$Header: /cvs/stx/stx/libtool/OrderedCollectionInspectorView.st,v 1.9 1995-08-10 13:14:42 claus Exp $
+$Revision: 1.9 $
"
! !
--- a/ProcMonitor.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ProcMonitor.st Thu Aug 10 15:14:54 1995 +0200
@@ -39,7 +39,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/ProcMonitor.st,v 1.18 1995-08-03 01:38:05 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ProcMonitor.st,v 1.19 1995-08-10 13:14:46 claus Exp $
+$Revision: 1.19 $
"
!
@@ -107,7 +108,7 @@
titleLine
showDetail ifTrue:[
- ^ 'id name state prio usedStack totalStack current segment switches'.
+ ^ 'id name state prio usedStack totalStack current segment switches list'.
].
^ 'id name state prio usedStack totalStack'.
!
@@ -150,7 +151,7 @@
updateStatus
"update status display of processes"
- |oldList list line dIndex con interrupted|
+ |oldList list line dIndex con interrupted plist|
shown ifTrue:[
oldList := listView list.
@@ -213,10 +214,11 @@
con := con sender
].
line := line , ((ObjectMemory addressOf:con) printStringRadix:16).
- line := line , ' ('.
- line := line , (aProcess numberOfStackBoundaryHits printString).
- line := line , ')'.
- ]
+ ] ifFalse:[
+ line := line , (String new:19)
+ ].
+ line := line , ' '.
+ line := line , (aProcess numberOfStackBoundaryHits printStringLeftPaddedTo:5).
].
list add:line.
processes at:dIndex put:aProcess.
@@ -263,7 +265,7 @@
hideDead := true.
showDetail := Smalltalk at:#SystemDebugging ifAbsent:false.
- v := ScrollableView for:SelectionInListView in:self.
+ v := HVScrollableView for:SelectionInListView miniScrollerH:true in:self.
v origin:0.0@0.0 corner:1.0@1.0.
"/ self extent:(font widthOf:self titleLine) + v scrollBar width @ 100.
@@ -440,7 +442,7 @@
|labels selectors m|
device ctrlDown ifTrue:[
- labels := #(
+ labels := resources array:#(
'\c detail'
).
selectors := #(
--- a/ProcessMonitor.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ProcessMonitor.st Thu Aug 10 15:14:54 1995 +0200
@@ -39,7 +39,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.18 1995-08-03 01:38:05 claus Exp $
+$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.19 1995-08-10 13:14:46 claus Exp $
+$Revision: 1.19 $
"
!
@@ -107,7 +108,7 @@
titleLine
showDetail ifTrue:[
- ^ 'id name state prio usedStack totalStack current segment switches'.
+ ^ 'id name state prio usedStack totalStack current segment switches list'.
].
^ 'id name state prio usedStack totalStack'.
!
@@ -150,7 +151,7 @@
updateStatus
"update status display of processes"
- |oldList list line dIndex con interrupted|
+ |oldList list line dIndex con interrupted plist|
shown ifTrue:[
oldList := listView list.
@@ -213,10 +214,11 @@
con := con sender
].
line := line , ((ObjectMemory addressOf:con) printStringRadix:16).
- line := line , ' ('.
- line := line , (aProcess numberOfStackBoundaryHits printString).
- line := line , ')'.
- ]
+ ] ifFalse:[
+ line := line , (String new:19)
+ ].
+ line := line , ' '.
+ line := line , (aProcess numberOfStackBoundaryHits printStringLeftPaddedTo:5).
].
list add:line.
processes at:dIndex put:aProcess.
@@ -263,7 +265,7 @@
hideDead := true.
showDetail := Smalltalk at:#SystemDebugging ifAbsent:false.
- v := ScrollableView for:SelectionInListView in:self.
+ v := HVScrollableView for:SelectionInListView miniScrollerH:true in:self.
v origin:0.0@0.0 corner:1.0@1.0.
"/ self extent:(font widthOf:self titleLine) + v scrollBar width @ 100.
@@ -440,7 +442,7 @@
|labels selectors m|
device ctrlDown ifTrue:[
- labels := #(
+ labels := resources array:#(
'\c detail'
).
selectors := #(
--- a/ProjectV.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ProjectV.st Thu Aug 10 15:14:54 1995 +0200
@@ -37,7 +37,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/ProjectV.st,v 1.15 1995-06-27 02:30:00 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/ProjectV.st,v 1.16 1995-08-10 13:14:50 claus Exp $
+$Revision: 1.16 $
"
! !
@@ -136,14 +137,17 @@
(p := aClass package) notNil ifTrue:[
existingPackages add:(p asString)
- ]
- ].
- Method allInstancesDo:[:aClass |
- |p|
-
- (p := aClass package) notNil ifTrue:[
- existingPackages add:(p asString)
- ]
+ ].
+ aClass methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ existingPackages add:(p asString)
+ ]
+ ].
+ aClass class methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ existingPackages add:(p asString)
+ ]
+ ].
].
box := ListSelectionBox title:'Package (new classes/methods will be put into that):'.
@@ -156,8 +160,84 @@
].
box showAtPointer
]
+!
+removePackage
+ "remove all classes and individual methods from the system.
+ Currently, this cannot fully restore the state to before
+ the time the package was loaded (redefined methods are lost).
+ In the future, we may keep a backref of overwritten methods
+ and restore them from their source ..."
+ |classesToRemove methodsToRemove theProject|
+
+ (myProject isNil
+ or:[(theProject := myProject packageName) isNil]) ifTrue:[
+ self warn:'No current package'.
+ ^ self
+ ].
+
+ classesToRemove := IdentitySet new.
+ methodsToRemove := IdentitySet new.
+
+ Smalltalk allClassesDo:[:aClass |
+ |p|
+
+ (p := aClass package) notNil ifTrue:[
+ p = theProject ifTrue:[
+ classesToRemove add:aClass
+ ]
+ ].
+ ].
+ Smalltalk allClassesDo:[:aClass |
+ |p|
+
+ (classesToRemove includes:aClass) ifFalse:[
+ aClass methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ p = theProject ifTrue:[
+ methodsToRemove add:aMethod
+ ]
+ ]
+ ].
+ aClass class methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ p = theProject ifTrue:[
+ methodsToRemove add:aMethod
+ ]
+ ]
+ ].
+ ].
+ ].
+
+ (classesToRemove isEmpty
+ and:[methodsToRemove isEmpty]) ifTrue:[
+ self warn:('Nothing found in ' , theProject).
+ ^ self
+ ].
+
+ (self confirm:('About to remove '
+ , classesToRemove size printString
+ , ' classes and '
+ , methodsToRemove size printString
+ , ' additional methods.\\Are you certain you want this ?') withCRs)
+ ifTrue:[
+ classesToRemove do:[:aClass |
+ ('PROJECT: removing ' , aClass name) infoPrintNL.
+ Smalltalk removeClass:aClass.
+ ].
+ methodsToRemove do:[:aMethod |
+ |where|
+
+ ('PROJECT: removing ' , aMethod displayString) infoPrintNL.
+ where := aMethod who.
+ where isNil ifTrue:[
+ 'PROJECT: oops, some method is gone' infoPrintNL.
+ ] ifFalse:[
+ (where at:1) removeSelector:(where at:2)
+ ]
+ ]
+ ].
!
showProject
@@ -263,10 +343,19 @@
initialize
super initialize.
+
+ "/
+ "/ create the toggle ...
+ "/
toggle := Toggle in:self.
toggle borderWidth:0.
toggle pressAction:[self showProject].
toggle releaseAction:[self hideProject].
+
+ "/
+ "/ and give it a menu
+ "/
+
toggle middleButtonMenu:(
PopUpMenu
labels:(resources array:
@@ -285,6 +374,7 @@
'show'
'hide'
'-'
+ 'remove package'
'destroy'
)
)
@@ -303,6 +393,7 @@
showProject
hideProject
nil
+ removePackage
destroy
)
receiver:self
--- a/ProjectView.st Thu Aug 03 03:38:05 1995 +0200
+++ b/ProjectView.st Thu Aug 10 15:14:54 1995 +0200
@@ -37,7 +37,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/ProjectView.st,v 1.15 1995-06-27 02:30:00 claus Exp $
+$Header: /cvs/stx/stx/libtool/ProjectView.st,v 1.16 1995-08-10 13:14:50 claus Exp $
+$Revision: 1.16 $
"
! !
@@ -136,14 +137,17 @@
(p := aClass package) notNil ifTrue:[
existingPackages add:(p asString)
- ]
- ].
- Method allInstancesDo:[:aClass |
- |p|
-
- (p := aClass package) notNil ifTrue:[
- existingPackages add:(p asString)
- ]
+ ].
+ aClass methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ existingPackages add:(p asString)
+ ]
+ ].
+ aClass class methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ existingPackages add:(p asString)
+ ]
+ ].
].
box := ListSelectionBox title:'Package (new classes/methods will be put into that):'.
@@ -156,8 +160,84 @@
].
box showAtPointer
]
+!
+removePackage
+ "remove all classes and individual methods from the system.
+ Currently, this cannot fully restore the state to before
+ the time the package was loaded (redefined methods are lost).
+ In the future, we may keep a backref of overwritten methods
+ and restore them from their source ..."
+ |classesToRemove methodsToRemove theProject|
+
+ (myProject isNil
+ or:[(theProject := myProject packageName) isNil]) ifTrue:[
+ self warn:'No current package'.
+ ^ self
+ ].
+
+ classesToRemove := IdentitySet new.
+ methodsToRemove := IdentitySet new.
+
+ Smalltalk allClassesDo:[:aClass |
+ |p|
+
+ (p := aClass package) notNil ifTrue:[
+ p = theProject ifTrue:[
+ classesToRemove add:aClass
+ ]
+ ].
+ ].
+ Smalltalk allClassesDo:[:aClass |
+ |p|
+
+ (classesToRemove includes:aClass) ifFalse:[
+ aClass methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ p = theProject ifTrue:[
+ methodsToRemove add:aMethod
+ ]
+ ]
+ ].
+ aClass class methodArray do:[:aMethod |
+ (p := aMethod package) notNil ifTrue:[
+ p = theProject ifTrue:[
+ methodsToRemove add:aMethod
+ ]
+ ]
+ ].
+ ].
+ ].
+
+ (classesToRemove isEmpty
+ and:[methodsToRemove isEmpty]) ifTrue:[
+ self warn:('Nothing found in ' , theProject).
+ ^ self
+ ].
+
+ (self confirm:('About to remove '
+ , classesToRemove size printString
+ , ' classes and '
+ , methodsToRemove size printString
+ , ' additional methods.\\Are you certain you want this ?') withCRs)
+ ifTrue:[
+ classesToRemove do:[:aClass |
+ ('PROJECT: removing ' , aClass name) infoPrintNL.
+ Smalltalk removeClass:aClass.
+ ].
+ methodsToRemove do:[:aMethod |
+ |where|
+
+ ('PROJECT: removing ' , aMethod displayString) infoPrintNL.
+ where := aMethod who.
+ where isNil ifTrue:[
+ 'PROJECT: oops, some method is gone' infoPrintNL.
+ ] ifFalse:[
+ (where at:1) removeSelector:(where at:2)
+ ]
+ ]
+ ].
!
showProject
@@ -263,10 +343,19 @@
initialize
super initialize.
+
+ "/
+ "/ create the toggle ...
+ "/
toggle := Toggle in:self.
toggle borderWidth:0.
toggle pressAction:[self showProject].
toggle releaseAction:[self hideProject].
+
+ "/
+ "/ and give it a menu
+ "/
+
toggle middleButtonMenu:(
PopUpMenu
labels:(resources array:
@@ -285,6 +374,7 @@
'show'
'hide'
'-'
+ 'remove package'
'destroy'
)
)
@@ -303,6 +393,7 @@
showProject
hideProject
nil
+ removePackage
destroy
)
receiver:self
--- a/SBrowser.st Thu Aug 03 03:38:05 1995 +0200
+++ b/SBrowser.st Thu Aug 10 15:14:54 1995 +0200
@@ -64,7 +64,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/Attic/SBrowser.st,v 1.35 1995-07-23 03:19:41 claus Exp $
+$Header: /cvs/stx/stx/libtool/Attic/SBrowser.st,v 1.36 1995-08-10 13:14:54 claus Exp $
+$Revision: 1.36 $
"
!
--- a/SystemBrowser.st Thu Aug 03 03:38:05 1995 +0200
+++ b/SystemBrowser.st Thu Aug 10 15:14:54 1995 +0200
@@ -64,7 +64,8 @@
version
"
-$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.35 1995-07-23 03:19:41 claus Exp $
+$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.36 1995-08-10 13:14:54 claus Exp $
+$Revision: 1.36 $
"
!