[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Model Event
|
Previously, there is only IModelListener interface and it contained a
number of methods. Now I created a new package called
org.eclipse.ptp.core.events. Also I changed each method in
IModelListener interface to become a new Event. For example, there is a
method called "ModelSysChangedEvent" in IModelListener interface. Then
I created a new class called "ModelSysChangedEvent". In old one, the
"ModelSysChangedEvent" method contained the PElement parameter. In new
"ModelSysChangedEvent", its constructor stores PElement and event type.
There are two event types for ModelSysChangedEvent
("MONITORING_SYS_CHANGED" and "SYS_STATUS_CHANGED"). The event type is
used for combining the methods of "ModelSysChangedEvent" and
"execStatusChangeEvent" in IModelistener interface.
I commented all methods and added a new method called "modelEvent" in
the latest IModelListener interface. If a class implements
IModelListener, this class do not need to implement all methods.
Besides, we do not need to modify this interface if we wanted to add
more new events. We just need to create a class for the event. Let me
know if you got any question on this changes. I modified debug event a
while back, so I changed this IModelListener to contain event as well.
Regards,
Clement
Nathan DeBardeleben wrote:
Clement, what was your intention with Model Events? It looks like
while the Process and Node events are fleshed out, the Model events
are empty - literally empty classes. Both the events and the
listeners. However, even though they're empty you're still firing
model events at times in the Model Manager.
I have a place where I notice a major model change (such as the
addition of new machines, a set of new nodes, etc) and force a recache
of the model to the listeners. Without this event fleshed out, I
don't really know what you were intending.
Can you put together some documentation or an email or something
outlining what you were thinking for these events? Just to drop them
in there and make me switch over to using them without any words about
the logic behind them makes it hard for me to port over my existing
event code to it.
Thank you.