Move: Fix tests in IDEA 2017.1
Do not prevent usages search if target directory is not known yet. Force content root configuration for multi-module tests
This commit is contained in:
committed by
Dmitry Jemerov
parent
496a21254b
commit
b65460c12f
+3
-1
@@ -42,7 +42,9 @@ abstract class KotlinMultiFileTestCase : MultiFileTestCase() {
|
|||||||
object : VirtualFileVisitor<Any>() {
|
object : VirtualFileVisitor<Any>() {
|
||||||
override fun visitFile(file: VirtualFile): Boolean {
|
override fun visitFile(file: VirtualFile): Boolean {
|
||||||
if (!file.isDirectory && file.name.endsWith(ModuleFileType.DOT_DEFAULT_EXTENSION)) {
|
if (!file.isDirectory && file.name.endsWith(ModuleFileType.DOT_DEFAULT_EXTENSION)) {
|
||||||
createModule(File(file.path), StdModuleTypes.JAVA)
|
val module = createModule(File(file.path), StdModuleTypes.JAVA)
|
||||||
|
val contentRoot = file.parent.findChild("src")!!
|
||||||
|
PsiTestUtil.addSourceContentToRoots(module, contentRoot)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -69,7 +69,6 @@ class MoveKotlinFileHandler : MoveFileHandler() {
|
|||||||
|
|
||||||
fun initMoveProcessor(psiFile: PsiFile, newParent: PsiDirectory?): MoveKotlinDeclarationsProcessor? {
|
fun initMoveProcessor(psiFile: PsiFile, newParent: PsiDirectory?): MoveKotlinDeclarationsProcessor? {
|
||||||
if (psiFile !is KtFile) return null
|
if (psiFile !is KtFile) return null
|
||||||
if (newParent == null) return null
|
|
||||||
val packageNameInfo = psiFile.getPackageNameInfo(newParent, false) ?: return null
|
val packageNameInfo = psiFile.getPackageNameInfo(newParent, false) ?: return null
|
||||||
|
|
||||||
val project = psiFile.project
|
val project = psiFile.project
|
||||||
|
|||||||
Reference in New Issue
Block a user