Tuesday, August 26, 2008

Eclipse Templates for Apache Camel

If you didn't know already, Eclipse allows you to define custom templates for commonly used code snippets. Its a very neat feature for those of us who are memory challenged or don't like typing things twice!

I think that Apache Camel users could really benefit from having predefined templates for doing Camel routing. I also hear a lot of requests like "I have this Java DSL route, how do I do this in the Spring XML DSL?" so having both Java and XML templates for the same thing is essential.

You can find the templates I did up here & here. To import these browse to the template screens defined at:

Window -> Preferences -> Java -> Editor -> Templates
and
Window -> Preferences -> Web and XML -> XML Files -> Templates.

Once imported, you can type Ctrl + Space and then type 'camel' to search for the camel templates. You should see something like this in the Java and XML editors:


When you select, say a Content Based Router, you'll get a route something like this in the Java and XML editors:



The formatting was a bit wonky for these Eclipse templates so you might want to pretty up your routes before showing anyone else :)

Let me know what you think!

13 comments:

Jamie G. said...

Sweet!!

domix said...

Very nice, great work
Cheers

Improvedliving said...

very nice and awesome work. I love it.




Landing Page Templates

Ben said...

Great article!
Custom web design

pvmanjeshwar said...

Very useful indeed...Thank you !

Bruce said...

I was looking for it since last long time.

Thanks :)
Rich Internet Applications

araon said...

Very nice blog... web development

Sheldon said...

I have been looking for it, because too long time.
Thesis | Dissertation | Essay | Assignment

Narayan Gopal said...

Great tutorial very easy to understand, web design company Thanks For Sharing.

Sheldon said...

Very good, terrific job. I like it. SEO Services Herbal Products Home Decor Accessories Spy watch Camera Works of Art

kalyan said...

excellent..pandaga!!

Logo said...

Amazing,
Website design
Logo design

Ankine said...

this is really good and interesting as well as informative.

custom papers