Refactoring NoArg compiler plugin
Remove NoArgClassKey relation betwen AbstractNoArgDeclarationChecker and NoArgExpressionCodegenExtension Separate NoArgExpressionCodegenExtension to Ide and Cli versions
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2019 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.noarg.ide
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.annotation.plugin.ide.CachedAnnotationNames
|
||||
import org.jetbrains.kotlin.annotation.plugin.ide.getAnnotationNames
|
||||
import org.jetbrains.kotlin.noarg.AbstractNoArgExpressionCodegenExtension
|
||||
import org.jetbrains.kotlin.psi.KtModifierListOwner
|
||||
|
||||
class IdeNoArgExpressionCodegenExtension(project: Project) :
|
||||
AbstractNoArgExpressionCodegenExtension(invokeInitializers = false) {
|
||||
|
||||
private val cachedAnnotationsNames = CachedAnnotationNames(project, NO_ARG_ANNOTATION_OPTION_PREFIX)
|
||||
|
||||
override fun getAnnotationFqNames(modifierListOwner: KtModifierListOwner?): List<String> =
|
||||
cachedAnnotationsNames.getAnnotationNames(modifierListOwner)
|
||||
}
|
||||
Reference in New Issue
Block a user