STC bug workaround in JavaMethod>>source.
--- a/JavaMethod.st Wed Sep 11 02:36:57 2013 +0100
+++ b/JavaMethod.st Wed Sep 11 03:01:48 2013 +0100
@@ -1293,29 +1293,28 @@
^ self decompiledBytecode
].
- source notNil ifTrue:[
- ^ source readFrom: javaClass source.
- ].
-
sourceString := javaClass source.
sourceString isNil ifTrue:[
^ self decompiledSource.
].
+
+ source notNil ifTrue:[
+ ^ source readFrom: sourceString.
+ ].
+
+
"/ stx:libjava/tools may not be loaded...
- ^ JavaSourceDocument notNil ifTrue:[
+ JavaSourceDocument notNil ifTrue:[
"/ As a side effect, this fills in source references for all methods.
"/ see JavaSourceDocument
| document |
((document := self sourceDocument) notNil and:[document sourceTree notNil]) ifTrue:[
- source readFrom: javaClass source.
- ] ifFalse:[
- sourceString
+ ^ source readFrom: sourceString.
]
- ] ifFalse:[
- sourceString
- ]
+ ].
+ ^ sourceString
"Modified: / 04-01-1998 / 13:48:35 / cg"
"Modified: / 13-12-2010 / 11:06:51 / Jan Kurs <kurs.jan@post.cz>"