Open dark-chocolate opened 5 years ago
This is working as intended. The string "todo" isn't scanned everywhere, just as the first part of a comment. If you'd like to get this changed I suggest you file an issue in the dart-lang repository: https://youtrack.jetbrains.com/issues/WEB?q=Subsystem:%20Dart
But in Android studio, when I code in Java, writing todo
creates a comment automatically. Why that is not the case here in Flutter? And what did you mean by working as intended
? I am creating an issue there too but that team is too lazy, I have filled up issues there in the past, no one responds at all. Here is the link
I am creating an issue there too but that team is too lazy, I have filled up issues there in the past, no one responds at all
@dark-chocolate I'd disagree. See your previous issue. You've got a response in less than 2 hours (it was a week ago) and now it's your turn :)
Sorry! I didn't know about the AndroidComments live template. You can enable it for Flutter and Dart by adding Dart to the list of applicable elements. Click the Change
button near the bottom of the preferences/settings page:
@devoncarew @pq This is a pretty cool feature. We should consider enabling it by default, and if not, making it more discoverable. This is defined by IntelliJ, not Android Studio.
@stevemessick, this is defined in AndroidComments.xml
file, which is among Android Studio sources and therefore also in Android plugin for IntelliJ sources.
Thank you @stevemessick , it is working now. Love your support and help. Many thanks
@alexander-doroshko, what I meant was that if we want to enable this by default it can be done in the base Flutter plugin since it is available in IntelliJ CE, at least if you make an Android project. (I didn't check Java.) Thanks for the clarification.
And I'm going to re-open this so we remember to talk about it at some point.
And thanks @dark-chocolate for reporting this. I kinda like it, now that I know about it.
Speaking of technical details, I'm not sure Dart/Flutter plugins can add supported contexts to Live Templates defined in the Android plugin. But Dart/Flutter plugins definitely can have own set of predefined templates (and already have some), and these templates may have the same abbreviations (but different context).
Steps to Reproduce
When you type
todo
in Android Studio, it doesn't create a todo automatically. I have to type// todo
to make it work.Flutter doctor
[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14 18A389, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK 28.0.3) [✓] iOS toolchain - develop for iOS devices (Xcode 10.1) [✓] Android Studio (version 3.2) [✓] Connected device (1 available)
• No issues found!