How can I get the Spring features to work

I'm using build IntelliJ 11.0.2 build 11.277.
I have a module with all of the Spring facets activated.
When I open the configuration xml files I don't see a dependencies tab.
The icon for the configuration files does not have a green leaf on it like I've seen in the screenshots at the IntelliJ site.
No autocomplete suggestions are found when I'm editing the configuration files.

I have created the config files by right clicking on a module then selecting New > XML Configuration File > Spring Config

Any idea about what the problem is?

Comment actions Permalink

It sounds like you may not have any Spring filesets defined. You have to define filesets so IDEA knows what spring configuration files go together. This is because a project can be such that you have dozens of files that make up 2 or 3 contexts; not just a single context. You basically define the fileset to match the group of configuration files your application loads together.

Open the project structure, select  to where your spring facet is define. When you click the Spring facet, you should see on the right a place where you can define a fileset. (See screenshot below.) Note that after defining a fileset, you usually have to close the spring configuration file in the editor, and then reopen it so IDEA parses it again, sees it as a spring configuration file, and provides the dependency tab, etc.

If that is not the issue, or does not work, the project's index cache may be corrupt. Go to File > Invalidate Caches. And then restart IDEA.


Comment actions Permalink

Thanks for the speedy reply.

You were right that I didn't have a file set defined. So I created a file set, but the file name showed up in red.
A co-worker and I compared his project setup to mine, and we set mine up just like his, but still the file set file was red.
I suspected that something was wrong with my .IntelliJIdea11 so I removed it and reinstalled IntelliJ (yes the nuclear option), and now all of the Springy-goodness is back.
The next time this happens, I will try the cleansing of the cache.


Please sign in to leave a comment.