int depth = ((Integer)m_cache.get(DebugCLI.DISPLAY_FRAME_NUMBER)).intValue();
baseId -= depth;
// obtain data about our current state
Variable contextVar = null;
Value contextVal = null;
Value val = null;
// look for 'name' starting from local scope
if ( (val = locateParentForNamed(baseId, name, false)) != null)
;
// get the this pointer, then look for 'name' starting from that point
else if ( ( (contextVar = locateForNamed(baseId, "this", false)) != null ) && //$NON-NLS-1$
( setName("this") && (val = locateParentForNamed(contextVar.getValue().getId(), name, true)) != null ) ) //$NON-NLS-1$
;
// now try to see if 'name' exists off of _root
else if ( setName("_root") && (val = locateParentForNamed(Value.ROOT_ID, name, true)) != null ) //$NON-NLS-1$
;
// now try to see if 'name' exists off of _global
else if ( setName("_global") && (val = locateParentForNamed(Value.GLOBAL_ID, name, true)) != null ) //$NON-NLS-1$
;
// now try off of class level, if such a thing can be found
else if ( ( (contextVal = locate(Value.GLOBAL_ID, getCurrentPackageName(), false)) != null ) &&
( setName("_global."+getCurrentPackageName()) && (val = locateParentForNamed(contextVal.getId(), name, true)) != null ) ) //$NON-NLS-1$
;
// if we found it then stake this as our context!
if (val != null)
{
id = val.getId();
pushName(name);
lockName();
}
}