File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
server/src/main/kotlin/org/javacs/kt Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import org.javacs.kt.util.filePath
7
7
import org.javacs.kt.util.describeURI
8
8
import com.intellij.lang.Language
9
9
import com.intellij.psi.PsiFile
10
+ import com.intellij.openapi.fileTypes.FileType
11
+ import com.intellij.openapi.fileTypes.LanguageFileType
10
12
import org.jetbrains.kotlin.container.ComponentProvider
11
13
import org.jetbrains.kotlin.container.getService
12
14
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
@@ -41,7 +43,7 @@ class SourcePath(
41
43
val language : Language ? = null ,
42
44
val isTemporary : Boolean = false // A temporary source file will not be returned by .all()
43
45
) {
44
- val extension: String? = uri.fileExtension ? : language?.associatedFileType?.defaultExtension
46
+ val extension: String? = uri.fileExtension ? : " kt " // TODO: Use language?.associatedFileType?.defaultExtension again
45
47
val isScript: Boolean = extension == " kts"
46
48
val kind: CompilationKind =
47
49
if (path?.fileName?.toString()?.endsWith(" .gradle.kts" ) ? : false ) CompilationKind .BUILD_SCRIPT
You can’t perform that action at this time.
0 commit comments