question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
hrntrncommented, Jul 4, 2020

Ek Açıklama 2020-07-04 143025

I think problem solved by me. You wants this like picture using shortcut with Alt+Enter shown the Show Context Actions. Firstly you must install a plugin for Show Context Actions. You can follow that steps: Open -> SDK manager -> left menu Plugins -> when on Marketplace search " Flutter Snippets" after that install plugin restart IDE. Your problem solved. Secondly your option; If you wants change shortcuts you can follow steps: Android Studio File --> Settings --> Keymap --> Search this keyword “Show Context Actions” Right click Add Keyword Shortcut in area you can make the choice you want shortcuts. For example I want to chosee Ctrl+Space:

ctrl+space

I hope help for you

1reaction
Manga301commented, Jan 12, 2021

If you are using MacOS try closing Android Studio and making sure that it is not running in the background, then reopen it again, worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show Context Actions bulb (Alt+Enter) does not work
Hi, Do I understand Right that the issue is in broken menu item (Show Context Actions) in the Editor context menu? If you...
Read more >
Alt+Enter stopped working for Dart files in IntelliJ
Go to Android Studio -> Preferences -> Editor -> Intentions -> Quick assists powered by the Dart Analysis Server (Mark it) -> Apply....
Read more >
Intellij IDEA Tutorial for Eclipse Users - JRebel
Plugins can also contribute to intentions and add the specific actions to the context. IntelliJ IDEA as eclipse user alt enter error. Read...
Read more >
Android Studio and IntelliJ - Flutter documentation
How to develop Flutter apps in Android Studio or other IntelliJ products. ... Editing code and viewing issues; Running and debugging.
Read more >
How To Enable Flutter Intentions (Ide Shortcuts) In Android ...
Android Studio Editor IntelliJ Intention / Context Actions Alt+Enter not functioning #4686. Open. SadSack963 opened this issue on Jul 3 2020 9 comments....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found