Skip to content

Improve usability of Enable Nullable Reference Types refactoring #57476

@sharwell

Description

@sharwell

Follow-up items to improve #57200.

  • Allow the caret to be placed on the # or nullable tokens (currently it must be placed on the enable token)

    if (!token.IsKind(SyntaxKind.EnableKeyword) || !token.Parent.IsKind(SyntaxKind.NullableDirectiveTrivia))
    return;

  • Allow the refactoring to be triggered from a #nullable restore line

  • Allow the refactoring to be triggered from a #nullable disable line

  • Improve the light bulb preview associated with the change

  • Improve the application preview that appears if the user selects "Preview changes"

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Completed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions