Intellij Code Completion Not Working

0 views
Skip to first unread message

Stephany Tousley

unread,
Aug 4, 2024, 2:25:49 PM8/4/24
to brilarsenmemb
Markposition changes in the completion popup: use the and icons to indicate whether the relevance of a suggestion is increasing or decreasing and therefore the suggestion has moved up or down the suggestion list.

Select if you want to insert the selected suggestion by typing certain keys that depend on the language, your context, and so on. For Java, such keys include Space, Tab, [ and ], ( and ), and some more.


Select this option if you want to use machine learning models to rank the most suitable items higher in the suggestion list. Select the languages for which you want to enable suggestions based on Machine Learning.


To use specific keys, select the Insert the selected suggestion by pressing space, dot, or other context-dependent keys checkbox. These keys depend on the language, your context, and so on. For Java, such keys include Space, Tab, [ and ], ( and ), and some more.


The Power Save Mode is on (File Power Save Mode). Turning it on minimizes power consumption of your laptop by eliminating the background operations, including error highlighting, on-the-fly inspections, and code completion.


Code completion popup might not appear automatically if it takes too long to gather the completion options. For example, if the computer is busy with another task. In this case, you may still activate the completion popup manually via Ctrl+Space.


Check to see if you accidentally turned on Power Save (File/Power Save Mode) I myself just discovered that File/Power Save Mode does turn it off. I was having the same problem and must have accidentally set Power Save Mode to on.


THE SOLUTION: go to explorer(finder/nautilus) find the .idea folder in the project and delete it. Then re-import the project. Once I re imported the project it loaded the node_modules folder as library root


Had the same problem and none of these helped. What I realized was that on mac, control + space is used by the OS to change language inputs and it overrides intellij. So if you are on mac having multiple input languages on your keyboard, consider changing the shortcut for it :)


In case this helps anyone; for me it was a windowing glitch of some kind. The suggestions popup showed on the wrong monitor, which I didn't notice the first time it happened.. after a while I saw what was happening. Resizing the window seemed to fix it.


If you're too lazy to restart your machine to fix the issue, you can kill the process taskkill /F /PID pid_number_of_idea64.exe (task manager -- view>select columns>PID) and then open CMD, head over to C:\Program Files\JetBrains\IntelliJ IDEA xxxx.xx.xx\bin, start idea.bat. Let this CMD window open.Please note that even after executing taskkill, idea64.exe process doesn't disappear from task manager. Try executing the same command again and you'd know that process doesn't exist anymore.


For me the code completion suddenly stopped working because I had nudged the IDEA window slightly off-screen, maybe just a pixel or two, which caused the code completion pop-up to (presumably) appear off-screen. Making sure the application window was fully visible fixed the problem.


It depends which product, for Intellij I might have to right click and import the .iml file from the root, or in Rider right click the solution file and open that. I'm only making this mistake 4 or 10 more times, and then it is never happening again.


Namely, in any new Java class added to an existing project, Code Completion does not work. So, after declaring an object variable of any type in the new class and then typing the name of that variable, followed by the dot (.), no suggestions come up for any of the methods of the corresponding object.


typing f. does not bring up a list of all the methods in the File class, to select one from. As a matter of fact, when typing the dot (.), no suggestions appear and at the bottom left (in the status bar) of the IDE window, the message "Identifier expected. Identifier expected." is displayed. Sometimes, a long list of totally irrelevant methods from irrelevant components or libraries are proposed.


Ensure that you are not in Power Save Mode while running IntelliJ (File [menu] -> Power Save Mode checked or not). If Power Save Mode is enabled, IntelliJ will not run background tasks, including code completion.


For followers, one thing that helped me (auto complete only showed castfieldinstanceofetc.) was that I had opened a maven module that didn't link correctly to its children (it had a commented out submodules section), so IntelliJ just showed the maven java files as basically "text" files with a tiny "j" in their icon in the project pane. Fixing up the root maven pom.xml file to include the children dirs as modules and voila, they are treated as real java files again, woot!


