|
|
|
@ -581,14 +581,14 @@ namespace ICSharpCode.SharpDevelop.Services
@@ -581,14 +581,14 @@ namespace ICSharpCode.SharpDevelop.Services
|
|
|
|
|
RefreshPads(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Value Evaluate(string code) |
|
|
|
|
public static Value Evaluate(string code, bool allowMethodInvoke = true, bool allowSetValue = false) |
|
|
|
|
{ |
|
|
|
|
if (CurrentStackFrame == null || CurrentStackFrame.NextStatement == null) |
|
|
|
|
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); |
|
|
|
|
return new ExpressionEvaluationVisitor(CurrentStackFrame, EvalThread, CurrentStackFrame.AppDomain.Compilation, true).Convert(rr); |
|
|
|
|
return new ExpressionEvaluationVisitor(CurrentStackFrame, EvalThread, CurrentStackFrame.AppDomain.Compilation, allowMethodInvoke, allowSetValue).Convert(rr); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void JumpToCurrentLine() |
|
|
|
|