--- a/ChangesBrowser.st Wed Nov 08 17:05:12 2000 +0100
+++ b/ChangesBrowser.st Wed Nov 08 17:06:13 2000 +0100
@@ -1967,7 +1967,7 @@
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource
parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded
- method beep superClass thisClassSym|
+ method beep superClass thisClassSym varsHere varsInChange addedVars removedVars|
aStream := self streamForChange:changeNr.
aStream isNil ifTrue:[^ self].
@@ -2054,7 +2054,9 @@
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[
outcome := 'cannot compare this change\\(compare requires class to be loaded).'.
] ifTrue:[
- thisClass instanceVariableString asCollectionOfWords = (parseTree arguments at:2) evaluate asCollectionOfWords ifTrue:[
+ varsHere := thisClass instanceVariableString asCollectionOfWords.
+ varsInChange := (parseTree arguments at:2) evaluate asCollectionOfWords.
+ varsHere = varsInChange ifTrue:[
thisClass classVariableString asCollectionOfWords = (parseTree arguments at:3) evaluate asCollectionOfWords ifTrue:[
((thisClass sharedPools size == 0) and:[(parseTree arguments at:4) evaluate = '']) ifTrue:[
thisClass category = (parseTree arguments at:5) evaluate ifTrue:[
@@ -2069,7 +2071,18 @@
outcome := 'classVariable definition is different'
]
] ifFalse:[
- outcome := 'instanceVariable definition is different'
+ outcome := 'instanceVariable definition is different'.
+ addedVars := varsInChange select:[:eachVar | (varsHere includes:eachVar) not].
+ removedVars := varsHere select:[:eachVar | (varsInChange includes:eachVar) not].
+ addedVars isEmpty ifTrue:[
+ removedVars := removedVars collect:[:eachVar | '''' , eachVar , ''''].
+ outcome := 'change removes instanceVariable(s): ' , (removedVars asStringWith:Character space).
+ ] ifFalse:[
+ removedVars isEmpty ifTrue:[
+ addedVars := addedVars collect:[:eachVar | '''' , eachVar , ''''].
+ outcome := 'change adds instanceVariable(s): ' , (addedVars asStringWith:Character space).
+ ].
+ ].
]
]
]
@@ -3492,5 +3505,5 @@
!ChangesBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.202 2000-10-13 14:01:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.203 2000-11-08 16:06:13 cg Exp $'
! !