Home » Language IDEs » C / C++ IDE (CDT) » how eclipse synchronizes its views?
| |
Re: how eclipse synchronizes its views? [message #997120 is a reply to message #997085] |
Thu, 03 January 2013 19:45 |
ben agai Messages: 36 Registered: July 2012 |
Member |
|
|
hi, thank you so much for your reply.
i have read the source code of the variablesView, breakPointsView etc, and correct me if im wrong, but it seems that eclipse's views are using the IDebugContextListener interface to be noted that something has happened, which means the views receive a debugContextEvent, right?.
i have looked about the implemention of the fire function at the AbstractDebugContextProvider class, and i saw that for each listener that the function calls it's debugContextChanged(event) method it uses a SafeRunner which ,if i'm not wrong is like a thread, and if it works like a thread how can the views be synchronized?.
i thought that if there are ,for example, 5 views registered as debugContextListener, as long as the first view's debugContextChanged(event) method is'nt over the next view's debugContextChanged(event) method wo'nt be called, is'nt that how it works?
pleas correct me if im wrong about any of my assumptions.
thank you so much for your help.
|
|
| |
Re: how eclipse synchronizes its views? [message #997493 is a reply to message #997120] |
Mon, 07 January 2013 19:15 |
Marc Khouzam Messages: 357 Registered: July 2009 |
Senior Member |
|
|
> i have read the source code of the variablesView, breakPointsView etc,
> and correct me if im wrong, but it seems that eclipse's views are using
> the IDebugContextListener interface to be noted that something has
> happened, which means the views receive a debugContextEvent, right?.
Yes, although that is not the only trigger.
The actual mechanism used in CDT is pretty complicated and I'm not familiar enough with it that I can explain well.
> i have looked about the implemention of the fire function at the
> AbstractDebugContextProvider class, and i saw that for each listener that
> the function calls it's debugContextChanged(event) method it uses a
> SafeRunner which ,if i'm not wrong is like a thread, and if it works
> like a thread how can the views be synchronized?.
I don't think it works like a thread. If you look at the implementation of SafeRunning.run, you will see all it does is catch exceptions, but runs the code in the current thread.
> i thought that if there are ,for example, 5 views registered as
> debugContextListener, as long as the first view's
> debugContextChanged(event) method is'nt over the next view's
> debugContextChanged(event) method wo'nt be called, is'nt that how it works?
Looks like it, yes.
Marc
|
|
| | | | | | |
Re: how eclipse synchronizes its views? [message #997808 is a reply to message #997734] |
Tue, 08 January 2013 19:35 |
ben agai Messages: 36 Registered: July 2012 |
Member |
|
|
thanks, marc.
i have searched about the plug-ins you gave me, but for some reason did'nt find information that explains the use or how to use the plug-ins to talk with the gdb.
i have lookd at the ICommandControl interface which seems to control the commands that are sent to the gdb, and control their result.
the problem is that there are many classes implementing this interface:
AbstractMIControl, BufferedCommandControl, GDBControl, GDBControl_7_0, MIVariableManager, PDACommandControl.
and i dont know which one i need, or how to send commands to the gdb through any of them.
can you help me on that matter?
thanks in advance, ben.
|
|
|
Goto Forum:
Current Time: Tue Apr 23 15:52:02 GMT 2024
Powered by FUDForum. Page generated in 0.04150 seconds
|