/** * Returns any logical value for the raw value. This method will recurse * over the returned value until the same structure is encountered again (to * avoid infinite recursion). * * @param value raw value to possibly be replaced by a logical value * @param previousStructureIds * the list of logical structures that have already been applied * to the returned value during the recursion of this method. * Callers should always pass in a new, empty list. * @return logical value if one is calculated, otherwise the raw value is returned */ protected IValue getLogicalValue(IValue value, List<String> previousStructureIds, IPresentationContext context) throws CoreException { if (isShowLogicalStructure(context)) { ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value); if (types.length > 0) { ILogicalStructureType type = DebugPlugin.getDefaultStructureType(types); if (type != null && !previousStructureIds.contains(type.getId())) { IValue logicalValue = getLogicalStructureCache().getLogicalStructure(type, value); previousStructureIds.add(type.getId()); return getLogicalValue(logicalValue, previousStructureIds, context); } } } return value; }