Skip to content

Add quick fix to add import with prefix #24338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bwilkerson opened this issue Sep 12, 2015 · 2 comments
Closed

Add quick fix to add import with prefix #24338

bwilkerson opened this issue Sep 12, 2015 · 2 comments
Labels
devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@bwilkerson
Copy link
Member

There is a quick fix to add an import for an unknown type name, but when the type name is qualified the only fix suggestion is to define the class (which is not a valid fix and shouldn't be suggested). For example, enter the following code into a Dart file:

class C {
prefix.String s;
}

and place the cursor inside the identifier 'String'. It would be nice if one of the suggested fixes was to add an import (of dart:core, in this case) with the given prefix.

@bwilkerson bwilkerson added Type-Enhancement legacy-area-analyzer Use area-devexp instead. devexp-quick-fix Issues with analysis server (quick) fixes labels Sep 12, 2015
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed Priority-Medium labels Mar 1, 2016
@scheglov scheglov removed their assignment Aug 15, 2016
@srawlins
Copy link
Member

srawlins commented Oct 9, 2023

I like this idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants