/** * Returns the logical structure currently associated with the given * value or <code>null</code> if none. * @param value the value * @return the logical structure currently associated with the given * value or <code>null</code> if none. */ public static ILogicalStructureType getLogicalStructure(IValue value) { // This code is based on VariablesViewContentProvider#getLogicalValue(IValue) ILogicalStructureType type = null; ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value); if (types.length > 0) { type= DebugPlugin.getDefaultStructureType(types); } return type; } }
/** * Returns the logical structure currently associated with the given * value or <code>null</code> if none. * @param value the value * @return the logical structure currently associated with the given * value or <code>null</code> if none. */ private ILogicalStructureType getLogicalStructure(IValue value) { // This code is based on VariablesViewContentProvider#getLogicalValue(IValue) ILogicalStructureType type = null; ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value); if (types.length > 0) { type= DebugPlugin.getDefaultStructureType(types); } return type; } }
/** * 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; }
ILogicalStructureType enabledType = DebugPlugin.getDefaultStructureType(types); if (types != null && types.length > 0) { for (int i = 0; i < types.length; i++) {