facebook

Add options for Java stream only formatting

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #614712 Reply

    SchmitzRzConsult
    Participant

    Hi MyEclipse team!

    When using streams we may result in a long chain of method calls. Like this:

    list.stream().a().b().c().d();

    We know that Eclipse Java code formatter indention options can be set to achieve a format like this:

    list
        .stream()
        .a()
        .b()
        .c()
        .d();

    The downside is that every other chained method call will also be formatted this way like this:

    object.m1().m2().m3();

    Will become:

    object
        .m1()
        .m2()
        .m3();

    What we really would like are settings to control the indention explicitly for streams:

      Make it possible to indent streams only and keep “non stream” method chaines untouched.
      Make it possible to indent streams only after a specified line length – no like breaks for short stream chaines.

    What we do not want to use:

      //@formatter:off

    Regards
    Stefan

    #614721 Reply

    support-swapna
    Moderator

    Stefan,

    Thank you for your recommendations for formatting. I have filed an enhancement request for the dev team to work on it.
    We will keep you posted when we add this feature.

    –Swapna
    Genuitec Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Add options for Java stream only formatting

You must be logged in to post in the forum log in