File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
idea/idea-android/src/org/jetbrains/kotlin/android/folding Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ import com.intellij.openapi.editor.Document
32
32
import com.intellij.openapi.module.ModuleUtilCore
33
33
import com.intellij.openapi.util.text.StringUtil
34
34
import com.intellij.psi.PsiClass
35
- import com.intellij.psi.PsiClassOwner
36
35
import com.intellij.psi.PsiElement
37
36
import com.intellij.psi.impl.source.SourceTreeToPsiMap
37
+ import org.jetbrains.android.facet.AndroidFacet
38
38
import org.jetbrains.kotlin.psi.KtFile
39
39
import org.jetbrains.uast.*
40
40
import org.jetbrains.uast.visitor.AbstractUastVisitor
@@ -72,7 +72,7 @@ class ResourceFoldingBuilder : FoldingBuilderEx() {
72
72
}
73
73
74
74
override fun buildFoldRegions (root : PsiElement , document : Document , quick : Boolean ): Array <FoldingDescriptor > {
75
- if (root !is KtFile || quick && ! UNIT_TEST_MODE || ! isFoldingEnabled) {
75
+ if (root !is KtFile || quick && ! UNIT_TEST_MODE || ! isFoldingEnabled || AndroidFacet .getInstance(root) == null ) {
76
76
return emptyArray()
77
77
}
78
78
You can’t perform that action at this time.
0 commit comments