mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Remove UpdateManger.
This commit is contained in:
parent
d5da57d9dc
commit
c064eb333a
3 changed files with 0 additions and 85 deletions
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIVarChange;
|
||||
|
||||
public interface IUpdateListener {
|
||||
void changeList(MIVarChange[] changes);
|
||||
}
|
|
@ -36,7 +36,6 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
|
||||
Properties props;
|
||||
MISession session;
|
||||
UpdateManager updateManager;
|
||||
EventManager eventManager;
|
||||
BreakpointManager breakpointManager;
|
||||
ExpressionManager expressionManager;
|
||||
|
@ -68,12 +67,8 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
eventManager = new EventManager(this);
|
||||
s.addObserver(eventManager);
|
||||
|
||||
updateManager = new UpdateManager(this);
|
||||
expressionManager = new ExpressionManager(this);
|
||||
variableManager = new VariableManager(this);
|
||||
updateManager.addUpdateListener(variableManager);
|
||||
updateManager.addUpdateListener(expressionManager);
|
||||
|
||||
registerManager = new RegisterManager(this);
|
||||
memoryManager = new MemoryManager(this);
|
||||
signalManager = new SignalManager(this);
|
||||
|
@ -86,10 +81,6 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
return session;
|
||||
}
|
||||
|
||||
public UpdateManager getUpdateManager() {
|
||||
return updateManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getAttribute(String)
|
||||
*/
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIVarUpdate;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIVarChange;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIVarUpdateInfo;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class UpdateManager {
|
||||
|
||||
Session session;
|
||||
List updateList = Collections.synchronizedList(new ArrayList(5));
|
||||
MIVarChange[] noChanges = new MIVarChange[0];
|
||||
|
||||
public UpdateManager(Session s) {
|
||||
session = s;
|
||||
}
|
||||
|
||||
public void addUpdateListener(IUpdateListener listener) {
|
||||
updateList.add(listener);
|
||||
}
|
||||
|
||||
public void removeUpdateListener(IUpdateListener listener) {
|
||||
updateList.remove(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the variables, from the response of the "-var-update *"
|
||||
* mi/command.
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
MIVarChange[] changes = noChanges;
|
||||
MISession mi = session.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
MIVarUpdate update = factory.createMIVarUpdate();
|
||||
try {
|
||||
mi.postCommand(update);
|
||||
MIVarUpdateInfo info = update.getMIVarUpdateInfo();
|
||||
if (info == null) {
|
||||
throw new CDIException("No answer");
|
||||
}
|
||||
changes = info.getMIVarChanges();
|
||||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
IUpdateListener[] listeners = (IUpdateListener[])updateList.toArray(new IUpdateListener[0]);
|
||||
for (int i = 0; i < listeners.length; i++) {
|
||||
listeners[i].changeList(changes);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue