English 中文(简体)
How to clear the IntelliJ project index?
原标题:

I ve run into trouble that makes me suspect there is a bad index file that needs to be cleared. The symptoms are:

  • Cmd+N will only find a subset of classes in the project
  • Trying to run JUnit test on a package won t find the test classes in that package.

Before suspecting a bad index I reinstalled IntelliJ 8.1.3, then I removed and re-checked out the source code. It didn t help. Only after checking out the code into a different folder did IntelliJ start working correctly again, but only for the new project folder. The old project folder is still infected.

So where is that index and how do I clear it?

最佳回答

File | Invalidate Caches, restart. Or manually delete the following folders:

Linux/Windows:

  • USER_HOME/.IntelliJIdeaXX/system

Mac:

  • ~/Library/Caches/IntelliJIDEAXX

(where XX is your IDEA version).

See the FAQ for more details and folder locations of the other IntelliJ IDEA platform based products.

问题回答

For mac you can just hover over the project in recent project list, and click fn + del. that s all.

This happens to me occasionally. Under your home directory (~ on Linux/Unix, C:UsersLoginName under Vista/Win7, C:Documents and Settings... under XP) you will find a directory called .IntelijIdea8x. You will want to close down IntelliJ and delete a couple of key directories, most probably:

  • system/caches
  • possibly system/js_caches;
  • possibly system/jsp_caches (although probably not in this case).

Restart it and that should fix it.

You could do the following now via IDE to invalidate cache:

  1. From the main menu, select File | Invalidate Caches.

  2. In the Invalidate Caches dialog, Click Invalidate and Restart.

If you click Just restart, cache files etc. won t be deleted.

In case if the above did not solve your problem, proceed with the manual way.

Locate the following Location and hard delete it.

~/Library/Caches/IntelliJIDEA{version}





相关问题
2 mysql instances in MAC

i recently switched to mac. first and foremost i installed xampp. then for django-python-mysql connectivity, i "somehow" ended up installing a seperate MySQL. now the seperate mysql installation is ...

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Controlling OSX windows

I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...

Switching J2SE versions on Mac OS (SnowLeopard)

My current JDK on Mac OS (10.6) is set to 1.6 and I d like to switch to 1.5. A listing of /System/Library/Frameworks/JavaVM.framework/Versions/ shows: lrwxr-xr-x 1 root wheel 10 Nov 3 18:34 ...

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

export to MP3 from quicktime API

A question for Apple,QT programmers. Would like to know if it s possible to export a Movie object to MP3 using the QuickTime API. Preferably the ConvertMovieToFile function. I ve looked at ...

热门标签