Full reindex on file type pattern change

I added ".classpath" to the "registered pattern" for the "XML files" file type to get the "Find by XPath..." working with those files and IDEA seems to do a full reindex.
This is a lengthy operation especially if it tries to index a IBM RSA installation and I have no clue why this is necessary.

I think it is necessary to search for .classpath files but why does it index all .java and .class files?

6 comments
Comment actions Permalink

Someone from JetBrains can answer more definitively, but my guess would be that it is not creating an index file per file or even per file type. Rather it creates an index of all project files combined. So it can look up "foo" in the index and know all the files that contain it. Therefore when a new file type is added, it has to reindex the entire project. That would be my guess.

As for the IBM RSA install, it would only index that if it is on the source/classpath. Add the root of the installation to your exclude list and it will not index it. Doing such will hide it in the project tool window. If you still want to view it in the project window, you need to remove it from the list of source folders.

0
Comment actions Permalink

any filetype has aone or many associated file extensions. java and class files are registred file extensions by default. if you don't need to index some java files them you shoudn't keep them in a project - either exclude them, either remove from project at all. Why do you need to keep IBM RSA installation in project?

regards, Alex

0
Comment actions Permalink

markv schrieb:

... Rather it creates an index of all project files combined. So it can look up "foo" in the index and know all the files that contain it. Therefore when a new file type is added, it has to reindex the entire project. That would be my guess.


I think this would be a logical explanation because it would detect XML xrefs which weren't there before.

As for the IBM RSA install, it would only index that if it is on the source/classpath. Add the root of the installation to your exclude list and it will not index it. Doing such will hide it in the project tool window. If you still want to view it in the project window, you need to remove it from the list of source folders.

We have an Eclipse plugin in our project set which is used for generating some code and the RSA is the Eclipse installation used therefore. But I think I will install a plain classic Eclipse which is way more lightweight and refer to this installation. This should speed up indexing in the future.

0
Comment actions Permalink

As I answered Mark the RSA install is used for compiling an Eclipse plugin and I will replace it with a classic Eclipse for use in IntelliJ IDEA.
I am new to IDEA coming from Eclipse and so was not afraid to add the RSA as the Eclipse installation because Java indexing in Eclipse takes way less time and is mostly transparent except you are doing Java search or class name lookup in the first some minutes after checking out a big project.

0
Comment actions Permalink

is it possible to attach only compile time dependencies from the rsa installation? you could use ant compilation to keep rsa outside of project.

0
Comment actions Permalink

That may be a solution if you don't need any IDE support when coding the plugin and I don't see the point when IDEA claimes support for OSGI and then you have to keep all the classes outside of the project ...

0

Please sign in to leave a comment.