From 7bae32b0ea7ff0a53277e165e271be5ae22e73d3 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Fri, 13 Feb 2026 17:35:36 +0100 Subject: [PATCH] IJPL-207762 shuffle fields in RpcCompletionItem GitOrigin-RevId: 0bf755a60c940ed981ed99fa8a2b0426748e6c11 --- .../common/src/protocol/RpcCompletionItem.kt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/platform/completion/common/src/protocol/RpcCompletionItem.kt b/platform/completion/common/src/protocol/RpcCompletionItem.kt index 64b890d010cf..9f24110fe5dd 100644 --- a/platform/completion/common/src/protocol/RpcCompletionItem.kt +++ b/platform/completion/common/src/protocol/RpcCompletionItem.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.platform.completion.common.protocol import com.intellij.codeInsight.completion.CodeCompletionHandlerBase @@ -11,32 +11,34 @@ import kotlinx.serialization.Serializable @Serializable data class RpcCompletionItem( + val id: RpcCompletionItemId, + val prefixMatcher: RpcPrefixMatcher, + val insertHandler: RpcInsertHandler = RpcInsertHandler.Backend, val lookupString: String, val allLookupStrings: Set? = null, // null means setOf(lookupString) val presentation: RpcCompletionItemPresentation, - val id: RpcCompletionItemId, val hasExpensiveRenderer: Boolean = false, - val insertHandler: RpcInsertHandler = RpcInsertHandler.Backend, val requiresCommittedDocuments: Boolean = true, val autoCompletionPolicy: AutoCompletionPolicy = AutoCompletionPolicy.SETTINGS_DEPENDENT, val isCaseSensitive: Boolean = true, val shouldStopLookupInsertion: Boolean = false, val isDirectInsertion: Boolean = false, - val prefixMatcher: RpcPrefixMatcher, val isWorthShowingInAutoPopup: Boolean = false, ) { override fun toString(): String = buildToString("RpcCompletionItem") { + field("id", id) + field("prefixMatcher", prefixMatcher) + fieldWithDefault("insertHandler", insertHandler, RpcInsertHandler.Backend) field("lookupString", lookupString) fieldWithNullDefault("allLookupStrings", allLookupStrings) field("presentation", presentation) - field("id", id) - fieldWithDefault("insertHandler", insertHandler, RpcInsertHandler.Backend) + fieldWithDefault("hasExpensiveRenderer", hasExpensiveRenderer, false) fieldWithDefault("requiresCommittedDocuments", requiresCommittedDocuments, true) fieldWithDefault("autoCompletionPolicy", autoCompletionPolicy, AutoCompletionPolicy.SETTINGS_DEPENDENT) fieldWithDefault("isCaseSensitive", isCaseSensitive, true) fieldWithDefault("shouldStopLookupInsertion", shouldStopLookupInsertion, false) fieldWithDefault("isDirectInsertion", isDirectInsertion, false) - field("prefixMatcher", prefixMatcher) + fieldWithDefault("isWorthShowingInAutoPopup", isWorthShowingInAutoPopup, false) } }