public void Execute(IResponseWriter writer, string[] args) { if (args.Length != 1) { return; } var chunks = args[0].Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries); if (chunks.Length != 3) { return; } try { var file = chunks[0]; var line = int.Parse(chunks[1]); var column = int.Parse(chunks[2]); var cache = new DirtyFileParser( _globalCache, (fileName) => File.ReadAllText(fileName), (fileName) => File.Delete(fileName), (fileName) => { var instance = new EngineLocator(new FS()).GetInstance(Environment.CurrentDirectory); if (instance != null) { return(instance.GetDirtyFiles(fileName)); } return(""); }).Parse(file); var name = new TypeUnderPositionResolver() .GetTypeName(file, File.ReadAllText(file), line, column); writer.Write("comment|Found name {0}", name); var signature = new FileContextAnalyzer(_globalCache, cache) .GetSignatureFromNameAndPosition(file, name, line, column); writer.Write("comment|Found signature {0}", signature); var pos = cache.PositionFromSignature(signature); if (pos != null) { writer.Write("editor goto {0}|{1}|{2}", pos.Fullpath, pos.Line, pos.Column); return; } writer.Write("comment|Looking in global cache"); pos = _globalCache.PositionFromSignature(signature); if (pos != null) { writer.Write("editor goto {0}|{1}|{2}", pos.Fullpath, pos.Line, pos.Column); } } catch (Exception ex) { writer.Write(ex.ToString()); } }