4

I'm working with Eclipse/STS and editing spring bean definition XMLs with the "Source" editor, as I dislike the GUI editors. I'm missing these features:

  • mark occurrences - highlight all occurrences of the word I'm standing on (the same as in the java editor)
  • Jump to bean (with F3 or ctrl-click), if its defined in another spring XML file

Am I missing a plugin? Should I work with the GUI editors?

Thanks, Ido

1 Answer 1

1

Jump to bean with F3 should work, given the project is configured properly. That is:

  • the project holding the Context XML definitions needs the "spring project nature"
  • all the XML config files need to be announced for STS: in the project properties, use the "Spring" tab and from there "beans support" and add all config files. (This results in entries in your /.settings/.springBeans, which can be shared via SCM with the other team members)
  • all prerequisite projects providing Java classes for those beans need to be declared as project dependencies, in case you're working with a multi module project.

Besides that, the "Spring Beans references search" is quite helpful: Place the cursor on a bean name and hit CTRL-SHIFT-g to get an outline of all references to this bean name (including the Java class and the bean definition in XML)

1
  • thanks Ichthyo, however jumping between beans from different xml definition files doesn't work for me on juno with the STS plugin, when I import "classpath:myfile". It only works when the import is without the classpath prefix. accepting anyway...
    – ihadanny
    Nov 16, 2012 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.