Content Assist not working in applicationContext.xml with Java Project with 'Spring Project Nature' in eclipse

skip picture skip · Mar 27, 2011 · Viewed 9.7k times · Source

I have a simple Java project using Spring 3 and Hibernate 3.

I've added the "Spring Project Nature" using Spring IDE. The applicationContext.xml file is in the src folder of the project.

The Content Assist feature of Eclipse 3.5 doesn't seem to work in applicationContext.xml:

  • Inside the class attribute of bean tag it can't seem to find the packages and classes in my Java Project.
  • It can't assist with any attribute, like finding existing beans in applicationContext.xml for the ref attribute.

Answer

lschin picture lschin · Mar 28, 2011
  1. Project Properties > Spring > Bean Support > Config Sets > Add New Group (contains all configuration files). Then open applicationContext.xml again.
  2. If content assist does not work, try opening the related file with Spring Config Editor.
  3. If Project Properties > Spring in step 1 doesn't exist, install:

    • SpringSource Tool Suite: Core/STS > SpringSource Tool Suite (required)
    • Additional extensions if needed, e.g. AOP, Autowire, Security.