Why does IntelliJ IDEA 13.1 show sbt files with so many lines in red? - intellij-idea

I had a working sbt based project. After some small change that I can not specifically identify all the sbt files are having object resolution issues (see screenshots).
I tried the following:
sbt refresh
project rebuild
reimport project
These did not work.
Then I started going farther afield to resolve the issue. I copied the *.sbt files from another project on top of the ones in this project. Still no dice. Now I do not have time presently to actually completely destroy, rebuild the project from scratch - and in any case that does not lead to any insight on the root cause here.
Has anyone experienced this issue - and any suggestions on remedies/workarounds?
Update I finally tried
sbt gen-idea
even though this project was **not ** built that way.. It did make a difference: at least the crazy errors went away. But now a different set of problems arises: the assembly and packaging imports are not being resolved (see LAST screenshot). But this seems a bit more healthy at least .
Following screenshot is after running sbt gen-idea. Situation has improved but now get assembly/packaging import errors.
Another update
OK, I have quit and restarted IJ and things are finally back.
So the objective changes that I made:
sbt gen-idea
stop/restart IJ
This is feeling like magic incantations here .. Not a solid process.

A sort of a workaround could be to upgrade to the latest EAP of IntelliJ IDEA 13.1.3 build 135.909, released on May 23rd, 2014. It comes with more sophisticated Scala plugin that is much clever than the previous versions and hopefully could help here and there.

Related

Why cannot find declaration to go to in IntelliJ Idea?

I have a code in go, and I am using IntelliJIdea for development. It used to work fine, but since the time I have changed the folder where the code used to be, IntelliJ has been behaving in a weird manner. It shows me a lot of unable to find declaration to go to errors. After changing the folder where my project used to be, I changed the GOPATH and imported from the new directory once again.
I am attaching the screenshot as that will be better for understanding.
See the conductor.Start(). This function is right there in the package app. But it can't find this.
PS: I have tried importing the project from scratch and invalidating and restarting multiple times, but that didn't help.
I'm using Gogland, which is also a JetBrains IDE, but I also had a problem with symbols not getting resolved.
I fixed it by deleting the project's index file.
Close the IDE.
In your project directory, find a directory named ".idea".
Delete all files with the extension ".iml" in that directory.
Restart the IDE.
The project should get reindexed and symbols will be resolved.
https://www.jetbrains.org/intellij/sdk/docs/basics/project_structure.html?search=.iml
For my case, Intellij didn't have Rust installed. I found that out while trying to create a new project (it had JAVA and other language support). As soon as I installed Rust, it worked.
For my case, I have 2 virtual environments, and I found that I did not set the correct environment in Pycharm. The environment I used did not include these packages. After I changed the environment, everything goes well.

IntelliJ "Executing pre-compile tasks...:"

I am working on a large project using IntelliJ 14.1 latest.
Recently, whenever I stop editing for a minute or so, IntelliJ freezes for several minutes with the message "Executing pre-compile tasks...:" followed by the message "All files are up-to-date".
Any idea what is causing this behavior and what I can do to prevent it?
I faced this problem and it drove me nuts for about 3 days. The existing answers did not solve it. Neither did deleting preferences, caches, re-installing IntelliJ on my machine helped. I even tried to turn my Mac off and on again
Finally, what worked for me was to delete the .idea folder (which is usually located in the root of project)
Of course I feel stupid. Hope this helps someone else because this is one of the top hits for those keywords.
IntelliJ version : IDEA 2019.2.3 (Community Edition) on macOS 10.14.6
Your problem becasue 2 things:
- In source code have pre-compile script.
- IntelliJ IDEA build project automaticaly when IDE is idle.
Solution:
Choose menu File \ Settings... or press combine keys: Ctrl+Alt+S.
Choose Build, Execution, Deployment \ Compiler , uncheck item Make project autimatically (only work while not running / debugging)
or type in search box at top-left corner, search keyword something like the above.

intellij unresolved symbol for go lang project

