From eb8f07c5a507360abdc11229923a30874084ee6b Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 10 Mar 2014 20:46:37 +0100 Subject: [PATCH] Make some parameters optional in ParserService.ResolveSnippet(). --- .../Debugger/Debugger.AddIn/Service/WindowsDebugger.cs | 2 +- src/Main/Base/Project/Parser/IParserService.cs | 6 +++--- src/Main/SharpDevelop/Parser/ParserService.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs b/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs index ece7004041..3722a8c11b 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs @@ -585,7 +585,7 @@ namespace ICSharpCode.SharpDevelop.Services throw new GetValueException("no stackframe available!"); var location = CurrentStackFrame.NextStatement; var fileName = new FileName(location.Filename); - var rr = SD.ParserService.ResolveSnippet(fileName, new TextLocation(location.StartLine, location.StartColumn), new ParseableFileContentFinder().Create(fileName), code, null, System.Threading.CancellationToken.None); + var rr = SD.ParserService.ResolveSnippet(fileName, new TextLocation(location.StartLine, location.StartColumn), code); return new ExpressionEvaluationVisitor(CurrentStackFrame, EvalThread, CurrentStackFrame.AppDomain.Compilation, allowMethodInvoke, allowSetValue).Convert(rr); } diff --git a/src/Main/Base/Project/Parser/IParserService.cs b/src/Main/Base/Project/Parser/IParserService.cs index b91527c9a4..6ec028e8f9 100644 --- a/src/Main/Base/Project/Parser/IParserService.cs +++ b/src/Main/Base/Project/Parser/IParserService.cs @@ -242,9 +242,9 @@ namespace ICSharpCode.SharpDevelop.Parser ITextSource fileContent = null, ICompilation compilation = null, CancellationToken cancellationToken = default(CancellationToken)); - ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, - ITextSource fileContent, string codeSnippet, ICompilation compilation, - CancellationToken cancellationToken); + ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, string codeSnippet, + ITextSource fileContent = null, ICompilation compilation = null, + CancellationToken cancellationToken = default(CancellationToken)); Task ResolveAsync(FileName fileName, TextLocation location, ITextSource fileContent = null, ICompilation compilation = null, diff --git a/src/Main/SharpDevelop/Parser/ParserService.cs b/src/Main/SharpDevelop/Parser/ParserService.cs index 3b3f4e777e..6663a0fe6b 100644 --- a/src/Main/SharpDevelop/Parser/ParserService.cs +++ b/src/Main/SharpDevelop/Parser/ParserService.cs @@ -315,7 +315,7 @@ namespace ICSharpCode.SharpDevelop.Parser return context; } - public ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, ITextSource fileContent, string codeSnippet, ICompilation compilation, CancellationToken cancellationToken) + public ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, string codeSnippet, ITextSource fileContent, ICompilation compilation, CancellationToken cancellationToken) { var entry = GetFileEntry(fileName, true); if (entry.parser == null)