--- a/ChangesBrowser.st Tue Nov 19 18:05:15 2002 +0100
+++ b/ChangesBrowser.st Tue Nov 19 18:12:51 2002 +0100
@@ -3029,7 +3029,7 @@
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource
parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded
method beep superClass thisClassSym varsHere varsInChange addedVars removedVars
- isSame ownerClass|
+ isSame ownerClass superClassHere superClassInChange|
aStream := self streamForChange:changeNr.
aStream isNil ifTrue:[^ nil].
@@ -3162,52 +3162,59 @@
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'.
isSame := nil.
] 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:[
- ((selector endsWith:':category:')
- and:[thisClass category ~= (parseTree arguments at:5) evaluate]) ifTrue:[
- outcome := 'Category is different'.
- isSame := false.
+ superClassHere := thisClass superclass name.
+ superClassInChange := parseTree receiver name.
+ superClassHere ~~ superClassInChange ifTrue:[
+ outcome := 'Superclass is different.'.
+ isSame := false.
+ ] ifFalse:[
+ 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:[
+ ((selector endsWith:':category:')
+ and:[thisClass category ~= (parseTree arguments at:5) evaluate]) ifTrue:[
+ outcome := 'Category is different'.
+ isSame := false.
+ ] ifFalse:[
+ outcome := 'Change has no effect\\(same definition)'.
+ isSame := true.
+ ]
+ "/ thisClass category = (parseTree arguments at:5) evaluate ifTrue:[
+ "/ outcome := 'Change has no effect\\(same definition)'.
+ "/ isSame := true.
+ "/ ] ifFalse:[
+ "/ outcome := 'Category is different'.
+ "/ isSame := false.
+ "/ ]
] ifFalse:[
- outcome := 'Change has no effect\\(same definition)'.
- isSame := true.
- ]
-"/ thisClass category = (parseTree arguments at:5) evaluate ifTrue:[
-"/ outcome := 'Change has no effect\\(same definition)'.
-"/ isSame := true.
-"/ ] ifFalse:[
-"/ outcome := 'Category is different'.
-"/ isSame := false.
-"/ ]
+ outcome := 'SharedPool definition is different'.
+ isSame := false.
+ ].
] ifFalse:[
- outcome := 'SharedPool definition is different'.
+ outcome := 'ClassVariable definition is different'.
isSame := false.
- ].
- ] ifFalse:[
- outcome := 'ClassVariable definition is different'.
- isSame := false.
- ]
- ] ifFalse:[
- outcome := 'InstanceVariable definition is different'.
- isSame := false.
- addedVars := varsInChange select:[:eachVar | (varsHere includes:eachVar) not].
- removedVars := varsHere select:[:eachVar | (varsInChange includes:eachVar) not].
- addedVars isEmpty ifTrue:[
- removedVars isEmpty ifTrue:[
- outcome := 'Change reorders instanceVariable(s)'.
- ] ifFalse:[
- removedVars := removedVars collect:[:eachVar | '''' , eachVar , ''''].
- outcome := 'Change removes instanceVariable(s): ' , (removedVars asStringWith:Character space) allBold.
]
] ifFalse:[
- removedVars isEmpty ifTrue:[
- addedVars := addedVars collect:[:eachVar | '''' , eachVar , ''''].
- outcome := 'Change adds instanceVariable(s): ' , (addedVars asStringWith:Character space) allBold.
+ outcome := 'InstanceVariable definition is different'.
+ isSame := false.
+ addedVars := varsInChange select:[:eachVar | (varsHere includes:eachVar) not].
+ removedVars := varsHere select:[:eachVar | (varsInChange includes:eachVar) not].
+ addedVars isEmpty ifTrue:[
+ removedVars isEmpty ifTrue:[
+ outcome := 'Change reorders instanceVariable(s)'.
+ ] ifFalse:[
+ removedVars := removedVars collect:[:eachVar | '''' , eachVar , ''''].
+ outcome := 'Change removes instanceVariable(s): ' , (removedVars asStringWith:Character space) allBold.
+ ]
+ ] ifFalse:[
+ removedVars isEmpty ifTrue:[
+ addedVars := addedVars collect:[:eachVar | '''' , eachVar , ''''].
+ outcome := 'Change adds instanceVariable(s): ' , (addedVars asStringWith:Character space) allBold.
+ ].
].
- ].
+ ]
]
]
]
@@ -3840,9 +3847,11 @@
|clsName cls|
clsName := self classNameOfChange:lineNr.
- clsName := clsName asSymbolIfInterned.
clsName notNil ifTrue:[
- cls := Smalltalk at:clsName ifAbsent:nil.
+ clsName := clsName asSymbolIfInterned.
+ clsName notNil ifTrue:[
+ cls := Smalltalk at:clsName ifAbsent:nil.
+ ]
].
Compiler
evaluate:theCode
@@ -5120,5 +5129,5 @@
!ChangesBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.279 2002-11-18 20:45:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.280 2002-11-19 17:12:51 cg Exp $'
! !