Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Problem in updation of variables view
Problem in updation of variables view [message #37095] Tue, 05 May 2009 09:21
Pawan is currently offline PawanFriend
Messages: 6
Registered: July 2009
Junior Member
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.re freshVariable
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
Previous Topic:[BUILD] I-I200904280953-200904280953
Next Topic:[BUILD] S-1.0M7-200905061301
Goto Forum:
  


Current Time: Fri Mar 29 06:06:29 GMT 2024

Powered by FUDForum. Page generated in 0.01817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top