--- a/BrowserView.st Fri Nov 01 20:51:33 1996 +0100
+++ b/BrowserView.st Tue Nov 05 00:09:58 1996 +0100
@@ -11,18 +11,18 @@
"
StandardSystemView subclass:#BrowserView
- instanceVariableNames:'classCategoryListView classListView methodCategoryListView
- methodListView classMethodListView codeView classToggle
- instanceToggle currentNamespace currentClassCategory
- currentClassHierarchy currentClass currentMethodCategory
- currentMethod currentSelector showInstance actualClass fullClass
- lastMethodCategory aspect variableListView fullProtocol
- lockUpdates autoSearch myLabel acceptClass lastSourceLogMessage
- lastCategory lastModule lastPackage'
- classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
- StopIcon TraceIcon'
- poolDictionaries:''
- category:'Interface-Browsers'
+ instanceVariableNames:'classCategoryListView classListView methodCategoryListView
+ methodListView classMethodListView codeView classToggle
+ instanceToggle currentNamespace currentClassCategory
+ currentClassHierarchy currentClass currentMethodCategory
+ currentMethod currentSelector showInstance actualClass fullClass
+ lastMethodCategory aspect variableListView fullProtocol
+ lockUpdates autoSearch myLabel acceptClass lastSourceLogMessage
+ lastCategory lastModule lastPackage lastMethodMoveClass'
+ classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
+ StopIcon TraceIcon'
+ poolDictionaries:''
+ category:'Interface-Browsers'
!
!BrowserView class methodsFor:'documentation'!
@@ -3920,11 +3920,13 @@
|pos s|
- (aString endsWith:')') ifTrue:[
+ s := aString string withoutSpaces.
+ (s endsWith:' !!') ifTrue:[
+ s := s copyWithoutLast:2
+ ].
+ (s endsWith:')') ifTrue:[
s := aString copyTo:(aString lastIndexOf:$()-1.
s := s withoutSpaces.
- ] ifFalse:[
- s := aString
].
(s endsWith:' !!') ifTrue:[
s := s copyWithoutLast:2
@@ -3933,7 +3935,7 @@
^ s copyTo:(pos - 1)
"Modified: 17.6.1996 / 17:06:59 / stefan"
- "Modified: 17.7.1996 / 20:42:06 / cg"
+ "Modified: 4.11.1996 / 23:56:52 / cg"
!
classMethodSelection:lineNr
@@ -3982,11 +3984,13 @@
|pos s|
- (aString endsWith:')') ifTrue:[
+ s := aString withoutSpaces.
+ (s endsWith:' !!') ifTrue:[
+ s := s copyWithoutLast:2
+ ].
+ (s endsWith:')') ifTrue:[
s := aString copyTo:(aString lastIndexOf:$()-1.
s := s withoutSpaces.
- ] ifFalse:[
- s := aString
].
(s endsWith:' !!') ifTrue:[
s := s copyWithoutLast:2
@@ -3995,7 +3999,7 @@
^ s copyFrom:(pos + 1)
"Modified: 17.6.1996 / 17:04:38 / stefan"
- "Modified: 17.7.1996 / 20:43:20 / cg"
+ "Modified: 4.11.1996 / 23:57:00 / cg"
! !
!BrowserView methodsFor:'event handling'!
@@ -5992,20 +5996,30 @@
methodMove
"move the current method into another class; typically a superclass"
- |newClass newClassName|
+ |newClass newClassName sup initial|
self checkMethodSelected ifFalse:[^ self].
+ (initial := lastMethodMoveClass) isNil ifTrue:[
+ (sup := currentClass superclass) notNil ifTrue:[
+ initial := sup name
+ ] ifFalse:[
+ initial := nil.
+ ].
+ ].
+
newClassName := Dialog
request:'move current method to which class:'
- initialAnswer:(currentClass superclass name)
+ initialAnswer:initial
onCancel:nil.
newClassName isNil ifTrue:[^ self].
+
newClass := Smalltalk classNamed:newClassName.
newClass isNil ifTrue:[
self warn:'no such class'.
^ self
].
+ lastMethodMoveClass := newClassName.
showInstance ifFalse:[
newClass isMeta ifFalse:[
@@ -6020,7 +6034,7 @@
self methodRemove
"Created: 13.12.1995 / 10:56:42 / cg"
- "Modified: 27.1.1996 / 14:33:30 / cg"
+ "Modified: 4.11.1996 / 23:59:53 / cg"
!
methodNewMethod
@@ -8306,6 +8320,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.201 1996-11-01 16:23:10 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.202 1996-11-04 23:09:58 cg Exp $'
! !
BrowserView initialize!