mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Retype: better results presentation, fixed a couple more desync cases, add failing test
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class Braces {
|
||||
void bar() {
|
||||
|
||||
}
|
||||
|
||||
void baz() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class Import {
|
||||
public void foo() {
|
||||
Arrays.asList();
|
||||
}
|
||||
|
||||
private static class Arrays {
|
||||
public static void asList() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// 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 file.
|
||||
package com.intellij.internal.retype
|
||||
|
||||
import com.intellij.JavaTestUtil
|
||||
import com.intellij.ide.IdeEventQueue
|
||||
import com.intellij.openapi.editor.impl.EditorImpl
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
abstract class JavaRetypeTest : LightCodeInsightFixtureTestCase() {
|
||||
override fun getBasePath(): String = JavaTestUtil.getRelativeJavaTestDataPath()
|
||||
|
||||
fun _testBraces() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
fun _testImport() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
private fun doTest() {
|
||||
val filePath = "/retype/${getTestName(false)}.java"
|
||||
myFixture.configureByFile(filePath)
|
||||
RetypeSession(project, myFixture.editor as EditorImpl, 0, 0).start()
|
||||
while (editor.getUserData(RETYPE_SESSION_KEY) != null) {
|
||||
IdeEventQueue.getInstance().flushQueue()
|
||||
}
|
||||
myFixture.checkResultByFile(filePath)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user