How to ignore certain directories while synchronizing in IntelliJ IDEA - intellij-idea

I use samba to mount remote directory locally to use IntelliJ IDEA, but my project contains many large files, and they do not need to be used by IntelliJ IDEA. Luckily, the files are put under several directories, so maybe I can ignore these directories to speed up synchronizing process. I failed to find any setting about this features. It is such a pain to wait several minutes before actually do anything. Does IntelliJ IDEA support such feature? How can I enable it?

You can try to Mark Directory as Excluded. Even though below link is for CLion, I believe, it works in a similar way in Intellij as well.
https://blog.jetbrains.com/clion/2015/12/mark-dir-as/

Related

Intellij 2018.2 stops working and exits on MacOs. What might be a problem?

As an daily IntelliJ user you usually concentrate on the projects you are working on and IntelliJ is just a tool. You are not willing to dig into tool's problem itself. But this is what is forced on you by default after IntelliJ installation on MacOS and opening relatively big project(most of the projects nowadays are huge and have thousands of files and use numbers of IntelliJ 3rd party plugins).
Here is a minimal list of actions. IntelliJ must have set MORE RAM to be used by default.
Read: https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files .
From IntelliJ open Help / Show log in Finder and open idea.log file with Console.app; In Console.app press "Reload" and "Now" buttons to track "live" what IntelliJ is doing.
If in logs of IntelliJ you find that some of the plugins exit with fatal error, you just uninstall those plugins. For me the one that failed to the moment of this answer was "BashSupport" as example.
Start Terminal.app ; Run command: open -a TextEdit /Applications/IntelliJ\ IDEA.app/Contents/bin/idea.vmoptions ; Change options in idea.vmoptions file to:
-Xms1024m
-Xmx2048m ; Read https://www.jetbrains.com/help/idea/tuning-the-ide.html to see how you can tune IntelliJ for your project. This step is handy when your IntelliJ app doesn't start at all and you want to change properties in a global way.
From IntelliJ open Help / Edit Custom Properties.... Here you can set same properties that will override global and will work only for current OS user.
Also there is also a possibility of underlying OS to do it voodoo magic so the IntelliJ won't work as it should like here - https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000398280-IDEA-Ultimate-2018-2-Unable-to-save-settings-Unable-to-create-file-Windows-10
Make sure your project build output for *.class files is set. Read: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000000584-Build-does-nothing . In my case when IntelliJ started project build it terminated without warnings shortly after.
Finally in my case none of 6 steps above solved the issue so I found this read: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000532044-IntelliJ-cannot-build-projects . Basically try reinstall IntelliJ from original distribution again.
I know that you must read https://www.jetbrains.com/help/idea every time you install a new version of IntelliJ, but why not to add some consistency into configuration process of the main java process that runs IntelliJ itself? You can ask how much ram to use during installation of IntelliJ and explain why it is so. Then Help digging won't be necessary in the first place for devs who fed up with changing those default settings that will be always more than 700MB. I think for most devs out there it is at least 10x of that. I bet what makes most devs mad about this is not the fact that you need to do some options changing, but where those options are depending on OS plus the fact that you simply forget why IntelliJ app just exits while you are doing a debugging of your own app. I bet this problem makes us mad since first java based IDEs appeared. User-friendly is the key here and explicit reminders within the app itself would help.

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.

How to put IntelliJ/Pycharm settings under version control?