I am using go sdk 1.2.1 linux/386 in intellij 14.0.3. However, when I open a golang project many function and variable are unresolved. I do not what is wrong with intellij. Anything that I can do to make the unresolved symbol solved. I have met the problems before. but I do not know to to solve it. Anyone have met the same problem before? Please help.
Thanks.
As I have no information about which plugin version you are using I'm going to assume that you have 0.9.15.3 release.
The fastest way to fix it would be to use one of the early releases for 1.0.0, available here: github releases page for go plugin for intellij idea
The plugin is currently under a major refactoring and we've started releasing preview builds for it. While the alpha name might be scary, I'm using it daily at work and it's very stable but not everything is up on par with the quality we want it to have.
If you have any further questions, either ask here or browse in the issue tracker
Also, there's a small community on Gitter and you may get answers from there as well.

Import of new play projects into IDEA via build.sbt hangs

I'm using the current release of the Play framework. After having created a new project via activator new foobar, I tried to import it into IntelliJ IDEA (with installed Scala plugin) by importing the project's build.sbt file.
IDEA/SBT then downloads the dependencies but is always stuck here (even after hours nothing happens):
SBT: [info] downloading http://repo1.maven.org/maven2/org/scalaz/scalaz-core...
Any help is appreciated.
I have not personally experienced that kind of hanging behavior, but here are a couple of thoughts.
I see that this library is about 1MB. (I'm not sure on the exact version, but I picked a recent one: http://repo1.maven.org/maven2/org/scalaz/scalaz-effect_2.11/7.1.0). Are you on an unusually slow connection? Others have reported the hanging when downloads are slowly taking place. See https://stackoverflow.com/a/12605068/2308858.
You can try clearing your ~/.ivy2/cache folder (this has fixed things for me before). If on Windows look for .ivy2/cache near your home folder.
I've noticed that sometimes SBT does not give insight into what it's doing, often because it is suppressing otherwise helpful output. Check out http://www.scala-sbt.org/0.13.5/docs/Howto/logging.html for some options on how to see more details or change the logging level.
Update: See second comment on original question for additional details.

Intellij IDEA 13 - Can't open Project Structure dialog anymore

as already described in title, i'm not able to open the project structure dialog window in intellij anymore.
neither the shortcut (Ctrl+alt+shift+s) nor the menu element under File -> Project Structure nor the little button in the upper right corner do work.
Clarification: Menu element :
This "bug" occured suddenly as I wrote a web (vaadin/maven) project and tried to set up glassfish, where i often had to switch to the project structure dialog.
Since the first occurence i wasn't able to fix it by restarting intellij or switching projects.
This also happened on my laptop running the same intellij and windows version (Ultimate 13.0.1 Build: 133.331 on Windows 7 x64)
i appreciate any help!
This also happened to me, but removing new plugins etc didn't help.
Nor did nuking my project and rebuilding it from scratch.
In the end I deleted all caches, restarted Intellij and at last I could access the project settings again! By the way, I'm using Intellij 11.1 - mainly because I can't get 13 to start up, but that's another story
Your log shows that it is a bug in IntelliJ IDEA - they are trying to create file passing null pathname. Try to delete project files and reopen project from scratch (maybe you've lost some file) - if it won't help then you should create an issue here: http://youtrack.jetbrains.com/ - You can even copy-paste text from your question and attach stacktrace
I had the same issue...upon further inspection in the log dump...I noticed the following:
ERROR - llij.ide.plugins.PluginManager - com.intellij.openapi.fileChooser.FileChooserDescriptor.setTitle(Ljava/lang/String;)V
java.lang.NoSuchMethodError: com.intellij.openapi.fileChooser.FileChooserDescriptor.setTitle(Ljava/lang/String;)V
at com.jetbrains.python.sdk.PythonSdkType.getHomeChooserDescriptor(PythonSdkType.java:247)
Disabled the latest Python Plugin and restarted and everything is working normal again.
I remembered I had recently update my python plugin and am not using it presently so I was able to disable it without issue.
Hope this helps someone else.
This also happened to me. The comment above helped. I had just added some plugins. Disabled them and it started working again. Not sure exactly which one because I disabled all 4 -- Bean Validation Support, Bitbucket, Jelastic Cloud Platform Integration, and Quick Notes.
For me it has been resolved by switching off FindBugs plugin and restart IDEA. So Project Structure is available for me now.
One of the plugins might be causing it. To disable a plugin, go here:
You'll know for sure if a plugin is bad if you see this Exclamation picture:
Clicking on it will bring up a pop-up. To disable the plugin, click on this:
For me it got resolved just by restarting the intelliJ IDEA. I'm using intelliJ IDEA Ultimate 2018.1 edition.