From 54b1c512c520068fcb755fb7ab35f78e464f17b1 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Tue, 28 Jan 2020 21:55:14 +0300 Subject: [PATCH] 201: LookupImpl.focusedDegree renamed --- .../test/handlers/CompletionHandlerTestBase.kt | 2 +- .../kotlin/idea/completion/test/handlers/compat.kt | 13 +++++++++++++ .../idea/completion/test/handlers/compat.kt.201 | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt create mode 100644 idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt.201 diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionHandlerTestBase.kt b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionHandlerTestBase.kt index 936c7a14c6b..9945894273d 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionHandlerTestBase.kt +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionHandlerTestBase.kt @@ -136,7 +136,7 @@ abstract class CompletionHandlerTestBase : KotlinLightCodeInsightFixtureTestCase if (lookup.currentItem != item) { // do not touch selection if not changed - important for char filter tests lookup.currentItem = item } - lookup.focusDegree = LookupImpl.FocusDegree.FOCUSED + lookup.setFocusedFocusDegree() if (LookupEvent.isSpecialCompletionChar(completionChar)) { lookup.finishLookup(completionChar) } else { diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt new file mode 100644 index 00000000000..3189682bf1d --- /dev/null +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.completion.test.handlers + +import com.intellij.codeInsight.lookup.impl.LookupImpl + +// BUNCH: 193 +fun LookupImpl.setFocusedFocusDegree() { + focusDegree = LookupImpl.FocusDegree.FOCUSED +} \ No newline at end of file diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt.201 b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt.201 new file mode 100644 index 00000000000..c9aea01d765 --- /dev/null +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/compat.kt.201 @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.completion.test.handlers + +import com.intellij.codeInsight.lookup.LookupFocusDegree +import com.intellij.codeInsight.lookup.impl.LookupImpl + +// BUNCH: 193 +fun LookupImpl.setFocusedFocusDegree() { + this.lookupFocusDegree = LookupFocusDegree.FOCUSED +} \ No newline at end of file