sdk icon indicating copy to clipboard operation
sdk copied to clipboard

CTRL + Click `part of 'file.dart';` directive doesn't work without `part` directive

Open FMorschel opened this issue 1 year ago • 2 comments
trafficstars

From https://github.com/Dart-Code/Dart-Code/issues/5221:

Describe the bug CTRL + Click part of 'file.dart'; directive doesn't work without part directive.

To Reproduce Steps to reproduce the behavior:

  1. Run dart create bug
  2. Replace the content of bin/bug.dart with:
part 'foo.dart';
  1. Hold CTRL + Click over foo.dart or use the assist to create the new file
  2. Manually create a new file under bin called bar.dart
  3. Add the following to inside of the file:
part of 'bug.dart';

Expected behavior Currently, if you open foo.dart and CTRL + Click the bug.dart string, it will take you (open) that file. If you do the same under bar.dart it will not do anything.

It should do the same as the other CTRL + Click actions.

FMorschel avatar Aug 21 '24 15:08 FMorschel

Summary: The "CTRL + Click" functionality on a part of directive doesn't work when the corresponding part directive is missing. This prevents users from easily navigating between files using the feature.

dart-github-bot avatar Aug 21 '24 15:08 dart-github-bot

This will likely be impacted by the enhanced-parts support, so any work on this issue should be coordinated with that effort or postponed until the feature is implemented.

bwilkerson avatar Aug 21 '24 16:08 bwilkerson