facebook

Formatting of multi-line text and other expressions

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

    vgriffin
    Member

    I really like the feature that lets me break a text string across lines by hitting return inside the string. I like the fact that the + char is left at the end of the first line like:

    str = “This was a single line ” +
    “of text before I broke it”;

    But when I use the source formatting feature, it moves all operators to the start of the next line! I HATE that behavior and can’t figure out how to change it.

    It leaves the above example looking like:

    str = “This was a single line ”
    + “of text before I broke it”;

    I considered putting this request under new features, but consider it a bug that the IDE reformats its own nicely-formatted changes. Because I know some people prefer the operator to start the next line, that positioning should be an option and should also be used when text is split. Sometimes I choose where to split a long expression and I want to keep the breaks. I would like the formatter to recombine lines in an expression only as an option.

    I’m using 5.5M1 but have noticed that behavior in previous releases.

    #268309 Reply

    Riyad Kalla
    Member

    You were right the first time, it’s a feature request to the Java source formatter (requesting that instead of it’s current behavior, we add a new type of behavior, not change the existing one).

    #268404 Reply

    vgriffin
    Member

    The inconsistent behavior of the IDE’s built-in formatting, which cannot be changed, makes it a bug.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Formatting of multi-line text and other expressions

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