-
Notifications
You must be signed in to change notification settings - Fork 315
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
Code completion should insert placeholders for @required
parameters
#553
Comments
This feature sounds like a great carrot to encourage dart package authors (and flutter framework authors) to annotate @required correctly. :) |
Not sure if there's an is an issue for the associated quick-fix for this - |
Groundwork for: flutter/flutter-intellij#553 BUG= R=brianwilkerson@google.com, scheglov@google.com Review-Url: https://codereview.chromium.org/2692983003 .
A little refinement to the proposal. Instead of: child: new Padding(
padding: ,
), I think we want: child: new Padding(
padding: null,
), since it will parse cleanly. |
That sounds right. And then the Flutter framework should be updated to mark child child: new Padding(
padding: null,
child: null,
), |
BUG= R=brianwilkerson@google.com See: flutter/flutter-intellij#553. Review-Url: https://codereview.chromium.org/2719083003 .
First step towards wiring up default args for completions. See: flutter/flutter-intellij#553 Next up: similar enhancements for type_members, imported_refs, etc. BUG= R=brianwilkerson@google.com, scheglov@google.com Review-Url: https://codereview.chromium.org/2722253002 .
Default arg support for: * inherited refs * imported refs * type members * local constructors BUG= R=brianwilkerson@google.com, scheglov@google.com See: flutter/flutter-intellij#553 Review-Url: https://codereview.chromium.org/2728653004 .
* updates to the latest version of the `CompletionSuggestion` API * adds a template builder and linked edits for default argument lists (when present) See: flutter/flutter-intellij#553
As of dart-lang/sdk@cc0036d, support is in place on the DAS side. Once JetBrains/intellij-plugins#495 lands, completions in IDEA will go from a proposal like this to generated code like this (Note that FYI @sethladd |
Um, that's awesome. Nice work! |
Oh, this looks super awesome!
…On Thu, Mar 2, 2017 at 10:33 PM, Seth Ladd ***@***.***> wrote:
Um, that's awesome. Nice work!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#553 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANAximhvTaFQPI1F_pfE8FnpSiayoXVJks5rhzWQgaJpZM4LOHLT>
.
|
Very cool! |
* updates to the latest version of the `CompletionSuggestion` API * adds a template builder and linked edits for default argument lists (when present) See: flutter/flutter-intellij#553
@required
parameters @required
parameters
@required
parameters @required
parameters
As of dart-lang/sdk@f33d072, completion on 👍 The relevant framework bits in IDEA landed in JetBrains/intellij-plugins@314c62a, and will be available in the next release of the Dart Plugin. There's a continuing discussion of the treatment of non-required but possibly still desirable boiler-plate generation in #463. Note that getting the required analysis bits into Flutter is gated by flutter/flutter#8812. Since this is just gated by updates upstream, closing here. |
Very cool! |
* updates to the latest version of the `CompletionSuggestion` API * adds a template builder and linked edits for default argument lists (when present) See: flutter/flutter-intellij#553
@pq I have the latest Dart and Flutter plugin on Android studio but the code completion does not place cursor on null, it just sets it to null. |
Repro steps:
new Text( 'Button tapped $_counter time${ _counter == 1 ? '' : 's' }.', )
in line 80new Pad
and complete to PaddingExpected result: Editor completes:
to:
thus making it clear that a
padding
argument is required.Actual result: Editor completes to just
new Padding()
The text was updated successfully, but these errors were encountered: