Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove code for arbitrary diagnostic taggers #72409

Merged
merged 10 commits into from
Mar 7, 2024

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Mar 5, 2024

We only have the inline-diagnostics tagger now. So moved all code related to that to a single location.

Followup to #62735.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 5, 2024
@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review March 7, 2024 18:44
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 7, 2024 18:44
@CyrusNajmabadi CyrusNajmabadi requested a review from akhera99 March 7, 2024 18:44
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer used. missed in prior PRs.

@@ -91,9 +91,6 @@ protected sealed override ITaggerEventSource CreateEventSource(ITextView? textVi
private async Task ProduceTagsAsync(
TaggerContext<TTag> context, DocumentSnapshotSpan documentSpanToTag, CancellationToken cancellationToken)
{
if (!_callback.IsEnabled)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no concept of 'enabled' or not. inline diagnostics aren't enabled/disabled depending on if we're using lsp diagnostics or not.

@@ -111,4 +111,36 @@ private static ITaggerEventSource CreateEventSourceWorker(ITextBuffer subjectBuf
TaggerEventSources.OnDiagnosticsChanged(subjectBuffer, diagnosticService),
TaggerEventSources.OnTextChanged(subjectBuffer));
}

protected ITagSpan<TTag>? CreateTagSpan(Workspace workspace, SnapshotSpan span, DiagnosticData data)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved from intermediary subclass to this type. methods unchanged.


namespace Microsoft.CodeAnalysis.Editor.InlineDiagnostics
namespace Microsoft.CodeAnalysis.Editor.InlineDiagnostics;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

view with whitespace off.

IEditorFormatMapService editorFormatMapService,
IClassificationFormatMapService classificationFormatMapService,
IClassificationTypeRegistryService classificationTypeRegistryService)
: AbstractDiagnosticsTaggerProvider<InlineDiagnosticsTag>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to primary constructor. and now derives from AbstractDiagnosticsTaggerProvider. AbstractDiagnosticsAdornmentTaggerProvider was merged into AbstractDiagnosticsTaggerProvider

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge March 7, 2024 18:59
@CyrusNajmabadi CyrusNajmabadi merged commit 3fa9ffd into dotnet:main Mar 7, 2024
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 7, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the simplifyInlineTagger branch March 7, 2024 21:57
@RikkiGibson RikkiGibson modified the milestones: Next, 17.10 P3 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants