mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java, completion] IJPL-207762 MethodCallInstallerHandler is serializable
GitOrigin-RevId: ce77f24156ff15d0ccd09d2336dc7e17235a8b7c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cc9127c001
commit
0cdbe0fd08
@@ -81,6 +81,7 @@
|
||||
|
||||
<completion.frontendFriendlyInsertHandler implementationClass="com.intellij.codeInsight.completion.method.DiamondInsertHandler"/>
|
||||
<completion.frontendFriendlyInsertHandler implementationClass="com.intellij.codeInsight.completion.method.RefStartInsertHandler"/>
|
||||
<completion.frontendFriendlyInsertHandler implementationClass="com.intellij.codeInsight.completion.method.MethodCallInstallerHandler"/>
|
||||
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ object JavaMethodCallInsertHandlerHelper {
|
||||
item.putUserData(refStartKey, refStart)
|
||||
}
|
||||
|
||||
fun installCall(context: InsertionContext, item: LookupElement) {
|
||||
internal fun installCall(context: InsertionContext, item: LookupElement) {
|
||||
val methodCall = findCallAtOffset(context, getReferenceStartOffset(context, item)) ?: return
|
||||
|
||||
// make sure this is the method call we've just added, not the enclosing one
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInsight.completion.method
|
||||
|
||||
import com.intellij.codeInsight.completion.FrontendFriendlyInsertHandler
|
||||
import com.intellij.codeInsight.completion.InsertHandler
|
||||
import com.intellij.codeInsight.completion.InsertionContext
|
||||
import com.intellij.codeInsight.lookup.LookupElement
|
||||
import kotlinx.serialization.Serializable
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
@Serializable
|
||||
class MethodCallInstallerHandler : InsertHandler<LookupElement>, FrontendFriendlyInsertHandler {
|
||||
override fun handleInsert(context: InsertionContext, item: LookupElement) {
|
||||
JavaMethodCallInsertHandlerHelper.installCall(context, item)
|
||||
}
|
||||
}
|
||||
@@ -314,12 +314,6 @@ private class ShowParameterInfoInsertHandler : InsertHandler<JavaMethodCallEleme
|
||||
}
|
||||
}
|
||||
|
||||
private class MethodCallInstallerHandler : InsertHandler<LookupElement> {
|
||||
override fun handleInsert(context: InsertionContext, item: LookupElement) {
|
||||
JavaMethodCallInsertHandlerHelper.installCall(context, item)
|
||||
}
|
||||
}
|
||||
|
||||
private class MethodCallRegistrationHandler : InsertHandler<JavaMethodCallElement> {
|
||||
override fun handleInsert(context: InsertionContext, item: JavaMethodCallElement) {
|
||||
val method = item.getObject()
|
||||
|
||||
Reference in New Issue
Block a user