JavaNativeMethod.st
changeset 3213 d3094b384e55
parent 3196 d617b4590431
child 3324 a58245c0e83a
--- a/JavaNativeMethod.st	Thu Aug 07 14:42:02 2014 +0100
+++ b/JavaNativeMethod.st	Fri Aug 08 07:36:58 2014 +0100
@@ -510,6 +510,27 @@
     "Modified: / 10-03-2013 / 01:39:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!JavaNativeMethod methodsFor:'queries'!
+
+lineNumberForPC0: pc
+    | src name lineNumber |
+
+    src := javaClass source.
+    src notNil ifTrue:[    
+        name := self name.
+        src asStringCollection withIndexDo:[:l :lno|
+            ((l includesString: 'native') and:[l includesString: name]) ifTrue:[
+                lineNumber := lno.
+                ^ lineNumber
+            ].
+        ]. 
+    ].
+    lineNumber := 1.
+    ^ lineNumber
+
+    "Created: / 08-08-2014 / 07:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !JavaNativeMethod methodsFor:'vm support'!
 
 nativeMethodInvokation