https://kotlinlang.org logo
Title
v

vlastachu

09/20/2017, 4:33 PM
Hi all. is it possible in android studio to align constructor assignment?
CPTViewModel(
        selectionType = null,
        taskName = task.displayName,
        projectName = projectInfo.project.name,
        customerName = projectInfo.customer.name,
        isTaskVisible = true
)
to
CPTViewModel(
        selectionType = null,
        taskName      = task.displayName,
        projectName   = projectInfo.project.name,
        customerName  = projectInfo.customer.name,
        isTaskVisible = true
)
:rage1: 1
:no_red: 4
y

yole

09/20/2017, 4:35 PM
no, there is no such feature. we find that any kind of vertical alignment is very difficult to preserve when source code changes
v

vlastachu

09/20/2017, 4:38 PM
but there is align for
when
expression...
b

bdawg.io

09/20/2017, 5:46 PM
IMO, I would HATE having anything like that align that would cause excessive source code churn just because
selectionType
got changed to
selectionTypes
. But FWIW, I also dislike the double indent when wrapping if conditions and function parameters