title: Eclipse: open declaration/resource for spring beans and contexts
body: <p>While watching one of my colleagues work in IntelliJ, I was jealous to note that he could Ctrl/Command+Click on the name of a spring bean, context, or resource in either a Java annotation or a Spring context file and IntelliJ would open the backing declaration or file.</p>
  
  <p>I've installed the STS suite of plugins for Eclipse, but this has only given me the ability to open declarations for beans referred to in a spring context file. E.g., command+click only works in my context file for: <code>&lt;bean ... ref="bean-name"/&gt;</code>.</p>
  
  <p>Specifically, things I can't open the declaration/resource for automatically are:</p>
  
  <ul>
  <li>In my context file: <code>&lt;import resource="classpath:config/anotherContext.xml"/&gt;</code>, I cannot open the resource anotherContext.xml. The open resource dialogue helps, but doesn't tell me which one my classpath is actually giving me.</li>
  <li>In my Java file: <code>@ContextConfiguration({"classpath:/config/yetAnotherContext.xml"})</code>, I cannot automatically open the resource of yetAnotherContext.xml.</li>
  <li>In my Java file: <code>@Resource(name = "another-bean-name")</code>, I cannot open the bean declaration. This one is especially difficult to discover in Eclipse, I haven't figured out an easy way to discover the bean declaration short of full search.</li>
  </ul>
  
  <p>Surely there's a way in Eclipse to automatically discover declarations or resources for spring beans and contexts as they are used in both Java annotations and context files?</p>