--- a/BrowserView.st Mon Oct 14 21:09:53 1996 +0200
+++ b/BrowserView.st Mon Oct 14 21:24:49 1996 +0200
@@ -383,30 +383,35 @@
this test allows a smalltalk to be built without Projects/ChangeSets
"
Project notNil ifTrue:[
- fileName := Project currentProjectDirectory , fileName.
+ fileName := Project currentProjectDirectory , fileName.
].
self withWaitCursorDo:[
- "
- if file exists, save original in a .sav file
- "
- fileName asFilename exists ifTrue:[
- self busyLabel:'saving existing %1' with:fileName.
- fileName asFilename copyTo:(fileName , '.sav')
- ].
-
- aStream := FileStream newFileNamed:fileName.
- aStream isNil ifTrue:[
- self warn:'cannot create: %1' with:fileName
- ] ifFalse:[
- self busyLabel:'writing: %1' with:fileName.
- Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
- aClass fileOutOn:aStream.
- ].
- aStream close.
- ]
+ "
+ if file exists, save original in a .sav file
+ "
+ fileName asFilename exists ifTrue:[
+ self busyLabel:'saving existing %1' with:fileName.
+ fileName asFilename copyTo:(fileName , '.sav')
+ ].
+
+ aStream := FileStream newFileNamed:fileName.
+ aStream isNil ifTrue:[
+ self warn:'cannot create: %1' with:fileName
+ ] ifFalse:[
+ self busyLabel:'writing: %1' with:fileName.
+ Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
+ aClass isPrivate ifFalse:[
+ self busyLabel:'writing: %1' with:fileName.
+ aClass fileOutOn:aStream.
+ ]
+ ].
+ aStream close.
+ ]
].
self normalLabel.
+
+ "Modified: 14.10.1996 / 20:15:45 / cg"
!
classCategoryFileOutBinaryEach
@@ -415,41 +420,48 @@
|mode|
mode := Dialog choose:(resources string:'save including sources ?')
- labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
- values:#(nil #discard #reference #keep)
- default:#keep.
+ labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
+ values:#(nil #discard #reference #keep)
+ default:#keep.
mode isNil ifTrue:[^ self].
self withWaitCursorDo:[
- Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
- self busyLabel:'saving binary of: %1' with:aClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot create: %1' with:ex parameter.
- ex return.
- ] do:[
- aClass binaryFileOutWithSourceMode:mode.
- ]
- ].
- self normalLabel.
+ Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
+ aClass isPrivate ifFalse:[
+ self busyLabel:'saving binary of: %1' with:aClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot create: %1' with:ex parameter.
+ ex return.
+ ] do:[
+ aClass binaryFileOutWithSourceMode:mode.
+ ]
+ ]
+ ].
+ self normalLabel.
]
"Created: 25.1.1996 / 17:27:45 / cg"
+ "Modified: 14.10.1996 / 20:14:42 / cg"
!
classCategoryFileOutEach
self withWaitCursorDo:[
Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
- self busyLabel:'saving: %1' with:aClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString.
- ex return.
- ] do:[
- aClass fileOut
+ aClass isPrivate ifFalse:[
+ self busyLabel:'saving: %1' with:aClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString.
+ ex return.
+ ] do:[
+ aClass fileOut
+ ]
]
].
self normalLabel.
]
+
+ "Modified: 14.10.1996 / 20:14:23 / cg"
!
classCategoryFindClass
@@ -1391,16 +1403,22 @@
self doClassMenu:[:currentClass |
|msg|
- self busyLabel:'saving %1' with:currentClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot fileOut: %1\(%2)' with:currentClass name with:ex errorString.
-
- ex return.
- ] do:[
- currentClass fileOut.
+ currentClass isPrivate ifTrue:[
+ self warn:'You must fileOut the owning class: ' , currentClass owningClass name
+ ] ifFalse:[
+ self busyLabel:'saving %1' with:currentClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot fileOut: %1\(%2)' with:currentClass name with:ex errorString.
+
+ ex return.
+ ] do:[
+ currentClass fileOut.
+ ].
].
self normalLabel.
]
+
+ "Modified: 14.10.1996 / 20:12:24 / cg"
!
classFileOutBinary
@@ -1409,27 +1427,32 @@
|mode|
mode := Dialog choose:(resources string:'save including sources ?')
- labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
- values:#(nil #discard #reference #keep)
- default:#keep.
+ labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
+ values:#(nil #discard #reference #keep)
+ default:#keep.
mode isNil ifTrue:[^ self]. "/ cancelled
self doClassMenu:[:currentClass |
- |msg|
-
- self busyLabel:'saving binary of %1' with:currentClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot create: %1\(%2)' with:ex parameter with:ex errorString.
-
- ex return.
- ] do:[
- currentClass binaryFileOutWithSourceMode:mode.
- ].
- self normalLabel.
+ |msg|
+
+ currentClass isPrivate ifTrue:[
+ self warn:'You must fileOut the owning class: ' , currentClass owningClass name
+ ] ifFalse:[
+ self busyLabel:'saving binary of %1' with:currentClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot create: %1\(%2)' with:ex parameter with:ex errorString.
+
+ ex return.
+ ] do:[
+ currentClass binaryFileOutWithSourceMode:mode.
+ ].
+ ].
+ self normalLabel.
]
"Created: 24.1.1996 / 21:11:03 / cg"
+ "Modified: 14.10.1996 / 20:12:46 / cg"
!
classHierarchy
@@ -3452,11 +3475,11 @@
!
switchToClassNamed:aString
- |meta str classSymbol theClass newCat element|
+ |meta str classSymbol theClass newCat element idx|
meta := false.
str := aString.
- classSymbol := aString asSymbolIfInterned.
+ classSymbol := aString withoutSpaces asSymbolIfInterned.
classSymbol isNil ifTrue:[
(aString endsWith:' class') ifTrue:[
str := aString copyWithoutLast:6.
@@ -3505,7 +3528,11 @@
self updateClassList.
self switchToClass:theClass.
- classListView setSelectElement:str.
+ idx := classListView list findFirst:[:line | line withoutSpaces = str].
+ classListView selection:idx.
+
+"/ classListView setSelectElement:str.
+
self instanceProtocol:meta not.
self classSelectionChanged.
classCategoryListView notNil ifTrue:[
@@ -3514,8 +3541,8 @@
]
"Modified: 1.9.1995 / 01:41:35 / claus"
- "Modified: 26.5.1996 / 15:04:11 / cg"
"Modified: 17.6.1996 / 16:54:55 / stefan"
+ "Modified: 14.10.1996 / 20:21:23 / cg"
!
updateClassList
@@ -7872,6 +7899,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.180 1996-10-14 17:41:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.181 1996-10-14 19:24:49 cg Exp $'
! !
BrowserView initialize!
--- a/BrwsrView.st Mon Oct 14 21:09:53 1996 +0200
+++ b/BrwsrView.st Mon Oct 14 21:24:49 1996 +0200
@@ -383,30 +383,35 @@
this test allows a smalltalk to be built without Projects/ChangeSets
"
Project notNil ifTrue:[
- fileName := Project currentProjectDirectory , fileName.
+ fileName := Project currentProjectDirectory , fileName.
].
self withWaitCursorDo:[
- "
- if file exists, save original in a .sav file
- "
- fileName asFilename exists ifTrue:[
- self busyLabel:'saving existing %1' with:fileName.
- fileName asFilename copyTo:(fileName , '.sav')
- ].
-
- aStream := FileStream newFileNamed:fileName.
- aStream isNil ifTrue:[
- self warn:'cannot create: %1' with:fileName
- ] ifFalse:[
- self busyLabel:'writing: %1' with:fileName.
- Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
- aClass fileOutOn:aStream.
- ].
- aStream close.
- ]
+ "
+ if file exists, save original in a .sav file
+ "
+ fileName asFilename exists ifTrue:[
+ self busyLabel:'saving existing %1' with:fileName.
+ fileName asFilename copyTo:(fileName , '.sav')
+ ].
+
+ aStream := FileStream newFileNamed:fileName.
+ aStream isNil ifTrue:[
+ self warn:'cannot create: %1' with:fileName
+ ] ifFalse:[
+ self busyLabel:'writing: %1' with:fileName.
+ Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
+ aClass isPrivate ifFalse:[
+ self busyLabel:'writing: %1' with:fileName.
+ aClass fileOutOn:aStream.
+ ]
+ ].
+ aStream close.
+ ]
].
self normalLabel.
+
+ "Modified: 14.10.1996 / 20:15:45 / cg"
!
classCategoryFileOutBinaryEach
@@ -415,41 +420,48 @@
|mode|
mode := Dialog choose:(resources string:'save including sources ?')
- labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
- values:#(nil #discard #reference #keep)
- default:#keep.
+ labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
+ values:#(nil #discard #reference #keep)
+ default:#keep.
mode isNil ifTrue:[^ self].
self withWaitCursorDo:[
- Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
- self busyLabel:'saving binary of: %1' with:aClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot create: %1' with:ex parameter.
- ex return.
- ] do:[
- aClass binaryFileOutWithSourceMode:mode.
- ]
- ].
- self normalLabel.
+ Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
+ aClass isPrivate ifFalse:[
+ self busyLabel:'saving binary of: %1' with:aClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot create: %1' with:ex parameter.
+ ex return.
+ ] do:[
+ aClass binaryFileOutWithSourceMode:mode.
+ ]
+ ]
+ ].
+ self normalLabel.
]
"Created: 25.1.1996 / 17:27:45 / cg"
+ "Modified: 14.10.1996 / 20:14:42 / cg"
!
classCategoryFileOutEach
self withWaitCursorDo:[
Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
- self busyLabel:'saving: %1' with:aClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString.
- ex return.
- ] do:[
- aClass fileOut
+ aClass isPrivate ifFalse:[
+ self busyLabel:'saving: %1' with:aClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString.
+ ex return.
+ ] do:[
+ aClass fileOut
+ ]
]
].
self normalLabel.
]
+
+ "Modified: 14.10.1996 / 20:14:23 / cg"
!
classCategoryFindClass
@@ -1391,16 +1403,22 @@
self doClassMenu:[:currentClass |
|msg|
- self busyLabel:'saving %1' with:currentClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot fileOut: %1\(%2)' with:currentClass name with:ex errorString.
-
- ex return.
- ] do:[
- currentClass fileOut.
+ currentClass isPrivate ifTrue:[
+ self warn:'You must fileOut the owning class: ' , currentClass owningClass name
+ ] ifFalse:[
+ self busyLabel:'saving %1' with:currentClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot fileOut: %1\(%2)' with:currentClass name with:ex errorString.
+
+ ex return.
+ ] do:[
+ currentClass fileOut.
+ ].
].
self normalLabel.
]
+
+ "Modified: 14.10.1996 / 20:12:24 / cg"
!
classFileOutBinary
@@ -1409,27 +1427,32 @@
|mode|
mode := Dialog choose:(resources string:'save including sources ?')
- labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
- values:#(nil #discard #reference #keep)
- default:#keep.
+ labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
+ values:#(nil #discard #reference #keep)
+ default:#keep.
mode isNil ifTrue:[^ self]. "/ cancelled
self doClassMenu:[:currentClass |
- |msg|
-
- self busyLabel:'saving binary of %1' with:currentClass name.
- Class fileOutErrorSignal handle:[:ex |
- self warn:'cannot create: %1\(%2)' with:ex parameter with:ex errorString.
-
- ex return.
- ] do:[
- currentClass binaryFileOutWithSourceMode:mode.
- ].
- self normalLabel.
+ |msg|
+
+ currentClass isPrivate ifTrue:[
+ self warn:'You must fileOut the owning class: ' , currentClass owningClass name
+ ] ifFalse:[
+ self busyLabel:'saving binary of %1' with:currentClass name.
+ Class fileOutErrorSignal handle:[:ex |
+ self warn:'cannot create: %1\(%2)' with:ex parameter with:ex errorString.
+
+ ex return.
+ ] do:[
+ currentClass binaryFileOutWithSourceMode:mode.
+ ].
+ ].
+ self normalLabel.
]
"Created: 24.1.1996 / 21:11:03 / cg"
+ "Modified: 14.10.1996 / 20:12:46 / cg"
!
classHierarchy
@@ -3452,11 +3475,11 @@
!
switchToClassNamed:aString
- |meta str classSymbol theClass newCat element|
+ |meta str classSymbol theClass newCat element idx|
meta := false.
str := aString.
- classSymbol := aString asSymbolIfInterned.
+ classSymbol := aString withoutSpaces asSymbolIfInterned.
classSymbol isNil ifTrue:[
(aString endsWith:' class') ifTrue:[
str := aString copyWithoutLast:6.
@@ -3505,7 +3528,11 @@
self updateClassList.
self switchToClass:theClass.
- classListView setSelectElement:str.
+ idx := classListView list findFirst:[:line | line withoutSpaces = str].
+ classListView selection:idx.
+
+"/ classListView setSelectElement:str.
+
self instanceProtocol:meta not.
self classSelectionChanged.
classCategoryListView notNil ifTrue:[
@@ -3514,8 +3541,8 @@
]
"Modified: 1.9.1995 / 01:41:35 / claus"
- "Modified: 26.5.1996 / 15:04:11 / cg"
"Modified: 17.6.1996 / 16:54:55 / stefan"
+ "Modified: 14.10.1996 / 20:21:23 / cg"
!
updateClassList
@@ -7872,6 +7899,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.180 1996-10-14 17:41:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.181 1996-10-14 19:24:49 cg Exp $'
! !
BrowserView initialize!