Intellij scala refactor > change signature does not chop down method calls after refactor

已回答

I have my intellij settings configured to chop down a method call if it is too long. See the attached screen shot

However when I perform a refactor of a method by

 Right clicking on a method > Refactor > Change Signature 

When the refactor is executed it always places the new method call on a single line. For example, I did so with the following definition

def addReference(
ctx: ClusterContext,
authzContext: AuthorizationContext,
refHolderId: String,
referenceClass: ReferenceClass,
ownerId: String,
primaryClusterUuid: String,
predicateOpt: Option[(T) => Boolean] = None
): Unit = {

Selecting to remove the argument  ctx: ClusterContext, and the result from git is as follows

-    SnapshotReferenceManager.addReference(
- ctx = ctx,
- authzContext = omnipotentAuthorizationContext,
- refHolderId = jobConfig.snapshotId,
- referenceClass = ReferenceClass.JobInstanceRefs,
- ownerId = jobInstance.id,
- primaryClusterUuid = ctx.localClusterId)
+ SnapshotReferenceManager.addReference(authzContext = omnipotentAuthorizationContext, refHolderId = jobConfig.snapshotId, referenceClass = ReferenceClass.JobInstanceRefs, ownerId = jobInstance.id, primaryClusterUuid = ctx.localClusterId)

How can I get the refactored code to cut down as the existing code is formatted? In this scenario I essentially just want to delete the line ctx = ctx.

0

请先登录再写评论。