[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Obtaining IExecutionDMContext object in DSF
|
Hi,
I am trying to use/call DSF services for some time now. For many of these services related to "run control" we need an IExecutionContext object. The way I do it is as follows :
IContainerDMContext abc = DMContexts.getAncestorOfType( event.getDMContext(), IContainerDMContext.class )
if (abc != null)
{
IExecutionDMContext = !event.getDMContext().equals( abc ) ? event.getDMContext() : null
}
This piece of code is inside an event listener, which listenes for an MIStopped event. So basically, I get " IExecutionDMContext " from MIStopped event object. I tried using ISuspendedDMEvent instead, to make it generic. However it does not give the same result. I found the above piece of code in some DSF file. So I know some DSF class uses it. I have been looking through the source code for a while now. But this is the only way I found that works.
My questions are :
Is the process I described above, the right one ?
Is there any better way to get the IExecutionDMContext object ? Something more generic.
--
Thanks & Regards,
Rohit Girme