Remove the usages of some of the deprecated APIs
This commit is contained in:
+7
-21
@@ -1,23 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* Copyright 2000-2018 JetBrains s.r.o. 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.liveTemplates
|
||||
|
||||
import com.intellij.codeInsight.lookup.LookupManager
|
||||
import com.intellij.codeInsight.template.TemplateManager
|
||||
import com.intellij.codeInsight.template.impl.TemplateManagerImpl
|
||||
import com.intellij.codeInsight.template.impl.TemplateState
|
||||
import com.intellij.ide.DataManager
|
||||
@@ -37,12 +25,7 @@ class LiveTemplatesTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
myFixture.testDataPath = File(TEST_DATA_BASE_PATH).path + File.separator
|
||||
(TemplateManager.getInstance(project) as TemplateManagerImpl).setTemplateTesting(true)
|
||||
}
|
||||
|
||||
override fun tearDown() {
|
||||
(TemplateManager.getInstance(project) as TemplateManagerImpl).setTemplateTesting(false)
|
||||
super.tearDown()
|
||||
TemplateManagerImpl.setTemplateTesting(myModule.project, testRootDisposable)
|
||||
}
|
||||
|
||||
fun testSout() {
|
||||
@@ -310,7 +293,10 @@ class LiveTemplatesTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
private fun doAction(actionId: String) {
|
||||
val actionManager = EditorActionManager.getInstance()
|
||||
val actionHandler = actionManager.getActionHandler(actionId)
|
||||
actionHandler.execute(myFixture.editor, DataManager.getInstance().getDataContext(myFixture.editor.component))
|
||||
actionHandler.execute(
|
||||
myFixture.editor, myFixture.editor.caretModel.currentCaret,
|
||||
DataManager.getInstance().getDataContext(myFixture.editor.component)
|
||||
)
|
||||
}
|
||||
|
||||
private fun assertStringItems(@NonNls vararg items: String) {
|
||||
|
||||
Reference in New Issue
Block a user