I'm a frequent user of PyCharm and a number of the other JetBrains IDEs. I try to keep my settings synchronized across the different IDEs, but I'm now considering moving to IntelliJ IDEA and am finding it extremely difficult to figure out what I've changed and what the differences are among my different settings files.
How can I put my PyCharm settings files under version control so that I can track my changes and also quickly revert back to old versions so I can try out new settings changes without fear?
(I don't mind exporting to a specific repo each time, but it seems that the settings always export as JAR files, which don't lend themselves to VCS.)
I am using the Settings Repository plugin to syncronize settings between PyCharm and PhpStorm and it is working very well. It is actually designed with version control and team sharing in mind, see project repo on github and have built in support for conflict resolution, merge and overwriting remote or local.
It does also support file system and, from what I can tell, what then is stored is the mirror version of the git repository.
PyCharm (at least the Linux 4.X and 5.0 Pro versions) places its config files in a .idea dir under the project dir:
$ find .idea/
.idea/
.idea/libraries
.idea/libraries/Google_App_Engine_SDK.xml
.idea/libraries/Generated_files.xml
.idea/apartsw.iml
.idea/misc.xml
.idea/modules.xml
.idea/runConfigurations
.idea/runConfigurations/apartsw.xml
.idea/encodings.xml
.idea/vcs.xml
.idea/inspectionProfiles
.idea/inspectionProfiles/MyProject.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/watcherTasks.xml
.idea/webResources.xml
.idea/workspace.xml
.idea/scopes
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/dictionaries/username.xml
I added the entire dir with the exception of .idea/workspace.xml into the project's git repo, following JetBrains' PyCharm-specific and/or generic .idea-based Tools recommendations.

IDEA sharing settings

I want to share exported settings from webstorm to other IDEA-s for example pycharm etc... Is exported settings compatible with other IDEA-a, so that for example I import webstorm settings to pycharm and then modify some settings in pycharm and again import exported settings from pycharm to webstorm. Would this action be safe so nothing would be corrupted?
I do not think you would corrupt any settings. However, some settings may get dropped. For example, if there is a setting that is available in WebStorm, but not PyCharm, PyCharm may "drop" that setting. When you go to import back into WebStorm, that setting would be lost.
The reason I say that is that ultimately the settings export/import are copies of the XML configuration files in IDEA's config directory. (See Directories used by the IDE to store settings, caches, plugins and logs for information on its location. The path should be similar for WebStorm and PyCharm.) When PyCharm imports the settings, it is just replacing the various setting XML Files. But then when PyCharm runs, upon loading and re-saving the settings file, it may drop elements that are not applicable. (My suspicion, is that it would not, but you'd have to test to be sure.)
Another option from using the settings import/export would be to just do a diff between the two config directories using a good diff tool like Beyond Compare.
This is an unusual activity, so there's probably not many people that have actually done (or tried) this. As such, unless someone from the JetBrains development team comes on to definitively say one way or the other, I think your best bet is to just try and see. Of course, backup your settings before doing an import from the other tool :)

Intellij 9.0.2 on Windows 7 putting the .IntelliJIdea90 folder under the Administrator folder

For some reason the .IntelliJIdea90 folder is under C:\Users\Administrator.IntelliJIdea90 when I installed Idea 9.0.2 on Windows 7 (64 bit). Does anybody have an idea why this would happen?
IDEA is using user.home Java property to find the location of your home folder. On your system this property returns Administrator for some reason. It's JDK standard property, so the problem is outside of IDEA code. Not sure what can be causing it, maybe some environment issue. On my Windows 7 64-bit IDEA puts this folder into the correct location with my user name.
You can get better luck with this OS/JDK related issue at http://superuser.com.
Paths to IDEA folders can be changed in IDEA_HOME\bin\idea.properties.
I would always suggest to use for IntelliJ the ZIP versions - so never the installer.
This way you have the greatest control over your configuration, and also can have more IntelliJ versions side by side on the same computer.
After downloading the IDEA ZIP, you need to edit just two files:
idea.bat - to specify the JDK at the beginning
idea.properties - to change where the configuration is saved
I would suggest to use $idea.home as a place for configuration instead of the default $user.home . This way each IntelliJ version would have it's own configuration that would not mix with the other installations.
The big advantage of this approach is that is also portable among computers, e.g. once you do the above, you can copy that to several other computers and IntelliJ will just work there too.
The only downside of the method is that without the installer, you need to create on the desktop the icon to idea.bat manually.