W
W
wellusion2017-10-04 21:02:17
Java
wellusion, 2017-10-04 21:02:17

How to align missing camel routes on Java DSL in intellij-idea?

When aligning code with camel routes, intellij idea does 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();

Are there any plugins or something else to make the code look like this after alignment:
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();

?
There is a plugin for the apache camel idea, but there is no such functionality. I saw another similar question on ru.stackoverflow, but there it remained unanswered.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aol-nnov, 2017-10-04
@aol-nnov

Once , and format as you like. No one else will touch your perfectionism! ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question