mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] KTIJ-36850 Extract GREEN_BACKGROUND constant to avoid dependency on K1-specific KotlinFunctionParameterInfoHandler
GitOrigin-RevId: 7a2b3faf97dbb20baf86a0ce737cc39b6b46accd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
648bda3580
commit
937f31b4fe
+6
@@ -1,14 +1,20 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.codeinsights.impl.base.parameterInfo
|
||||
|
||||
import com.intellij.ui.Gray
|
||||
import com.intellij.ui.JBColor
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.kotlin.idea.codeInsight.ellipsis
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import java.awt.Color
|
||||
|
||||
|
||||
@ApiStatus.Internal
|
||||
object KotlinParameterInfoBase {
|
||||
@JvmField
|
||||
val GREEN_BACKGROUND: Color = JBColor(Color(231, 254, 234), Gray._100)
|
||||
|
||||
data class ExpressionValue(val text: String, val isConstValue: Boolean)
|
||||
|
||||
fun getDefaultValueStringRepresentation(defaultValue: KtExpression): ExpressionValue {
|
||||
|
||||
+1
-4
@@ -9,8 +9,6 @@ import com.intellij.lang.parameterInfo.UpdateParameterInfoContext
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.util.PsiTreeUtil
|
||||
import com.intellij.ui.Gray
|
||||
import com.intellij.ui.JBColor
|
||||
import org.jetbrains.kotlin.analysis.api.KaExperimentalApi
|
||||
import org.jetbrains.kotlin.analysis.api.KaSession
|
||||
import org.jetbrains.kotlin.analysis.api.analyze
|
||||
@@ -89,8 +87,7 @@ abstract class KotlinHighLevelParameterInfoWithCallHandlerBase<TArgumentList : K
|
||||
) : ParameterInfoHandlerWithTabActionSupport<TArgumentList, KotlinHighLevelParameterInfoWithCallHandlerBase.CandidateInfo, TArgument> {
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
val GREEN_BACKGROUND: Color = JBColor(Color(231, 254, 234), Gray._100)
|
||||
val GREEN_BACKGROUND: Color = KotlinParameterInfoBase.GREEN_BACKGROUND
|
||||
|
||||
val STOP_SEARCH_CLASSES: Set<Class<out KtElement>> = setOf(
|
||||
KtNamedFunction::class.java,
|
||||
|
||||
+1
-4
@@ -12,8 +12,6 @@ import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.psi.impl.source.tree.LeafPsiElement
|
||||
import com.intellij.psi.util.PsiTreeUtil
|
||||
import com.intellij.ui.Gray
|
||||
import com.intellij.ui.JBColor
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
@@ -98,8 +96,7 @@ abstract class KotlinParameterInfoWithCallHandlerBase<TArgumentList : KtElement,
|
||||
) : ParameterInfoHandlerWithTabActionSupport<TArgumentList, KotlinParameterInfoWithCallHandlerBase.CallInfo, TArgument> {
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
val GREEN_BACKGROUND: Color = JBColor(Color(231, 254, 234), Gray._100)
|
||||
val GREEN_BACKGROUND: Color = KotlinParameterInfoBase.GREEN_BACKGROUND
|
||||
|
||||
val STOP_SEARCH_CLASSES: Set<Class<out KtElement>> = setOf(
|
||||
KtNamedFunction::class.java,
|
||||
|
||||
@@ -74,6 +74,7 @@ jvm_library(
|
||||
"//java/idea-ui:ui",
|
||||
"@lib//:jet_check",
|
||||
"//platform/structure-view-impl:structureView-impl",
|
||||
"//plugins/kotlin/code-insight/impl-base:kotlin-codeInsight-shared",
|
||||
]
|
||||
)
|
||||
### auto-generated section `build intellij.kotlin.base.test` end
|
||||
|
||||
@@ -63,5 +63,6 @@
|
||||
<orderEntry type="module" module-name="intellij.java.ui" scope="TEST" />
|
||||
<orderEntry type="library" name="jetCheck" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.structureView.impl" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.kotlin.codeInsight.shared" scope="TEST" />
|
||||
</component>
|
||||
</module>
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.parameterInfo;
|
||||
|
||||
import com.intellij.lang.parameterInfo.ParameterInfoUIContext;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.jetbrains.kotlin.idea.codeinsights.impl.base.parameterInfo.KotlinParameterInfoBase;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
@@ -52,7 +53,7 @@ public class MockParameterInfoUIContext implements ParameterInfoUIContext {
|
||||
String resultText = "Text: (" + taggedText + "), " +
|
||||
"Disabled: " + isDisabled + ", " +
|
||||
"Strikeout: " + strikeout + ", " +
|
||||
"Green: " + KotlinParameterInfoWithCallHandlerBase.GREEN_BACKGROUND.equals(background);
|
||||
"Green: " + KotlinParameterInfoBase.GREEN_BACKGROUND.equals(background);
|
||||
|
||||
result.add(resultText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user