//---------------------------------- static public string[] FindReferences(string editorText, int offset, string fileName) { if (Config.Instance.UsingRoslyn) { return(Syntaxer.FindReferences(editorText, fileName, offset)); } // return RoslynEngine.FindReferences(editorText, offset, fileName); else { return(MonoEngine.FindReferences(editorText, offset, fileName)); } }
//---------------------------------- static public string[] FindReferences(string editorText, int offset, string fileName) { var includeSpec = Config.Instance.DefaultInclude; var effectiveCode = includeSpec + editorText; var effectiveOffset = offset + includeSpec.Length; string[] result = Syntaxer.FindReferences(effectiveCode, fileName, effectiveOffset); return(result.Select(x => (x.StartsWith(fileName + "(")) ? x.ChangeLineNumberInLocation(-1) : x) .ToArray()); }