# HG changeset patch # User Claus Gittinger # Date 1014667323 -3600 # Node ID d5e4612bf7cf602691ac3f89f3c6610758a7e266 # Parent 1d7fd5dde6009b035f879dbe854ab028c473f1eb implements -> includesSelector diff -r 1d7fd5dde600 -r d5e4612bf7cf UIHelpTool.st --- a/UIHelpTool.st Mon Feb 25 20:56:30 2002 +0100 +++ b/UIHelpTool.st Mon Feb 25 21:02:03 2002 +0100 @@ -12,6 +12,8 @@ +"{ Package: 'stx:libtool2' }" + ToolApplicationModel subclass:#UIHelpTool instanceVariableNames:'specClass specSelector dictionary dictionaries listSelection maxCharsPerLine modifiedHolder modified' @@ -665,7 +667,7 @@ (specClass isClass and: [specClass isLoaded]) ifTrue: [ - (specClass class implements:specSelector) ifFalse:[ + (specClass class includesSelector:specSelector) ifFalse:[ dictionaries at: specClass name put: dictionary ]. list := self listOfHelpSpecClasses. @@ -684,7 +686,6 @@ ]. self updateList - ! ! !UIHelpTool methodsFor:'callbacks'! @@ -729,7 +730,7 @@ specClass isClass ifTrue: [ - (specClass class implements: specSelector) + (specClass class includesSelector: specSelector) ifFalse: [ ^specSelector isNil @@ -739,9 +740,6 @@ ^specClass name, ' >> ', specSelector ]. ^'No class and selector defined.' - - - ! openDocumentation @@ -797,8 +795,8 @@ |helpSpecSuperClass superHelpSpecKeys helpSpec| - ((aClass class implements: specSelector) - and: [(helpSpecSuperClass := aClass allSuperclasses detect: [:cls| cls class implements: specSelector] ifNone: nil) notNil]) + ((aClass class includesSelector: specSelector) + and: [(helpSpecSuperClass := aClass allSuperclasses detect: [:cls| cls class includesSelector: specSelector] ifNone: nil) notNil]) ifTrue:[ superHelpSpecKeys := helpSpecSuperClass helpSpec keys. helpSpec := Dictionary new. @@ -891,7 +889,7 @@ helpSpec at: h key put: (self getUnformattedHelpText: h value) ]. - (cls class implements: specSelector) + (cls class includesSelector: specSelector) ifTrue: [ |superclassHelpKeys implementedHelpSpec hasChanged| @@ -1093,7 +1091,7 @@ msg := aString asCollectionOfWords. (msg size == 2 and: [(cls := self resolveName:(msg at:1)) notNil and: - [cls class implements: (sel := (msg at: 2) asSymbol)]]) + [cls class includesSelector: (sel := (msg at: 2) asSymbol)]]) ifTrue: [ self buildFromClass: (specClass := cls name) andSelector: (specSelector := sel). @@ -1101,7 +1099,6 @@ ] ]. ^false - ! openInterface:aSymbol diff -r 1d7fd5dde600 -r d5e4612bf7cf UIPainter.st --- a/UIPainter.st Mon Feb 25 20:56:30 2002 +0100 +++ b/UIPainter.st Mon Feb 25 21:02:03 2002 +0100 @@ -2173,7 +2173,7 @@ tableSelector := tableSelector size ~~ 0 ifTrue:[tableSelector asSymbol] ifFalse:[nil]. - (tableSelector notNil and:[cls class implements:tableSelector]) ifTrue:[ + (tableSelector notNil and:[cls class includesSelector:tableSelector]) ifTrue:[ editor openModalOnClass:cls andSelector:tableSelector ] ifFalse:[ columns := specTool specification columns. @@ -3404,7 +3404,7 @@ again ifFalse:[ ((Smalltalk at:specClass asSymbol) notNil - and:[ (Smalltalk at:specClass asSymbol) class implements:specSelector ]) + and:[ (Smalltalk at:specClass asSymbol) class includesSelector:specSelector ]) ifTrue:[ (self confirm:('%1 already implements %2. Overwrite ?' bindWith:specClass with:specSelector)) ifFalse:[ @@ -3703,10 +3703,9 @@ self updateInfoLabel. modified := false. painter resetModification. - (cls class implements: specSelector) ifTrue:[ + (cls class includesSelector: specSelector) ifTrue:[ self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. ]. - ! doSaveAs diff -r 1d7fd5dde600 -r d5e4612bf7cf UIPainterView.st --- a/UIPainterView.st Mon Feb 25 20:56:30 2002 +0100 +++ b/UIPainterView.st Mon Feb 25 21:02:03 2002 +0100 @@ -588,10 +588,10 @@ (selector := aProp model) notNil ifTrue:[ selector isArray ifFalse:[ selector := selector asSymbol. - (cls implements:selector) ifTrue:[ + (cls includesSelector:selector) ifTrue:[ skip := false. (cls isSubclassOf:SimpleDialog) ifTrue:[ - skip := SimpleDialog implements:selector asSymbol + skip := SimpleDialog includesSelector:selector asSymbol ]. skip ifFalse:[ methods add:(cls compiledMethodAt:selector) @@ -603,7 +603,7 @@ (selector := aProp menu) notNil ifTrue:[ selector isArray ifFalse:[ selector := selector asSymbol. - (cls implements:selector) ifTrue:[ + (cls includesSelector:selector) ifTrue:[ methods add:(cls compiledMethodAt:selector) ] ]. @@ -614,7 +614,7 @@ aSel isArray ifFalse:[ selector := aSel asSymbol. - (cls implements:selector) ifTrue:[ + (cls includesSelector:selector) ifTrue:[ methods add:(cls compiledMethodAt:selector) ] ]. @@ -624,7 +624,7 @@ aSel isArray ifFalse:[ selector := aSel asSymbol. - (cls implements:selector) ifTrue:[ + (cls includesSelector:selector) ifTrue:[ methods add:(cls compiledMethodAt:selector) ] ]. @@ -634,7 +634,7 @@ aSel isArray ifFalse:[ selector := aSel asSymbol. - (cls implements:selector) ifTrue:[ + (cls includesSelector:selector) ifTrue:[ methods add:(cls compiledMethodAt:selector) ] ]. @@ -646,7 +646,7 @@ (selector := protoSpec menu) notNil ifTrue:[ selector isArray ifFalse:[ selector := selector asSymbol. - (cls implements:selector) ifTrue:[ + (cls includesSelector:selector) ifTrue:[ methods add:(cls compiledMethodAt:selector) ] ]. @@ -821,7 +821,7 @@ skip := false. (cls isSubclassOf:SimpleDialog) ifTrue:[ - skip := SimpleDialog implements:sym + skip := SimpleDialog includesSelector:sym ]. (definedMethodSelectors includes:sym) ifTrue:[ skip := true. @@ -1019,7 +1019,7 @@ self class redefineAspectMethods ifTrue:[ aListOfSelectors do:[:aSelector| - (aSelector isArray or:[aClass implements:aSelector]) ifFalse:[ + (aSelector isArray or:[aClass includesSelector:aSelector]) ifFalse:[ aBlock value:aSelector ] ifTrue:[ Transcript showCR:'#' , aSelector , ' skipped - already implemented in the class' @@ -1036,8 +1036,6 @@ ] ] ] - - ! generateHookMethodFor:selectorSpec comment:commentWhen note:noteOrNil defaultCode:defaultCode inClass:targetClass @@ -1086,7 +1084,7 @@ code := ''. - (targetClass implements:#postBuildWith:) ifFalse:[ + (targetClass includesSelector:#postBuildWith:) ifFalse:[ code := code , (self generateHookMethodFor:'postBuildWith:aBuilder' @@ -1095,7 +1093,7 @@ defaultCode:' super postBuildWith:aBuilder' inClass:targetClass) ]. - (targetClass implements:#postOpenWith:) ifFalse:[ + (targetClass includesSelector:#postOpenWith:) ifFalse:[ code := code , (self generateHookMethodFor:'postOpenWith:aBuilder' @@ -1104,7 +1102,7 @@ defaultCode:' super postOpenWith:aBuilder' inClass:targetClass) ]. - (targetClass implements:#closeRequest) ifFalse:[ + (targetClass includesSelector:#closeRequest) ifFalse:[ code := code , (self generateHookMethodFor:'closeRequest'