IntelliJ ALT+Enter doesn't show correctly on the first key press - flutter

I recently updated IntelliJ to 2021.3 Community Edition and I'm using the latest Dart and Flutter plugins.
Whenever I press ALT+Enter to open the context menu (for example if a needed library is not imported), it doesn't show all the expected options the first time. Instead, I get something like this:
If I close it and open it a second time, it's the same. But if I open it a third time, it works as expected:
It's as if it takes a while to compute which options should be shown. I never experienced this before upgrading (from a very old 2018 version).
Any ideas?

Related

Flutter Terminal not working correctly in VS Code

I wanted to start learning flutter recently, so I set everything up, and code wise its going fine, but I have one major issue regarding the terminal in VS Code: Once I type any kind of command (for example: "flutter pub add ...") it doesn't do what its supposed to do but instead asks me how I want to open this file. There is no error message and other than this nothing happens. If I choose "VS Code" or "Text Editor" as an app to open the file with it simply shows my a blank text field.
I am using Windows 11.

Automatic Hot Restart and Reload Stopped Occurring - Flutter/VS Code

I've been learning Dart/Flutter on VS Code and the Hot Restart/Reload was always automatic (if I changed a color in the code, it automatically showed up on screen). I have to manually trigger the action now. I have no idea what changed.
I'm using VS Code and iOS emulator. I can't run SDK on Android Studio right because I'm on the new mac M1 processor.
Solutions I've tried:
Opened other Flutter projects and verified the hot restart isn’t
working on any of them (its not an import error like other posts have suggested)
I ensured that I can manually hot restart from VSCode and terminal to see changes
Flutter Doctor shows no errors
I ran Flutter Upgrade from the terminal anyway
I uninstalled and reinstalled Dart and Flutter from VS Code
I ensured VS Code’s autosave feature was on
I ensured VS Code’s “Dart: Flutter Hot Reload on Save” (and Restart) were both checked
I tried running with and without debugging
I restarted my computer and VS Code
Edit: I just installed Android Studio and cannot get an automatic hot reload here either. I connected it to iOS emulator, turned on automatic saving after 2 seconds of being idle, and still have to manually reload. Alternatively, I can go to the menu and click "Save All" and it will reload to update the UI (without me having to click a hot reload or restart icon). But, it's still manual.
Edit: 2/25/21: A "fix" has been introduced in the v3.20.0 beta.
https://dartcode.org/releases/v3-20/
Ok, I was finally pointed in the right direction for an answer.
Apparently, the automatic hot reload after an IDE autosave was a bug that some users found to be a useful feature. The intended functionality was to only trigger a hot reload on a manual activation. Thus, the bug (feature) was "fixed" taking this functionality away.
Feedback shown a light on the fact that some people found the bug useful and there is now an indication that this functionality will be returned in the future.
https://github.com/Dart-Code/Dart-Code/issues/3110
Edit: 2/25/21: A "fix" has been introduced in the v3.20.0 beta.
https://dartcode.org/releases/v3-20/
VSCode can be buggy sometimes and this problem is arguably the most annoying. I had this happen to me last week when I decided to use a barrel file with flutter web.
Meaning, I had a folder with all the components exported and then would import only that one file, like this
And then wherever I wanted all those files to be, I would add
import barrell.dart
Now this worked perfectly fine when I was working with flutter on mobile, and the second I went to flutter web my app would not hot reload.
I share this with you to say that I found out about this by a process of elimination. Took me a little bit, but I created a new project from the bottom up, added in each part one by one, and then I found that it was this barrell file that was messing the hot-reload up..
So my best advice is to do the same - start fresh with a new project, add back the pieces one-by-one and if you do find out what is causing the hang-up, I implore you to share it here:
https://github.com/flutter/flutter/issues

Double clicking to open a file doesn't work with Visual Studio Code

I am using Visual Studio code and it works fine except that double clicking the file doesn't seem to open the file. Instead the Program just opens with an Untitled.txt screen.
Right click -> Open with code also works.
How do I make it work? I am using Windows 8.
This wasn't the case some versions back, but now it seems, that it actually is the expected behaviour. The developers intentionally do not register VSCode as the default open handler (don't ask me why).
But maybe there is a workaround. Try the following steps:
1. Try to associate the filetype(s) with another app, and then again to VSCode.
2. If setting to other editors and returning to VSCode still opens Untitled-1.txt, then you could
3. try reinstalling VSCode, and then reset it. When resetting, confirm that there is only one VSCode in the choice list.
It also could be, that you'll need to reboot your machine. Finally, you'll possibly also want to take a look at this issue on GitHub.
Hope you can solve it this way.

How to link Eclipse editor window to Eclipse project

I'm running into an issue in Eclipse where the editor pane is not linked to the project in the Package Explorer window. For instance, if I click on a project in the package explorer and then open a Problems window that is set to Configure Contents > uncheck Show all items > set Scope to On any element in same project, it will show any applicable errors or warnings, but as soon as I open one of the class files with an error/warning in it, in the editor pane, the problems list goes blank as the editor pane does not appear to link the active tab to the active project. Simply clicking the Package Explorer window will then repopulate the problems tab until focus goes back to the editor window/tab.
This used to work with older versions of Eclipse, but ever since I updated Eclipse, it no longer does this and I don't recall which version it was that I had been using. I've also downloaded a completely clean copy of Eclipse Luna (latest version) and simply imported the old projects and still the same issue.
Is there any way to change it so the active tab in the editor points to its associated project? It's quite frustrating having to click the Package Explorer window every time I want to look at a list of problems or tasks for a specific project.
Edit: I've narrowed the issue down to minimized windows only and provided an example of the issue below.
Both windows are restricted to "Show issue on project" rather than showing all issues. Notice how the "Tasks" window works as intended while the "Problems" window does not.
Found the issue... sort of. Apparently, if you minimize the problems tab, then try to access it via the minimized icon for the tab, it loses the correct focusing to tell you what the problems are. My previous version was setup in exactly the same way and had no issues, so they must have changed something that broke this. Going to look at submitting this to the Eclipse team, as a bug.

How to stop nodeclipse from jumping cursor outside function calls

I've been having a problem since I started using Eclipse with nodeclipse plugin. When I call a javascript method that takes a callback, the editor jumps the the cursor to the position after the closing parenthesis of the object method, e.g.
obj.foo(a, function(){
console.log('message');
});
as I type the console.log call, the cursor is inside the quotes, after message. I press tab once, and the cursor jumps outside the closing quote of 'message'. I press it again, and it jumps outside the closing parenthesis console.log('message'). I type semi-colon and press enter, and instead of the editor creating a new line under the console.log() call, it jumps to the end of the obj.foo() call.
I looked in the formatting options but I couldn't find a setting that addresses this functionality, and I tried searching SO and google,but can't find a search term that gives relevant results.
Please help? It's driving me nuts and killing my productivity.
Generally when running into software strange behavior, the steps are (for the Nodeclipse)
update JDK
get latest Eclipse (now 4.3.0 Kepler)
get latest plugin version (Nodeclipse will be 0.5 next week)
In case you are using on Eclipse IDE for Java EE developers, I also ran into strangeness Delete key sometimes doesn't work in HTML Editor of Nodeclipse NTS (Based on Eclipse 4.3 Kepler)
Now I switched to SDK and IDE for Java/SDL developers, that seems more "tidy". Next Eclipse distribution "Enide Studio" will be based on Eclipse IDE for Java/SDL developers.
The page with download recommendation http://www.nodeclipse.org/updates/ was updated.
BTW, I usually don't use Tab as in Editor it has meaning "several spaces". Just use arrows keys. Nice to know anyway.