Intellij Idea formats code in camel routs like this:
from("direct:loop")
.log("Loop: ${header[loopCount]}")
.choice()
.when(simple("header[loopCount] < 10"))
.process(exchange -> {
Message in = exchange.getIn();
in.setHeader("loopCount", in.getHeader("loopCount", Integer.class) + 1);
})
.to("direct:loop")
.otherwise()
.log("Exiting loop")
.end();
Is there any plugins or other ways to do like this:
from("direct:loop")
.log("Loop: ${header[loopCount]}")
.choice()
.when(simple("header[loopCount] < 10"))
.process(exchange -> {
Message in = exchange.getIn();
in.setHeader("loopCount", in.getHeader("loopCount", Integer.class) + 1);
})
.to("direct:loop")
.otherwise()
.log("Exiting loop")
.end();
?