sdk
sdk copied to clipboard
CTRL + Click `part of 'file.dart';` directive doesn't work without `part` directive
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:
- Run
dart create bug - Replace the content of
bin/bug.dartwith:
part 'foo.dart';
- Hold CTRL + Click over
foo.dartor use the assist to create the new file - Manually create a new file under
bincalledbar.dart - 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.
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.
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.