Reorganize TypeAttributeTranslatorExtension
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
19bfc43bee
commit
374d287d08
@@ -7,6 +7,7 @@ dependencies {
|
||||
api(project(":compiler:util"))
|
||||
api(project(":core:descriptors"))
|
||||
api(project(":compiler:resolution.common"))
|
||||
compileOnly(intellijCore())
|
||||
compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j"))
|
||||
}
|
||||
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2010-2021 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.extensions
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.types.DefaultTypeAttributeTranslator
|
||||
import org.jetbrains.kotlin.types.TypeAttributeTranslator
|
||||
import org.jetbrains.kotlin.types.extensions.TypeAttributeTranslators
|
||||
|
||||
interface TypeAttributeTranslatorExtension : TypeAttributeTranslator {
|
||||
companion object : ProjectExtensionDescriptor<TypeAttributeTranslatorExtension>(
|
||||
"org.jetbrains.kotlin.extensions.typeAttributeTranslatorExtension",
|
||||
TypeAttributeTranslatorExtension::class.java
|
||||
) {
|
||||
val Default = TypeAttributeTranslators(listOf(DefaultTypeAttributeTranslator))
|
||||
|
||||
fun createTranslators(project: Project): TypeAttributeTranslators {
|
||||
return TypeAttributeTranslators(getInstances(project) + DefaultTypeAttributeTranslator)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user