This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Usecase: 1) start debugging 2) add several line to code 3) add new line breakpoint to the last line of changed method -> we need to get original line number for this line.
Othervise we are not able to fix several bugs.
that one will be tough, pnejedly is on vacation for until the week after next week
-> jtulach this one is probably not fixable. I talked w/ Jarda yesterday. The issue is nobody knows what "original line number" means. For debugger it's the line number when the source was compiled _and_ the classfile loaded into the debugger. For search modules which tries to sync the results with the editted files, original line number means something else, at least not related to compilation at all. IMHO, this API method is not very bright one (to say it mindly)
Not true. I am not asking for original line number in sense of debugger or search module. I am asking for original line in sense of openide.text api. And definition of it is very simple. Lets say we have some currentLineNumber. originalLineNumber line number should be defined by simple expression: Line.Set.getOriginal (originalLineNumber).getLineNumber () == Line.Set.getCurrent (currentLineNumber).getLineNumber () And some exception should be thrown if there is no such line.
Not sure we understand each other. Yarda? Hanz: did it work before? what you think changed which makes this stop working?
I am asking you to add Line.getOriginalLineNumber () method. I am not able to fix some bug without it. It should be simple addition on your side, I hope. This is not a new issue.
Aha, now I see you are asking for a new API. But what that new API method should do? And the two bugs in debugger you mentioned are newly filed. Old problems newly discovered or new problems existing only in promo-d not in 3.x?
Yes, thats why API keyword is there. What it should do is described in my previous posts. Its old problem newly discovered.
Hanz, can you please work with Jarda and nail down what exactly this new method should do? I am probably not competent on technical matters anymore, but I really can't follow your thoughts. Thanks
Yes of course, ant thank you for your help.
I cannot add Line.getOriginalLineNumber as lines are shared between various Line.Sets and the line would not know which Line.Set you are considering to be the original. This implies that the method should involve both Line and Line.Set. Either Line.getOLN (Line.Set) or LineSet.getOLN (Line). But in both cases this means that the debugger needs to have the Line.Set from the time when the debugging started. If this evaluation is correct, I can close the issue as wontfix because the requested API should already be there. Just call: lineSet.getLines ().indexOf (line); and you should the original index of the line in given lineset. Please let me know whether the reasoning is correct or not (that would imply that we do not need any new API) and of course, whether this really works (this might result in some bug fixing).
closed