Hi,
If you need to create an instance of the
'ModelManager' class for each CDebugTarget object, you can do the
following:
1. Implement your plugin class as an
IDebugEventSetListener.
class YourPlugin extends Plugin
implements IDebugEventSetListener
2. Add the following line to the 'startup' method
of your plugin:
DebugPlugin.getDefault().addDebugEventListener( this );
3. Add the following line to the 'shutdown' method
of your plugin:
DebugPlugin.getDefault().removeDebugEventListener( this );
4. Catch DebugEvent.CREATE with CDebugTarget as a source, create an
instance of ModelManager and associate it with created target. You can use
a hash map or something like that.
5. Catch DebugEvent.TERMINATE with CDebugTarget as a source and dispose the
ModelManager associated with this target.
Mikhail Khodjaiants
----- Original Message -----
Sent: Friday, November 22, 2002 2:23
AM
Subject: Re: [cdt-debug-dev] Implementing
View in Debugger
Hi!
My task is to create a view(call it ModelView) which
will interact with CDT Debugger but at the same time I must not change CDT
source code. Interaction must be similar to Memory and Register View, i.e. my
ModelView have to react on such debugger events as step, resume and so on.
The problem is that I know how to
construct view with some addings to CDebugTarget source but I can't. So I try
to find out how to do it. I can't say that there is some lack of
functionality in CDI because I don't know it better than its developers.
Igor S. Zamyatin
Interstron Ltd.
| "Alain Magloire"
<alain@xxxxxxx> Sent
by: cdt-debug-dev-admin@xxxxxxxxxxx
22.11.2002 02:36 Please respond to cdt-debug-dev
| To:
cdt-debug-dev@xxxxxxxxxxx cc:
Subject: Re: [cdt-debug-dev]
Implementing View in Debugger |
> > Hi! >
Bonjour
> I followed an advice and wrote code in my class
ModelViewEventHandler > which catches the DebugEvent.CREATE event by
such snippet of code
I do no know/understand what you are trying to
do. You can use the Eclipse framework for this; make an
association between to unrelated classes. The design pattern that
eclipse provides is with the PlaformObject and IAdapterFactory. You
register a factory for a certain class and when the
IAdaptable.getAdapter(..) is call your factory will have a chance to create
the class.
see
org.eclipse.core.runtime.IAdapterManager
Eclipse/CDT provides a certain
number of interfaces, like CDI to interact with the underlying debuger etc
... Those interfaces are still in developement, so if you feel they
are lacking certain functionnality, send a proposal
8-).
_______________________________________________ cdt-debug-dev
mailing
list cdt-debug-dev@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
|