-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Dart: allow quick fixes with multiple edits. and support .arb translation files. #871
Conversation
@hpoul I'm very sorry about the delay with your PR. Are arb files supported by the Dart Analysis Server? I haven't found it in the Dart SDK source code so far. |
@alexander-doroshko well.. the dart analysis server supports plugins.. and I've written one to show quick fixes for externalizing strings.. which requires multiple sourceedits to
See also dart-lang/sdk#46722 (comment) |
@hpoul Thanks. Allowing multiple source changes looks reasonable to me. Is there a real need in adding |
@alexander-doroshko iirc the main reason for my change was that the assist list checks whether the assist intention is part of an analysable file, and only shows it when that's the case: intellij-plugins/Dart/src/com/jetbrains/lang/dart/assists/DartQuickAssistIntention.java Line 76 in c412ed4
intellij-plugins/Dart/src/com/jetbrains/lang/dart/analyzer/DartAnalysisServerService.java Lines 881 to 900 in c412ed4
so I added the |
I've merged the multi-SourceFileEdits part of the PR.
As I understand, only the file in the editor is checked using |
close #871 (cherry picked from commit 13152cf65c4e95a5e3cbf257f29b7618a8c3c7d7) GitOrigin-RevId: fa410db5e899855c4c48250f8a2496d0e394ed7d
close #871 (cherry picked from commit 13152cf65c4e95a5e3cbf257f29b7618a8c3c7d7) GitOrigin-RevId: afe87787781f25b941f1b13d24c584d2a5381d2b
When a analysis warning is produced with multiple fixes they were correctly displayed in the "Dart Analysis" tool window. But in the quick fix drop down only fixsets with a single fix were displayed.
This changes this behavior to allow multiple fixes. And it seems to work for me.
In addition i've added
.arb
files to the list of analysis files.