This is a migrated thread and some comments may be shown as answers.

Indentation of multi-line statements

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Patrick Barranis
Top achievements
Rank 1
Patrick Barranis asked on 24 Jun 2013, 01:58 AM
I would like JustCode to format my multi-line statements like so:

List<InventoryHistory> inspectionInventoryHistories = _context.GetAllInventoryHistories(_activity.Id)
    .OrderByDescending(ih => ih.Inventory.Type.SortOrder)
    .ThenBy(ih => ih.Inventory.Type.Value)
    .ToList();


But instead it is formatting it like this:

List<InventoryHistory> inspectionInventoryHistories = _context.GetAllInventoryHistories(_activity.Id)
                                       .OrderByDescending(ih => ih.Inventory.Type.SortOrder)
                                       .ThenBy(ih => ih.Inventory.Type.Value)
                                       .ToList();

Which settings, exactly, do I set to make it do this?

1 Answer, 1 is accepted

Sort by
0
Borislav
Telerik team
answered on 24 Jun 2013, 12:58 PM
Hello Patrick,

You can customize how those chained method invocations are formatted from here:
JustCode menu -> Options -> Code Style -> C# -> Wrapping -> Chained Method Invocations section.
Try playing with those settings and see how your code is going to be formatted in the preview box at the bottom of the page.

You can change the indentation to the one you want just by changing the value of "Indent" combo-box from "Indent at column" to "Indent".

Please contact us if you have any other questions or suggestions.

Regards,
Borislav
Telerik
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Tags
General Discussions
Asked by
Patrick Barranis
Top achievements
Rank 1
Answers by
Borislav
Telerik team
Share this question
or