equal
deleted
inserted
replaced
1092 ! |
1092 ! |
1093 |
1093 |
1094 sourceFilename |
1094 sourceFilename |
1095 "return the sourcefilename if source is extern; nil otherwise" |
1095 "return the sourcefilename if source is extern; nil otherwise" |
1096 |
1096 |
|
1097 |source| |
|
1098 |
1097 self isMethodOrLazyMethod ifTrue:[ |
1099 self isMethodOrLazyMethod ifTrue:[ |
1098 self sourcePosition notNil ifTrue:[ |
1100 self sourcePosition notNil ifTrue:[ |
1099 ^ self at:(Method instVarOffsetOf:'source'). |
1101 source := self at:(Method instVarOffsetOf:'source'). |
|
1102 source isString ifTrue:[ |
|
1103 source := memory printStringOfString:source. |
|
1104 ]. |
|
1105 ^ source. |
1100 ]. |
1106 ]. |
1101 ^ nil |
1107 ^ nil |
1102 ]. |
1108 ]. |
1103 self halt. |
1109 self halt. |
1104 ! |
1110 ! |
1335 searching in standard places." |
1341 searching in standard places." |
1336 |
1342 |
1337 |fileName aStream package source| |
1343 |fileName aStream package source| |
1338 |
1344 |
1339 package := self package. |
1345 package := self package. |
1340 source := self at:(Method instVarOffsetOf:'source'). |
1346 source := self sourceFilename. |
1341 package notNil ifTrue:[ |
1347 package notNil ifTrue:[ |
1342 fileName := Smalltalk getSourceFileName:(package copyReplaceAll:$: with:$/) , '/' , source. |
1348 fileName := Smalltalk getSourceFileName:(package copyReplaceAll:$: with:$/) , '/' , source. |
1343 fileName notNil ifTrue:[ |
1349 fileName notNil ifTrue:[ |
1344 aStream := fileName asFilename readStream. |
1350 aStream := fileName asFilename readStream. |
1345 aStream notNil ifTrue:[^ aStream]. |
1351 aStream notNil ifTrue:[^ aStream]. |