From my observation there are a couple features in Spring IDE that are being used very rarely, although I personally think that every one of them can become quite handy. I think that is because we haven’t promoted them and therefore most people don’t even know that they exist. This post is to introduce one very hidden feature.
Spring IDE installs a custom template category to the Spring Beans XML Editor. Out of the box Spring IDE adds a couple of common code snippet templates for inserting <bean />, <property /> and <constructor-args /> elements into Bean definition files. This snippets are available from the content assist proposals in the Beans XML Editor.
If you look around in Eclipse’ Preferences (Web and XML -> XML Files) you can find the Spring Beans XML Templates preference page. On that page you can modify and delete existing XML templates as well as create your own.
As you can see on the following screen shot, Spring IDE’s Web Flow support already installs templates for inserting <flow:executor /> and <flow:registry /> elements.
Anybody out there using this? Do you want us to include some more pre-definied templates? Which?


0 Responses to “Adding Code Snippets in XML Editor”