Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Moving line breakpoints
Moving line breakpoints [message #555427] Thu, 26 August 2010 14:15 Go to next message
Matthew Dickie is currently offline Matthew DickieFriend
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 Go to previous message
Dani Megert is currently offline Dani MegertFriend
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.
Previous Topic:Updating relative links
Next Topic:Would like to update a file in workspace during IResourceChangeListener notifications
Goto Forum:
  


Current Time: Wed Apr 24 14:50:40 GMT 2024

Powered by FUDForum. Page generated in 0.03495 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top