Skip to content

Android Studio Editor IntelliJ Intention / Context Actions (Alt+Enter) not functioning #4686

Open
@SadSack963

Description

@SadSack963

Suspected error in Flutter Plugin version 47.1.2 (My Windows 10 system).
Flutter Plugin version 46.0.2 works correctly (My Linux system).

If the cursor caret is placed at or inside a widget name, there is no yellow intention bulb, and Alt+Enter does not bring up the list of suggestions as stated here: https://www.jetbrains.com/help/idea/intention-actions.html

Right-clicking the widget name allows you to select Show Context Actions from the context menu, but then a message is shown "No context actions available at this location".
Intent Editor NO Popup Windows Flutter Plugin v47 1 2

Right clicking on the widget in the Flutter Outline does bring up a context menu allowing to wrap with certain widgets (though there is no option to "Wrap with widget").
Intent Outline Popup Windows Flutter Plugin v47 1 2

The red bulb does appear if there are errors on the line.
Red Bulb

The yellow bulb does not appear when the cursor caret is within a widget name.
The yellow bulb does appear when the cursor caret is placed after the last ")," in a descending tree.
It also appears if the cursor is inside a text comment, and sometimes after the comma at the end of a parameter line, for example in the default project:

floatingActionButton: FloatingActionButton(
  onPressed: _incrementCounter,
  tooltip: 'Increment',
  child: Icon(Icons.add),

The yellow bulb appears when the cursor is at the end of the onPressed: and tooltip: lines only. The only context action is to Flip.
Yellow Bulb

File menu -> Settings:
Intention Bulb
Editor Intentions

=========================================================================
System: Windows 10
The context actions do not work.

flutter doctor -v
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18362.295], locale en-GB)
• Flutter version 1.17.5 at E:\Flutter
• Framework revision 8af6b2f038 (3 days ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at D:\Users\John\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.46.1)
• VS Code at D:\Users\John\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.12.0

[!] Connected device
! No devices available

! Doctor found issues in 1 category.

=========================================================================
System: Linux Mint
The context actions work correctly.

flutter doctor -v
[✓] Flutter (Channel stable, v1.17.3, on Linux, locale en_GB.UTF-8)
• Flutter version 1.17.3 at /home/john/Programs/flutter
• Framework revision b041144f83 (4 weeks ago), 2020-06-04 09:26:11 -0700
• Engine revision ee76268252
• Dart version 2.8.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at /home/john/Android/Sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: /home/john/Programs/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Android Studio (version 4.0)
• Android Studio at /home/john/Programs/android-studio
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)

[!] Connected device
! No devices available

! Doctor found issues in 1 category.

Context Actions work correctly in Linux with Flutter Plugin version 46.0.2

Intent Editor Popup Linux Flutter Plugin v46 0 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions