Moving line breakpoints [message #555427] |
Thu, 26 August 2010 14:15 |
Matthew Dickie Messages: 56 Registered: July 2009 |
Member |
|
|
Hi,
For our Eclipse-based IDE, unlike JDT, we do not have a AST, so we don't
always know when a particular line is valid for a line breakpoint when a
program in not running.
When a program is run, the IDE adds the breakpoints to our runner. The
runner will move breakpoints to the next valid line. The IDE checks the
breakpoints in the runner to see if this has occurred. If so, the line
number is updated with:
ensureMarker().setAttribute(IMarker.LINE_NUMBER, newLineNumber)
Strangely, even though the marker is updated, and the breakpoints view
(in it's label) and the properties page for the breakpoint show the
correct line, the breakpoint icon is still shown on the wrong line in
the editor. What I find particularly strange is that this is still the
case if the IDE or the editor is closed and reopened. If the LINE_NUMBER
attribute is now correct, where is the editor getting the old line
number from? Are line breakpoints not supposed to be moved around?
Should I instead delete the old breakpoint and create a new one on the
correct line.
Thanks in advance,
Matt D.
|
|
|
Re: Moving line breakpoints [message #555542 is a reply to message #555427] |
Fri, 27 August 2010 06:21 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Matthew Dickie wrote:
> Hi,
>
> For our Eclipse-based IDE, unlike JDT, we do not have a AST, so we
> don't always know when a particular line is valid for a line
> breakpoint when a program in not running.
>
> When a program is run, the IDE adds the breakpoints to our runner. The
> runner will move breakpoints to the next valid line. The IDE checks
> the breakpoints in the runner to see if this has occurred. If so, the
> line number is updated with:
> ensureMarker().setAttribute(IMarker.LINE_NUMBER, newLineNumber)
>
> Strangely, even though the marker is updated, and the breakpoints view
> (in it's label) and the properties page for the breakpoint show the
> correct line, the breakpoint icon is still shown on the wrong line in
> the editor. What I find particularly strange is that this is still the
> case if the IDE or the editor is closed and reopened. If the
> LINE_NUMBER attribute is now correct, where is the editor getting the
> old line number from? Are line breakpoints not supposed to be moved
> around? Should I instead delete the old breakpoint and create a new
> one on the correct line.
Check whether the marker also has IMarker.CHAR_START/END set. This
overrides the line number.
Dani
>
> Thanks in advance,
>
> Matt D.
|
|
|
Powered by
FUDForum. Page generated in 0.03495 seconds