编译IntelliJBehave时找不到Kotlin类

时间:2016-11-25 22:01:09

标签: intellij-idea kotlin intellij-plugin

我正在尝试编译IntelliJBehave以添加对scala的支持。当我编译时,我得到以下错误:

/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiAnnotation.kt
Error:(5, 22) Kotlin: Unresolved reference: kotlin
Error:(12, 21) Kotlin: Unresolved reference: JetElement
/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiElement.kt
Error:(6, 22) Kotlin: Unresolved reference: kotlin
Error:(13, 33) Kotlin: Unresolved reference: JetElement
Error:(22, 34) Kotlin: Unresolved reference: JetElement
/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiMethod.kt
Error:(5, 22) Kotlin: Unresolved reference: kotlin
Error:(12, 21) Kotlin: Unresolved reference: JetElement
/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinAnnotationsLoader.kt
Error:(8, 22) Kotlin: Unresolved reference: kotlin
Error:(9, 22) Kotlin: Unresolved reference: kotlin
Error:(10, 22) Kotlin: Unresolved reference: kotlin
Error:(29, 13) Kotlin: Unresolved reference: JetAnnotationsIndex
Error:(30, 35) Kotlin: Cannot infer a type for this parameter. Please specify it explicitly.
Error:(32, 73) Kotlin: Unresolved reference: JetFunction
Error:(34, 49) Kotlin: Unresolved reference: LightClassUtil
/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt
Error:(4, 22) Kotlin: Unresolved reference: kotlin
Error:(5, 22) Kotlin: Unresolved reference: kotlin
Error:(6, 22) Kotlin: Unresolved reference: kotlin
Error:(21, 58) Kotlin: Unresolved reference: JetFile
Error:(22, 17) Kotlin: Unresolved reference: declarations
Error:(23, 24) Kotlin: Unresolved reference: LightClassUtil
Error:(23, 51) Kotlin: Unresolved reference: it
Error:(23, 58) Kotlin: Unresolved reference: JetClass

我意识到Kotlin编译器找不到JetElement,JetAnnotationsIndex,LightClassUtil和JetClass类。有人可以告诉我在哪里可以找到定义这些类的库吗?

1 个答案:

答案 0 :(得分:0)

该插件是针对旧版Kotlin插件编译的。要编译插件,您需要将Kotlin插件添加到IntelliJ IDEA SDK的类路径中,并更新IntelliJBehave的代码,以便它根据当前名称(KtElement,KtAnnotationsIndex等)引用Kotlin类。