Add klib extension to ARCHIVE fileType

Fixed to #KT-38767
Relates to #KT-38571
This commit is contained in:
Vladimir Dolzhenko
2020-05-20 13:24:11 +00:00
parent fceaf65729
commit 2d0445ebaa
5 changed files with 3 additions and 61 deletions
@@ -1,15 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* 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
import com.intellij.ide.highlighter.ArchiveFileType
object KLibFileType : ArchiveFileType() {
override fun getName(): String = "KLib"
override fun getDefaultExtension(): String = "klib"
}
@@ -1,19 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* 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.core
import com.intellij.ide.highlighter.ArchiveFileType
import com.intellij.openapi.fileTypes.FileTypeConsumer
import com.intellij.openapi.fileTypes.FileTypeFactory
import org.jetbrains.kotlin.library.KLIB_FILE_EXTENSION
// BUNCH: 193+
// temporary enabled due to KT-38767
class KLibFileTypeFactory : FileTypeFactory() {
override fun createFileTypes(consumer: FileTypeConsumer) {
consumer.consume(ArchiveFileType.INSTANCE, KLIB_FILE_EXTENSION)
}
}
+1 -9
View File
@@ -126,15 +126,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
fieldName="INSTANCE"
language="kotlin"
extensions="kt;kts"/>
<!-- temporary disabled due to KT-38767
<fileType name="KLib"
implementationClass="org.jetbrains.kotlin.idea.KLibFileType"
fieldName="INSTANCE"
extensions="klib"/>
-->
<fileTypeFactory implementation="org.jetbrains.kotlin.idea.core.KLibFileTypeFactory"/>
<fileType name="ARCHIVE" extensions="klib"/>
<fileType name="KNM"
implementationClass="org.jetbrains.kotlin.idea.klib.KlibMetaFileType"
fieldName="INSTANCE"
+1 -9
View File
@@ -126,15 +126,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
fieldName="INSTANCE"
language="kotlin"
extensions="kt;kts"/>
<!-- temporary disabled due to KT-38767
<fileType name="KLib"
implementationClass="org.jetbrains.kotlin.idea.KLibFileType"
fieldName="INSTANCE"
extensions="klib"/>
-->
<fileTypeFactory implementation="org.jetbrains.kotlin.idea.core.KLibFileTypeFactory"/>
<fileType name="ARCHIVE" extensions="klib"/>
<fileType name="KNM"
implementationClass="org.jetbrains.kotlin.idea.klib.KlibMetaFileType"
fieldName="INSTANCE"
+1 -9
View File
@@ -106,15 +106,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
fieldName="INSTANCE"
language="kotlin"
extensions="kt;kts"/>
<!-- temporary disabled due to KT-38767
<fileType name="KLib"
implementationClass="org.jetbrains.kotlin.idea.KLibFileType"
fieldName="INSTANCE"
extensions="klib"/>
-->
<fileTypeFactory implementation="org.jetbrains.kotlin.idea.core.KLibFileTypeFactory"/>
<fileType name="ARCHIVE" extensions="klib"/>
<fileType name="KNM"
implementationClass="org.jetbrains.kotlin.idea.klib.KlibMetaFileType"
fieldName="INSTANCE"