internal static XSharpSearchLocation FindLocation(this ITextBuffer buffer, SnapshotPoint point) { if (buffer == null) { return(null); } int line = point.GetContainingLine().LineNumber; var file = buffer.GetFile(); var snapshot = buffer.CurrentSnapshot; var member = XSharpLookup.FindMember(line, file); var ns = XSharpTokenTools.FindNamespace(point, file); string currentNS = ""; if (ns != null) { currentNS = ns.FullName; } var location = new XSharpSearchLocation(file, member, snapshot, line, point, currentNS); return(location); }
internal static XSourceMemberSymbol FindMember(this ITextBuffer buffer, SnapshotPoint point) { var file = buffer.GetFile(); return(XSharpLookup.FindMember(point.GetContainingLine().LineNumber, file)); }