/// <summary> /// Constructs a debug view from a normal FullSymbol. /// </summary> /// <remarks> /// This constructor is required by the debugger. /// Consequently, Invalid AbsoluteIds are allowed. /// </remarks> public AbsoluteIdDebuggerView(FullSymbol fullSymbol) { Id = fullSymbol.Value; if (fullSymbol == Invalid) { OwningSymbolTable = null; Identifier = null; } else { OwningSymbolTable = HierarchicalNameTable.DebugTryGetTableForId(fullSymbol.Value) as SymbolTable; if (OwningSymbolTable != null) { Identifier = fullSymbol.ToString(OwningSymbolTable); } } }
private string ToDebuggerDisplay() { string path; if (!Path.IsValid) { path = "Invalid"; } else { PathTable owner = HierarchicalNameTable.DebugTryGetTableForId(Path.Value) as PathTable; path = owner == null ? "{Unable to expand AbsolutePath; this may occur after the allocation of a large number of PathTables}" : Path.ToString(owner); } return(I($"{{{path} ({GetAnnotation()})}}")); }
private string ToDebuggerDisplay() { string annotation; switch (RewriteCount) { case 0: annotation = "source"; break; case 1: annotation = "output"; break; default: annotation = "rewrite:" + RewriteCount.ToString(CultureInfo.InvariantCulture); break; } if (IsUndeclaredFileRewrite) { annotation += "[File rewrite]"; } string path; if (!Path.IsValid) { path = "Invalid"; } else { PathTable owner = HierarchicalNameTable.DebugTryGetTableForId(Path.Value) as PathTable; path = (owner == null) ? "{Unable to expand AbsolutePath; this may occur after the allocation of a large number of PathTables}" : Path.ToString(owner); } return(string.Format(CultureInfo.InvariantCulture, "{{{0} ({1}): {2}}}", path, annotation, FileExistence)); }