0

I work on a large Spring/Struts project in Eclipse. One thing I have to do frequently is dig through the spring.xml file so that I can update the definition for the class that I am working on. It seems like there should be an easy 2 or 3 click way to go from the Java class I am in to the Spring definition.

I have SpringSource installed, but this doesn't seem to offer anything that's actually useful to me. Does anyone know if this is possible in Eclipse and how to do it?

Bonus Question: is it possible to jump from a Struts Action class to it's corresponding struts.xml definition in Eclipse?

Cory Gagliardi
  • 750
  • 1
  • 8
  • 13

1 Answers1

2

in your eclipse project, just add the spring nature. Right click the project and select the Spring Tools option -> Add Spring Nature. This will ensure eclipse keeps your java classes and spring context in synch.

emeraldjava
  • 10,289
  • 22
  • 91
  • 158
  • I clicked that, but I don't really see what that changed. – Cory Gagliardi Jun 10 '11 at 17:11
  • this might give you some extra info on the spring nature. you'll should open the spring perspective and spring explorer view. http://javaprogrammingtips4u.blogspot.com/2010/03/spring-explorer-view-in-eclipse-35.html – emeraldjava Jun 10 '11 at 17:18
  • once the spring nature is added to the project, you can then select the Spring option under project settings and register the specific context files you are using. this should allow you to switch between the bean and class – emeraldjava Jun 10 '11 at 17:21