Task IPythonTextBufferInfoEventSink.PythonTextBufferEventAsync(PythonTextBufferInfo sender, PythonTextBufferInfoEventArgs e) { if (e.Event == PythonTextBufferInfoEvents.NewAnalysis) { SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); } return(Task.CompletedTask); }
private void Selection_SelectionChanged(object sender, EventArgs e) { var newValue = Refactoring.MethodExtractor.CanExtract(_view); if (newValue != _canExtract) { _canExtract = newValue; SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); } }
protected override void OnCaretPositionChanged(object sender, CaretPositionChangedEventArgs e) { if (_settings.AutomaticSync) { return; } var caretInRCode = TextView.IsCaretInRCode(); if (_caretInRCode ^ caretInRCode) { _caretInRCode = caretInRCode; SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); } }
private void OnCaretPositionChanged(object sender, CaretPositionChangedEventArgs e) { int caretPosition = e.NewPosition.BufferPosition; SnapshotPoint?bufferPoint = _textView.MapDownToR(caretPosition); if (bufferPoint.HasValue && _document != null && _document.EditorTree != null) { var node = _document.EditorTree.AstRoot.GetNodeOfTypeFromPosition <TokenNode>(e.NewPosition.BufferPosition); if (node != _lastNode) { _lastNode = node; SuggestedActionsChanged?.Invoke(this, new EventArgs()); } } }
private void OnCaretPositionChanged(object sender, CaretPositionChangedEventArgs e) { if (_document != null && _document.EditorTree != null) { SnapshotPoint?bufferPoint = REditorDocument.MapCaretPositionFromView(_textView); if (bufferPoint.HasValue) { var node = _document.EditorTree.AstRoot.GetNodeOfTypeFromPosition <TokenNode>(bufferPoint.Value); if (node != _lastNode) { _lastNode = node; SuggestedActionsChanged?.Invoke(this, new EventArgs()); } } } }
private void SuggestedAction_FixApplied(object sender, EventArgs e) { if (sender is FixSuggestedAction suggestedAction) { if (this.fixToErrorDictionary.TryGetValue(suggestedAction, out SarifErrorListItem error)) { error.IsFixed = true; SarifTableDataSource.Instance.RemoveError(error); // Tell VS to recompute the list of suggested actions so we don't offer // a fix for an error that's already fixed. SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); } } }
private void OnCaretPositionChanged(object sender, CaretPositionChangedEventArgs e) { if (_document?.EditorTree != null && !_document.IsClosed) { var bufferPoint = _textView.GetCaretPosition(_document.TextBuffer()); if (bufferPoint.HasValue) { var node = _document.EditorTree.AstRoot.GetNodeOfTypeFromPosition <TokenNode>(bufferPoint.Value); if (node != _lastNode) { _lastNode = node; SuggestedActionsChanged?.Invoke(this, new EventArgs()); } } } }
private void OnNewAnalysisEntry(AnalysisEntry obj) { SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); }
protected void OnSuggestedActionsChanged(object sender, EventArgs e) { SuggestedActionsChanged?.Invoke(sender, e); }
void ParseCompleted(object sender, ParseCompletedEventArgs <MSBuildParseResult> e) { SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); }
private void OnNewAnalysisEntry(object sender, EventArgs e) { SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); }
private void TagAggregator_TagsChanged(object sender, TagsChangedEventArgs e) { RunOnUIThread.Run(() => lightBulbBroker.DismissSession(textView)); SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); }