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.

Bug 42755 - We need Line.getOriginalLineNumber () method.
Summary: We need Line.getOriginalLineNumber () method.
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API
Depends on:
Blocks: 42270 42754
  Show dependency tree
 
Reported: 2004-05-04 09:56 UTC by Jan Jancura
Modified: 2008-12-22 15:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Jancura 2004-05-04 09:56:09 UTC
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.
Comment 1 Jan Jancura 2004-05-04 09:57:53 UTC
Othervise we are not able to fix several bugs.
Comment 2 _ ttran 2004-05-04 17:56:38 UTC
that one will be tough, pnejedly is on vacation for until the week
after next week
Comment 3 _ ttran 2004-05-07 08:49:15 UTC
-> 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)
Comment 4 Jan Jancura 2004-05-07 09:15:15 UTC
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.
Comment 5 _ ttran 2004-05-07 09:26:33 UTC
Not sure we understand each other.  Yarda?

Hanz: did it work before?  what you think changed which makes this
stop working?
Comment 6 Jan Jancura 2004-05-07 09:34:22 UTC
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.
Comment 7 _ ttran 2004-05-07 09:48:42 UTC
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?
Comment 8 Jan Jancura 2004-05-07 10:10:24 UTC
Yes, thats why API keyword is there.
What it should do is described in my previous posts.
Its old problem newly discovered.
Comment 9 _ ttran 2004-05-07 10:27:11 UTC
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
Comment 10 Jan Jancura 2004-05-07 13:46:37 UTC
Yes of course, ant thank you for your help.
Comment 11 Jaroslav Tulach 2004-05-13 09:15:39 UTC
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).
Comment 12 Marian Mirilovic 2005-07-15 07:42:20 UTC
closed