Now, in my case too the auto complete, Generate Override methods and other features were not working. What I figured out is that in my project settings, I had multiple configurations for the gradle modules. The moment I cleaned up the rest of the modules and retained the only one (apart from test) I needed for that project, all behaviors were back to normal.


Edit: If you do not want to create multiple configurations per sourceSet and you are importing a gradle module, on the import screen, you should also disable the Create a module for per sourceSet flag. Without this, I was having to remove the multiple modules after importing the module.


It was happening for me in a module that was not added in the parent project pom (they did it on purpose), that was the reason, I right clicked the pom.xml of the module that has the issue and clicked the


I was facing this issue while coding for eclipse-che client extension. Eclipse che modules are all of maven type. My client extension project was an independent module which can be compiled independent of the parent project. When I imported the same structure to Intellij my client-side extension project was not giving suggestions. After I include the client-extension project to the parent module (adding it to pom.xml) the suggestions started showing up.


I had run into this problem. None of the solutions from this post worked, but I was able to fix it because I accidentally put my project's package in the "Exclude from Import and Completion" settings.


IDEA is very quick and I'm beginning to like it.

However, when I try to edit Android XML file, the code completion never appears. In my office, I'm using MacBook Air (64bit), and when I tried Mac version, it worked beautifully.

In my home, I'm using Vista (32bit ver) and my laptop specs are not so good. (that's why I choose to change to IDEA from Eclipse...)


IntelliJ IDEA performs indexing of the JSDK, Android Platform and your project when you open it for the first time. You need to wait for the indexing process to complete (progress is displayed in the status bar at the bottom).


This new type of code completion was added to JetBrains IDEs with the latest 2024.1 update. As you can see below, it takes the form of gray-toned, single-line suggestions that complete lines based on the context of the current file:


Both full line code completion and JetBrains AI Assistant aim to help you work faster. They both also go beyond the standard completion that has been available in JetBrains IDEs for some time already. However, JetBrains AI Assistant offers a more comprehensive feature set, including context-aware smart chat and the ability to generate tests or write documentation.


Lastly, you may also be wondering why we decided to go for single-line suggestions. The length of the AI completion suggestions is a trade-off. While longer suggestions do tend to reduce how many keystrokes you have to make, which is good, they also increase the number of reviews required on your end. Taking the above into account, we decided that completing a single line of code would be a fair compromise.


This decision allowed us to reduce the size of the model without any significant decline in suggestion quality. In the 2024.1 version of JetBrains IDEs, we use a language model that has 100 million parameters, with a maximum context size of 1,536 tokens, which is roughly 170 lines of code.


Full line code completion is still in active development, so we encourage you to share your feedback with us. You can do so by leaving a comment under this blog post. You can also upvote existing issues here or create a new one by logging in and clicking on the New Issue button in the top right-hand corner.


By submitting this form, I agree that JetBrains s.r.o. ("JetBrains") may use my name, email address, and location data to send me newsletters, including commercial communications, and to process my personal data for this purpose. I agree that JetBrains may process said data using third-party services for this purpose in accordance with the JetBrains Privacy Policy. I understand that I can revoke this consent at any time in my profile. In addition, an unsubscribe link is included in each email.


I just started Intellij Idea ( version 13.1.4 )today and noticed code completion with ctrl + space doesnt work anymore. If i'm typing like a class the automatic popup still appears and i can autocomplete this way, but if i close the popup with esc i cannot open it with ctrl + space anymore.


Unfortunately, there is a problem with the code completion using Dart and Flutter plugins in the new version IntelliJ IDEA 2019.1. The weird thing is when the Class is written, IntelliJ can find the Dart package correctly, but when I try to write it from the start, the code completion doesn't work, IntelliJ say "No suggestions":


Another thing, I don't know why the structure project although the Dart SDK and the flutter plugin are set up, IntelliJ insists to put a different SDK, in my case, JDK, I think the code completion is having problems because of this:


It looks like it's just a bug in the current stable version of the Flutter SDK (and the current Dart language version it uses). This bug does not appear to be present in the current beta version however. If you open a terminal into your project directory (it's easiest in IntelliJ by clicking Terminal at the bottom of your window) and write the following:

3a8082e126
Reply all
Reply to author
Forward
0 new messages