1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-16 20:55:44 +02:00

Allow disabling of events.

This commit is contained in:
Alain Magloire 2002-09-03 04:13:56 +00:00
parent 0182fc06d9
commit 335886f307

View file

@ -34,6 +34,7 @@ import org.eclipse.cdt.debug.mi.core.event.MIWatchpointEvent;
public class EventManager extends SessionObject implements ICDIEventManager, Observer { public class EventManager extends SessionObject implements ICDIEventManager, Observer {
List list = Collections.synchronizedList(new ArrayList(1)); List list = Collections.synchronizedList(new ArrayList(1));
boolean isEnable = true;
/** /**
* Process the event from MI and do any state work on the CDI. * Process the event from MI and do any state work on the CDI.
@ -64,7 +65,9 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
} }
// Fire the event; // Fire the event;
fireEvent(cdiEvent); if (isEnable) {
fireEvent(cdiEvent);
}
} }
public EventManager(CSession session) { public EventManager(CSession session) {
@ -135,4 +138,14 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
CTarget target = getCSession().getCTarget(); CTarget target = getCSession().getCTarget();
//target.clearState(); //target.clearState();
} }
void disableEvents() {
isEnable = false;
}
void enableEvents() {
isEnable = true;
}
} }