| How can I hook the breakpoint view actions [message #319391] |
Mon, 20 August 2007 09:53  |
Eclipse User |
|
|
|
I want to be notified when the breakpoint view actions "remove" and
"remove all" take place, so I can tell our editor to remove breakpoints.
So, my first thought was to setup a listener on the breakpoint list. But,
if I do that I will also be notified when our own editor adds or removes a
breakpoint. See the circularity here?
What I really want is some callback from the actions themselves, not the
entity that it modifies.
Is this a "fact of life" for listeners? That is, they should set a bit to
protect against circularities, turn off certain listeners, etc.? Or, is
there a more elegant way to do this?
We don't use the ruler (gutter decoration) stuff in Eclipse editor
classes, we have our own gutter. Although our editor does extend the
TextEditor and SourceViewer, etc.
|
|
|
|
| Re: How can I hook the breakpoint view actions [message #319449 is a reply to message #319391] |
Tue, 21 August 2007 11:25  |
Eclipse User |
|
|
|
Use IBreakpointListener to listen to breakpoint additions/removals. However,
if your editor already has a "marker annotation model" then breakpoints will
appear/disappear from your ruler automatically based on the resources the
markers are associated with, and the line number attribute on the marker.
See these for more information:
http://www.eclipse.org/eclipse/debug/documents/ec_2007/Debug _Tutorial_2007.pdf
http://www.eclipse.org/articles/Article-Debugger/how-to.html
Darin
"Farokh Morshed" <fmorshed@curl.com> wrote in message
news:2b7fc94c72b16f68d0e004a81493b533$1@www.eclipse.org...
>I want to be notified when the breakpoint view actions "remove" and "remove
>all" take place, so I can tell our editor to remove breakpoints. So, my
>first thought was to setup a listener on the breakpoint list. But, if I do
>that I will also be notified when our own editor adds or removes a
>breakpoint. See the circularity here?
>
> What I really want is some callback from the actions themselves, not the
> entity that it modifies.
>
> Is this a "fact of life" for listeners? That is, they should set a bit to
> protect against circularities, turn off certain listeners, etc.? Or, is
> there a more elegant way to do this?
>
> We don't use the ruler (gutter decoration) stuff in Eclipse editor
> classes, we have our own gutter. Although our editor does extend the
> TextEditor and SourceViewer, etc.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04082 seconds