Skip to content

part Directive Quick-fix Should Auto-fill Path of Source File #3268

@Luckey-Elijah

Description

@Luckey-Elijah

Is your feature request related to a problem? Please describe.
When using part directives in Dart, Dart-Code offers one of my favorite quick fix features with Create file '<path>'. The file is created as expected, but doesn't populate the part of ; directive in the created file.

First file: foo.dart

part 'bar.dart';

Created file: bar.dart

part of ; // not filled

Describe the solution you'd like
When using the 'Create file' quick fix feature, the created file should be populated with the relative path of the source file.

First file: foo.dart

part 'bar.dart';

Created file: bar.dart

part of 'bar.dart';

Describe alternatives you've considered
As far as I've noticed, the feature only produces with the "unfilled" path behavior.

Additional context

Current behavior:

Screen Shot 2021-04-09 at 6 48 48 PM Screen Shot 2021-04-09 at 6 49 07 PM

Desired behavior:
Screen Shot 2021-04-09 at 6 48 48 PM Screen Shot 2021-04-09 at 6 50 26 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions