[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.dltk] Problem in updation of variables view

Hi
We have an IDE in which the scripts contains variables having depth = 3. The Root level variable is called Repository. It contains classes as it's children. Each class can contain one or more fields.


Like,
BANCS.OUTPUT.collAmount = "300"
BANCS.OUTPUT.collCrncy = "USD"
BANCS.OUTPUT.AmountWithNoDiscount = "100"
BANCS.INPUT.purchase_acid="abc"
BANCS.OUTPARAM.custId = "abc"
Here BANCS is a repository. OUTPUT, INPUT and OUTPARAM are classes. collAmount, collCrncy, AmountWithNoDiscount, purchase_acid and , custId are fields.



So, while doing step in on this code if we keep the variable tree in variables view in expanded mode the new classes and fields after the first line doesn't get reflected in the variables view.


However, if we keep the variables tree in the collapsed state and do step in, and expand the tree after the last line, it shows the new classes and variables.

This functionality works fine in DLTK M2 version.

I identified the problem in the following piece of code in the function
org.eclipse.dltk.internal.debug.core.model.ScriptVariable.refreshVariable M4 Code:
public IVariable refreshVariable(IVariable newVariable)throws DebugException {
if (newVariable instanceof ScriptVariable) {
final ScriptVariable v = (ScriptVariable) newVariable;
if(property.hasChildren()&& v.property.hasChildren()) {
isValueChanged = false;
if (value != null
&& ((ScriptValue)value).hasChildrenValuesLoaded()) {
/*
* Refresh children if some of
* them are loaded. Since it
* could be a hash - it is safer to * get all of the new
* children.
*/
ScriptStackFrame.refreshVariables(v.getValue().getVariables(),
((ScriptValue) value).variables);
}else{
property = v.property;
value = v.value;
}


} else {
isValueChanged = !equals(property, v.property);
value = v.value;
property = v.property;
}
return this;
} else {
return newVariable;
}
}



M2 Code: public IVariable refreshVariable(IVariable newVariable) throws DebugException { if (newVariable instanceof ScriptVariable) { final ScriptVariable v = (ScriptVariable) newVariable; isValueChanged = !equals(property, v.property); if (!isValueChanged) { if (property.getAvailableChildren().length != 0 && v.property.getAvailableChildren().length != 0) { ScriptStackFrame.refreshVariables(v.getValue() .getVariables(), getValue().getVariables()); } } value = v.value; property = v.property; return this; } else { return newVariable; } }


So, can anyone throw some light on it that whether it is a bug or we need to change something in the implementation?
thanks in advance


Regards,
Pawan