private bool HighlightArgumentMapping(FunctionCallContext callContext) { int line = textCore.CursorPosition.Y; int column = textCore.CursorPosition.X; int argument = -1; string function = callContext.GetFunctionAtPoint(column, line, out argument); return(HighlightArgumentMapping(function, argument)); }
private void ShowFunctionSignatureExecuted(object sender, ExecutedRoutedEventArgs e) { int x = textCore.CursorPosition.X; int y = textCore.CursorPosition.Y; ITextBuffer textBuffer = textCore.CurrentTextBuffer; FunctionCallContext callContext = textBuffer.GetFunctionCallContext(y, x); string message = "No function call context"; if ((null != callContext) && callContext.IsValidCallContext) { int argumentIndex = -1; string functionName = callContext.GetFunctionAtPoint(x, y, out argumentIndex); if (!string.IsNullOrEmpty(functionName)) { message = string.Format("Function: {0}, Argument Index: {1}", functionName, argumentIndex); } } this.DisplayStatusMessage(StatusTypes.Info, message, 2); }