1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

Bug fix the children where not register to the VariableManager

so the ChangeEvent was not issued.
This commit is contained in:
Alain Magloire 2002-09-11 15:12:11 +00:00
parent a345a5476d
commit cf07dedc00
2 changed files with 19 additions and 3 deletions

View file

@ -101,7 +101,9 @@ public class Value extends CObject implements ICDIValue {
*/
public ICDIVariable[] getVariables() throws CDIException {
Variable[] variables = null;
MISession mi = getCTarget().getCSession().getMISession();
CSession session = getCTarget().getCSession();
MISession mi = session.getMISession();
VariableManager mgr = (VariableManager)session.getVariableManager();
CommandFactory factory = mi.getCommandFactory();
MIVarListChildren var =
factory.createMIVarListChildren(variable.getMIVar().getVarName());
@ -114,8 +116,10 @@ public class Value extends CObject implements ICDIValue {
MIVar[] vars = info.getMIVars();
variables = new Variable[vars.length];
for (int i = 0; i < vars.length; i++) {
variables[i] =
new Variable(variable.getStackFrame(), vars[i].getExp(), vars[i]);
//variables[i] = new Variable(variable.getStackFrame(), vars[i].getExp(), vars[i]);
variables[i] = mgr.createVariable(variable.getStackFrame(),
vars[i].getExp(), vars[i]);
}
} catch (MIException e) {
//throw new CDIException(e.getMessage());

View file

@ -210,6 +210,18 @@ public class VariableManager extends SessionObject implements ICDIExpressionMana
return var;
}
Variable createVariable(StackFrame stack, String name, MIVar miVar )
throws CDIException {
Element element = new Element();
element.miVar = miVar;
element.name = name;
element.stackframe = stack;
Variable var = new Variable(stack, name, miVar);
element.variable = var;
addElement(element);
return var;
}
ICDIArgument createArgument(StackFrame stack, String name) throws CDIException {
Element element = createElement(stack, name);