--- a/Method.st Tue Oct 11 16:53:59 2011 +0100
+++ b/Method.st Wed Oct 12 13:21:28 2011 +0100
@@ -1996,7 +1996,7 @@
You have to close the stream, if usingCacheBoolean is false, and should not close it
if usingCacheBoolean is true."
- |aStream fileName who myClass mgr className classNameSymbol dir mod|
+ |aStream fileName who myClass mgr className classNameSymbol dir mod pkgDef |
"
if sourcePosition is nonNil, its the fileName and
@@ -2058,7 +2058,21 @@
"/
"/ if there is no SourceManager, look in local standard places first
"/
- (Class tryLocalSourceFirst or:[(mgr := Smalltalk at:#SourceCodeManager) isNil]) ifTrue:[
+ package == mclass package ifTrue:[
+ mgr := mclass sourceCodeManagerFromBinaryRevision
+ ] ifFalse:[
+ "I'm an extension and we don't have binary revision info (!!)
+ for extensions, try tp guess here"
+ pkgDef := ProjectDefinition definitionClassForPackage: package.
+ pkgDef notNil ifTrue:[
+ mgr := pkgDef sourceCodeManagerFromBinaryRevision
+ ] ifFalse:[
+ "OK, trust the configuration"
+ mgr := AbstractSourceCodeManager managerForPackage: package
+ ]
+ ].
+
+ (Class tryLocalSourceFirst or:[mgr isNil]) ifTrue:[
aStream := self localSourceStream.
aStream notNil ifTrue:[
usingCacheBoolean ifTrue:[
@@ -2068,6 +2082,7 @@
].
].
+
"/
"/ nope - ask my class for the source (this also invokes the SCMgr)
"/
@@ -2161,6 +2176,7 @@
^ nil
"Modified: / 26-11-2006 / 22:33:38 / cg"
+ "Modified: / 12-10-2011 / 13:18:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
setLookupObject: lookup
@@ -3574,7 +3590,7 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Id: Method.st 10700 2011-09-29 15:44:37Z vranyj1 $'
+ ^ '$Id: Method.st 10718 2011-10-12 12:21:28Z vranyj1 $'
!
version_CVS
@@ -3582,7 +3598,7 @@
!
version_SVN
- ^ '$Id: Method.st 10700 2011-09-29 15:44:37Z vranyj1 $'
+ ^ '$Id: Method.st 10718 2011-10-12 12:21:28Z vranyj1 $'
! !
Method initialize!