Flutter-intellij: Show Context Actions not work when use sub plugins/packages

Created on 24 Dec 2019  ยท  6Comments  ยท  Source: flutter/flutter-intellij

Steps to Reproduce

  • Thanks for your attention. I have a problem when use the keymap of Other/Show Context Actions
  • In the past we are only have a flutter project. And can use the Show Context Actions to fix some problem such as import some file quickly.
  • But now we had separate all business and then every business is a package. Not only that, There have some plugins in our project.
  • Because of that, Now we can't use Show Context Actions to import quickly. It is really difficult when developing.
  • By the way, The Main menu/Code/Completion/Basic is also not work
  • It is the Main menu/Code/Completion/Basic. It show No suggestion when I want auto complete

image

  • It is the Show Context Actions. There are no import select item In the suggestion

image

Version info

  • It is the version
[โœ“] IntelliJ IDEA Ultimate Edition (version 2019.2.1)
    โ€ข IntelliJ at /Applications/IntelliJ IDEA.app
    โ€ข Flutter plugin version 42.1.2
    โ€ข Dart plugin version 192.7761
  • It is my flutter doctor
$ flutter_release doctor -v                   
[โœ“] Flutter (Channel unknown, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G95, locale en-CN)
    โ€ข Flutter version 1.9.1+hotfix.6 at /Users/siyi.guo/flutter_release/flutter
    โ€ข Framework revision 68587a0916 (3 months ago), 2019-09-13 19:46:58 -0700
    โ€ข Engine revision b863200c37
    โ€ข Dart version 2.5.0


[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    โ€ข Android SDK at /Users/siyi.guo/Library/Android/sdk
    โ€ข Android NDK at /Users/siyi.guo/Library/Android/sdk/ndk-bundle
    โ€ข Platform android-29, build-tools 28.0.3
    โ€ข ANDROID_HOME = /Users/siyi.guo/Library/Android/sdk
    โ€ข Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[โœ“] Xcode - develop for iOS and macOS (Xcode 11.0)
    โ€ข Xcode at /Applications/Xcode.app/Contents/Developer
    โ€ข Xcode 11.0, Build version 11A420a
    โ€ข CocoaPods version 1.7.0

[โœ“] Chrome - develop for the web
    โ€ข Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[โœ“] Android Studio (version 3.5)
    โ€ข Android Studio at /Applications/Android Studio.app/Contents
    โ€ข Flutter plugin version 39.0.3
    โ€ข Dart plugin version 191.8593
    โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[โœ“] IntelliJ IDEA Ultimate Edition (version 2019.2.1)
    โ€ข IntelliJ at /Applications/IntelliJ IDEA.app
    โ€ข Flutter plugin version 42.1.2
    โ€ข Dart plugin version 192.7761

[โœ“] Connected device (2 available)
    โ€ข Pixel XL โ€ข FA68S0309515 โ€ข android-arm64  โ€ข Android 8.1.0 (API 27)
    โ€ข Chrome   โ€ข chrome       โ€ข web-javascript โ€ข Google Chrome 79.0.3945.79 


! Doctor found issues in 1 category.

waiting for customer response

Most helpful comment

you can change "Dart : Quick assist powered by the Dart Analysis Server."

All 6 comments

Could you share some details about your project structure? Where are the sub-packages in relation to the project root directory? Do the context actions show up for any Dart files in the project? (At the top-level?)

  • Hello @pq . Thanks your reply. Here is our project structure
โ””โ”€โ”€ project_demo
    โ”œโ”€โ”€ lib
    โ”‚ย ย  โ””โ”€โ”€ main.dart
    โ”œโ”€โ”€ module
    โ”‚ย ย  โ”œโ”€โ”€ module_one
    โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ lib
    โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ pubspec.yaml
    โ”‚ย ย  โ””โ”€โ”€ module_two
    โ”‚ย ย      โ”œโ”€โ”€ lib
    โ”‚ย ย      โ””โ”€โ”€ pubspec.yaml
    โ”œโ”€โ”€ module_base
    โ”‚ย ย  โ”œโ”€โ”€ lib
    โ”‚ย ย  โ””โ”€โ”€ pubspec.yaml
    โ”œโ”€โ”€ plugins
    โ”‚ย ย  โ””โ”€โ”€ grab_logger
    โ”‚ย ย      โ”œโ”€โ”€ lib
    โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ log_utils.dart
    โ”‚ย ย      โ””โ”€โ”€ pubspec.yaml
    โ””โ”€โ”€ pubspec.yaml
  • And with this structure, We can't use any context actions of all plugin/package.

The real phenomenon

  • Oh. Now I know why it can't work. We depend all base plugin in module_base. and all module depend module_base. So the context actions is work at module_base but not work at all module

Expect

  • Very thanks your attention. Could you please help us to optimize it? We are developing too difficultly.
  • Very very thanks~
  • Hi @liyuqian . Can you pay attention to this issue?
  • If A -> B -> C. We can't use context actions of C in A. It difficult to work because that.
  • Thanks for your attention

@gsy13213009 : thank you for reporting the issue! It would tremendously help us identify and fix this issue if you can upload a sample setup to Github.

For example,

  1. Create a directory root/ with 3 Dart packages root/A, root/B, root/C.
  2. Setup dependencies locally so it will reproduce your issue.
  3. Upload root to Github.
  4. Check that one can git clone your root directory, and reproduce your issue on a new environment.

Without additional information we're unfortunately not sure how to resolve this issue. We're going to close this bug for now, but please don't hesitate to comment on the bug if you have any more information for us; we're happy to reopen. Thanks for your contribution!

you can change "Dart : Quick assist powered by the Dart Analysis Server."

Was this page helpful?
0 / 5 - 0 ratings