Lazarus 1.8.0 RC3
macOS 10.12.6 Sierra
Hello, I've been looking at the Codetools package recently as I am planning to make an IDE tool which carries out sorting of implementation code on a procedure basis, based on the sequence of methods as declared in the interface section.
I've been looking at the examples in the Codetools examples, especially the code in /Developer/lazarus/components/codetools/examples/methodjumping.pas. I've run the code against the sample .pas scanexamples/methodjump1.pas and I get the output:
/Developer/lazarus/components/codetools/examples/scanexamples/methodjump1.pas 3,16 TopLine=14 RevertableJump=TRUE
The TopLine is the info i'm interested in because this is the start line number of the procedure in the implementation section.
But, what on earth is the 3,16? It doesn't seem to correspond to anything of interest in the example code, and indeed, looking at the source code, the critical method CodeToolBoss.JumpToMethod is being called with X:=14 and Y:=10; as input parameters. Incidently, it doesn't seem to matter what the value of X is - all integer value >= 1 appear to work.
CodeToolBoss.JumpToMethod in turn calls FCurCodeTool.FindJumpPoint but several layers deeper the value of NewPos is being altered to these mysterious values of 3 and 16. I've tried to debug using Xcode/LLDB but there seems to be a problem whereby Xcode doesn't keep track of a method's scoped variables when a nested procedure of function is called, and the job becomes more like trying to debug a large program with lots of global variables.
So just to re-iterate, does anyone have any idea of where CodeToolBoss.JumpToMethod is getting the output values 3 and 16 from?