changed: #rawSourceStream
recover the correct version of the extensions.st sourcefile
revision from the sourceCodeManager; using the extensionsVersion_XXX
information.
--- a/Method.st Fri Oct 09 19:48:16 2009 +0200
+++ b/Method.st Fri Oct 09 20:16:21 2009 +0200
@@ -1605,7 +1605,7 @@
rawSourceStream
"return an open sourceStream (needs positioning)"
- |aStream fileName who myClass mgr className classNameSymbol sep dir mod|
+ |aStream fileName who myClass mgr className classNameSymbol dir mod|
"
if sourcePosition is nonNil, its the fileName and
@@ -1681,24 +1681,20 @@
myClass := who methodClass.
(package notNil and:[package ~= myClass package]) ifTrue:[
+ "/ I am an extension
mgr notNil ifTrue:[
"/ try to get the source using my package information ...
- sep := package indexOfAny:'/\:'.
- sep ~~ 0 ifTrue:[
- mod := package copyTo:sep - 1.
- dir := package copyFrom:sep + 1.
- aStream := mgr streamForClass:nil fileName:source revision:nil directory:dir module:mod cache:false.
- aStream notNil ifTrue:[
- ^ aStream
- ].
- ].
- ].
- dir := Smalltalk projectDirectoryForPackage:package.
- dir notNil ifTrue:[
- aStream := (dir asFilename construct:source) readStream.
+ mod := package asPackageId module.
+ dir := package asPackageId directory.
+ aStream := mgr streamForExtensionFile:source package:package directory:dir module:mod cache:true.
aStream notNil ifTrue:[
^ aStream
].
+ ].
+ "/ consult the local fileSystem
+ aStream := self localSourceStream.
+ aStream notNil ifTrue:[
+ ^ aStream
]
].
@@ -2887,11 +2883,11 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.329 2009-10-07 12:17:13 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.330 2009-10-09 18:16:21 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.329 2009-10-07 12:17:13 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.330 2009-10-09 18:16:21 cg Exp $'
! !
Method initialize!