--- a/MCMethodDefinition.st Wed Sep 07 14:04:26 2011 +0200
+++ b/MCMethodDefinition.st Wed Sep 07 14:04:38 2011 +0200
@@ -1,7 +1,8 @@
"{ Package: 'stx:goodies/monticello' }"
MCDefinition subclass:#MCMethodDefinition
- instanceVariableNames:'classIsMeta source category selector className timeStamp'
+ instanceVariableNames:'classIsMeta source category selector className timeStamp
+ installedClassName'
classVariableNames:'Definitions'
poolDictionaries:''
category:'Monticello-Modeling'
@@ -81,10 +82,15 @@
!MCMethodDefinition methodsFor:'accessing'!
actualClass
- ^Smalltalk at: className
- ifPresent: [:class | classIsMeta ifTrue: [class theMetaclass "classSide"] ifFalse: [class]]
+ ^ Smalltalk
+ at:(installedClassName? className)
+ ifPresent: [:class |
+ classIsMeta
+ ifTrue: [class theMetaclass "classSide"]
+ ifFalse: [class]
+ ]
- "Modified: / 31-08-2011 / 19:28:57 / cg"
+ "Modified: / 07-09-2011 / 13:36:18 / cg"
!
category
@@ -103,6 +109,12 @@
^Timestamp fromMethodTimeStamp: timeStamp
!
+installedClassName
+ ^ installedClassName ? className
+
+ "Created: / 07-09-2011 / 13:36:37 / cg"
+!
+
selector
^selector
!
@@ -192,7 +204,13 @@
!
load
- | package oldMethod newMethod |
+ | env package oldMethod newMethod |
+
+ env := MCStXNamespaceQuery query ? Smalltalk.
+ (env ~~ Smalltalk) ifTrue:[
+ installedClassName := env name,'::',className
+ ].
+
package := MCStXPackageQuery query.
oldMethod := self actualClass compiledMethodAt: self selector.
(oldMethod notNil and:[oldMethod package ~= package])
@@ -207,6 +225,7 @@
newMethod package: package
"Modified: / 08-11-2010 / 20:13:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 07-09-2011 / 13:35:37 / cg"
!
postloadOver: aDefinition
@@ -282,6 +301,7 @@
^self.
"Original stuff"
+ self todo:'cg: why was the code below removed? see browsers previous versions code'.
self isOverrideMethod ifTrue: [previousVersion := self scanForPreviousVersion].
previousVersion
@@ -289,6 +309,7 @@
ifNotNil: [previousVersion fileIn]
"Modified: / 11-09-2010 / 18:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 07-09-2011 / 13:39:38 / cg"
! !
!MCMethodDefinition methodsFor:'printing'!
@@ -381,11 +402,11 @@
!MCMethodDefinition class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCMethodDefinition.st,v 1.5 2011-09-05 06:18:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCMethodDefinition.st,v 1.6 2011-09-07 12:04:38 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCMethodDefinition.st,v 1.5 2011-09-05 06:18:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCMethodDefinition.st,v 1.6 2011-09-07 12:04:38 cg Exp $'
!
version_SVN