Fixes in WrappedMethod jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 16 Oct 2013 01:22:03 +0100
branchjv
changeset 3409 2f35547d8d1e
parent 3407 989191014bcd
child 3410 c8322a50b967
Fixes in WrappedMethod - nicer presentation - support for wrapping Java methods
WrappedMethod.st
--- a/WrappedMethod.st	Sat Oct 05 12:51:21 2013 +0100
+++ b/WrappedMethod.st	Wed Oct 16 01:22:03 2013 +0100
@@ -11,7 +11,7 @@
 "
 "{ Package: 'stx:libbasic3' }"
 
-Method subclass:#WrappedMethod
+Method variableSubclass:#WrappedMethod
 	instanceVariableNames:''
 	classVariableNames:'AllWrappedMethods'
 	poolDictionaries:''
@@ -244,6 +244,22 @@
     "return the source of the method"
 
     ^ self originalMethod source
+!
+
+sourceFilename
+    "return the sourcefilename if source is extern; nil otherwise"
+
+    ^ self originalMethod sourceFilename
+
+    "Created: / 16-10-2013 / 00:05:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourcePosition
+    "return the sourceposition if source is extern; nil otherwise"
+
+    ^ self originalMethod sourcePosition
+
+    "Created: / 16-10-2013 / 00:05:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !WrappedMethod methodsFor:'misc'!
@@ -267,6 +283,28 @@
     "Created: / 01-07-2011 / 10:03:32 / cg"
 ! !
 
+!WrappedMethod methodsFor:'printing & storing'!
+
+selectorPrintStringInBrowserFor:selector
+    ^ [
+        self originalMethod perform:  #selectorPrintStringInBrowserFor: with: selector
+    ] on: Object messageNotUnderstoodSignal do:[
+        super selectorPrintStringInBrowserFor:selector
+    ].
+
+    "Created: / 16-10-2013 / 01:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+selectorPrintStringInBrowserFor:selector class: class
+    ^ [
+        self originalMethod perform:  #selectorPrintStringInBrowserFor:class: with: selector with: class
+    ] on: Object messageNotUnderstoodSignal do:[
+        super selectorPrintStringInBrowserFor:selector class: class
+    ].
+
+    "Created: / 16-10-2013 / 01:04:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !WrappedMethod methodsFor:'printing and storing'!
 
 printOn:aStream