changed: #source
authorClaus Gittinger <cg@exept.de>
Tue, 15 Dec 2009 15:31:24 +0100
changeset 12620 5c18bf31424d
parent 12619 baba8c6085e2
child 12621 1f5d0785c7da
changed: #source
Method.st
--- a/Method.st	Tue Dec 15 15:18:45 2009 +0100
+++ b/Method.st	Tue Dec 15 15:31:24 2009 +0100
@@ -548,6 +548,12 @@
     "Cache the source of recently used methods"
     
     chunk notNil ifTrue:[
+        UserPreferences current keepMethodSourceCode ifTrue:[
+            source := chunk.
+            sourcePosition := nil.
+            ^ source.
+        ].
+
         CacheDictionary notNil ifTrue:[
             self class lastMethodSourcesLock critical:[
                 LastMethodSources isNil ifTrue:[
@@ -555,7 +561,7 @@
                 ].
                 LastMethodSources at:self put:chunk.
             ]
-        ]
+        ].
     ].
 
     ^ chunk
@@ -2926,11 +2932,11 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.343 2009-12-11 16:50:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.344 2009-12-15 14:31:24 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.343 2009-12-11 16:50:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.344 2009-12-15 14:31:24 cg Exp $'
 ! !
 
 Method initialize!