[jira] Created: (LANG-378) Add new ToStyle to support MultiLine with Indent

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
Add new ToStyle to support MultiLine with Indent
------------------------------------------------

                 Key: LANG-378
                 URL: https://issues.apache.org/jira/browse/LANG-378
             Project: Commons Lang
          Issue Type: New Feature
    Affects Versions: 2.3
            Reporter: Barrie Treloar
            Priority: Minor
             Fix For: 2.4
         Attachments: MultiLineWithIndentToStyle.zip

Multiline support  place everything on a new line with no indentation to help in readability.

Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barrie Treloar updated LANG-378:
--------------------------------

    Attachment: MultiLineWithIndentToStyle.zip

> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  place everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barrie Treloar updated LANG-378:
--------------------------------

    Attachment:     (was: MultiLineWithIndentToStyle.zip)

> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 2.4
>
>
> Multiline support  place everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barrie Treloar updated LANG-378:
--------------------------------

    Attachment: MultiLineWithIndentToStyle.zip

New attachment fixes some defects:
* Arrays/Collections were causing incorrect indendation for properties after them
* Empty Arrays/Collections are now displayed on the one line.


> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  place everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barrie Treloar updated LANG-378:
--------------------------------

    Description:
Multiline support  places everything on a new line with no indentation to help in readability.

Attached is a patch (with tests) to support Multiline behaviour with indentation.

  was:
Multiline support  place everything on a new line with no indentation to help in readability.

Attached is a patch (with tests) to support Multiline behaviour with indentation.


> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548952 ]

Henri Yandell commented on LANG-378:
------------------------------------

Looking at this - my first thought is that it should mimic the MULTI_LINE_STYLE and be an attribute of ToStringStyle.

Need to remove the annotations as we're not 1.5 specific yet.

Does anyone have any thoughts on this being added?

> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548998 ]

Sebb commented on LANG-378:
---------------------------

Annotations can be commented rather than being removed:
- I think some processors can still handle them as comments.
- easier to reinstate them
- still act as documentation



> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated LANG-378:
-------------------------------

    Fix Version/s:     (was: 2.4)

> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644641#action_12644641 ]

Barrie Treloar commented on LANG-378:
-------------------------------------

If there are annotations they are like @overrides.
This patch does not need them.

{quote}
mimic the MULTI_LINE_STYLE and be an attribute of ToStringStyle.
{quote}
The patch provided just had a working class.
I expect there would be a small amount of work to make it fit into the framework correctly, like providing a static constant in ToStringStyle, etc.

Any chance of some progress?

> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated LANG-378:
-------------------------------

    Fix Version/s: 3.x

Putting in 3.x pending anyone wanting to work on fitting it into the framework properly.

> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891982#action_12891982 ]

Minhaj Mehmood commented on LANG-378:
-------------------------------------

@Henri:
let me know what efforts need to be made in order to incorporate changes into framework properly?

> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.builder.*
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-378) Add new ToStyle to support MultiLine with Indent

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barrie Treloar updated LANG-378:
--------------------------------

    Attachment: LANG-378-patch.txt

Updated code to reflect lang3.

ToStringStyle exposes MULTI_LINE_WITH_INDENT_STYLE constant (the as the other available styles do)

Now created as a patch instead of a project.
Unfortunately the large number of expected output for test files live in the package example.*.
It's not too difficult to move to another location.



> Add new ToStyle to support MultiLine with Indent
> ------------------------------------------------
>
>                 Key: LANG-378
>                 URL: https://issues.apache.org/jira/browse/LANG-378
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.builder.*
>    Affects Versions: 2.3
>            Reporter: Barrie Treloar
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: LANG-378-patch.txt, MultiLineWithIndentToStyle.zip
>
>
> Multiline support  places everything on a new line with no indentation to help in readability.
> Attached is a patch (with tests) to support Multiline behaviour with indentation.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.