Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Add directive attribute support. #367

Merged
merged 1 commit into from
Jun 5, 2019
Merged

Add directive attribute support. #367

merged 1 commit into from
Jun 5, 2019

Conversation

NTaylorMullen
Copy link

@NTaylorMullen NTaylorMullen commented Jun 4, 2019

  • Updated TagHelperDescriptorJsonConverter to match what is in Razor.
  • Added the new completion item provider APIs to our list of services.
  • Created a new Completion namespace to hold off of Razor's various completion pieces.
  • Added a new completion item provider to provide @... when in a directive attribute compatible area when no text has been typed.
  • Partially moved the existing completion system over to AttributeCompletionDescription. There's more work that needs to be done here to be able to delete Razor.VSCode's description info types in favor of Razor's.
  • Expanded the completion endpoint to understand Directives, DirectiveAttributes and DirectiveAttributeParameters.
  • Updated the RazorDiagnosticPublisher to handle cases when the underlying RazorCodeDocument has been garbage collected. Razor no longer caches these objects.
  • Added and updated loads of tests.

image

dotnet/aspnetcore#6364

- Updated `TagHelperDescriptorJsonConverter` to match what is in Razor.
- Added the new completion item provider APIs to our list of services.
- Created a new `Completion` namespace to hold off of Razor's various completion pieces.
- Added a new completion item provider to provide `@...` when in a directive attribute compatible area when no text has been typed.
- Partially moved the existing completion system over to `AttributeCompletionDescription`. There's more work that needs to be done here to be able to delete Razor.VSCode's description info types in favor of Razor's.
- Expanded the completion endpoint to understand `Directive`s, `DirectiveAttribute`s and `DirectiveAttributeParameter`s.
- Updated the `RazorDiagnosticPublisher` to handle cases when the underlying `RazorCodeDocument` has been garbage collected. Razor no longer caches these objects.
- Added and updated loads of tests.

dotnet/aspnetcore#6364
@@ -133,7 +133,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
writer.WriteEndObject();
Copy link
Author

Choose a reason for hiding this comment

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

All the changes here are a direct copy from Razor. Sadly our serialization logic is in the VS windows specific binary.

@@ -0,0 +1,136 @@
// Copyright (c) .NET Foundation. All rights reserved.
Copy link
Author

Choose a reason for hiding this comment

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

Git diff failure here. Did not touch all of this.

@@ -0,0 +1,334 @@
// Copyright (c) .NET Foundation. All rights reserved.
Copy link
Author

Choose a reason for hiding this comment

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

Ditto git diff failure.

services.AddSingleton<RazorCompletionItemProvider, DirectiveCompletionItemProvider>();
services.AddSingleton<RazorCompletionItemProvider, DirectiveAttributeCompletionItemProvider>();
services.AddSingleton<RazorCompletionItemProvider, DirectiveAttributeParameterCompletionItemProvider>();
services.AddSingleton<RazorCompletionItemProvider, DirectiveAttributeTransitionCompletionItemProvider>();

Choose a reason for hiding this comment

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

Any reason this logic can't be merged with DirectiveAttributeCompletionItemProvider?

Copy link
Author

Choose a reason for hiding this comment

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

It might eventually but for now it wouldn't work as expected in VS because we can't intermingle @... with HTML completions.

@NTaylorMullen NTaylorMullen merged commit 4719076 into master Jun 5, 2019
@NTaylorMullen NTaylorMullen deleted the nimullen/6364 branch June 5, 2019 16:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants