Browse Source

Make some parameters optional in ParserService.ResolveSnippet().

pull/403/head
Daniel Grunwald 12 years ago
parent
commit
eb8f07c5a5
  1. 2
      src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
  2. 6
      src/Main/Base/Project/Parser/IParserService.cs
  3. 2
      src/Main/SharpDevelop/Parser/ParserService.cs

2
src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

@ -585,7 +585,7 @@ namespace ICSharpCode.SharpDevelop.Services
throw new GetValueException("no stackframe available!"); throw new GetValueException("no stackframe available!");
var location = CurrentStackFrame.NextStatement; var location = CurrentStackFrame.NextStatement;
var fileName = new FileName(location.Filename); 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); return new ExpressionEvaluationVisitor(CurrentStackFrame, EvalThread, CurrentStackFrame.AppDomain.Compilation, allowMethodInvoke, allowSetValue).Convert(rr);
} }

6
src/Main/Base/Project/Parser/IParserService.cs

@ -242,9 +242,9 @@ namespace ICSharpCode.SharpDevelop.Parser
ITextSource fileContent = null, ICompilation compilation = null, ITextSource fileContent = null, ICompilation compilation = null,
CancellationToken cancellationToken = default(CancellationToken)); CancellationToken cancellationToken = default(CancellationToken));
ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, string codeSnippet,
ITextSource fileContent, string codeSnippet, ICompilation compilation, ITextSource fileContent = null, ICompilation compilation = null,
CancellationToken cancellationToken); CancellationToken cancellationToken = default(CancellationToken));
Task<ResolveResult> ResolveAsync(FileName fileName, TextLocation location, Task<ResolveResult> ResolveAsync(FileName fileName, TextLocation location,
ITextSource fileContent = null, ICompilation compilation = null, ITextSource fileContent = null, ICompilation compilation = null,

2
src/Main/SharpDevelop/Parser/ParserService.cs

@ -315,7 +315,7 @@ namespace ICSharpCode.SharpDevelop.Parser
return context; 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); var entry = GetFileEntry(fileName, true);
if (entry.parser == null) if (entry.parser == null)

Loading…
Cancel
Save