Add module name to HEADER_WITHOUT_IMPLEMENTATION message
This commit is contained in:
@@ -128,6 +128,7 @@ interface ModuleInfo {
|
|||||||
val isLibrary: Boolean
|
val isLibrary: Boolean
|
||||||
get() = false
|
get() = false
|
||||||
val name: Name
|
val name: Name
|
||||||
|
val displayedName: String get() = name.asString()
|
||||||
fun dependencies(): List<ModuleInfo>
|
fun dependencies(): List<ModuleInfo>
|
||||||
val platform: TargetPlatform? get() = null
|
val platform: TargetPlatform? get() = null
|
||||||
fun modulesWhoseInternalsAreVisible(): Collection<ModuleInfo> = listOf()
|
fun modulesWhoseInternalsAreVisible(): Collection<ModuleInfo> = listOf()
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.google.common.collect.Sets
|
|||||||
import com.intellij.openapi.diagnostic.Logger
|
import com.intellij.openapi.diagnostic.Logger
|
||||||
import com.intellij.openapi.util.text.StringUtil
|
import com.intellij.openapi.util.text.StringUtil
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
|
import org.jetbrains.kotlin.analyzer.ModuleInfo
|
||||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||||
import org.jetbrains.kotlin.cfg.WhenMissingCase
|
import org.jetbrains.kotlin.cfg.WhenMissingCase
|
||||||
import org.jetbrains.kotlin.cfg.hasUnknown
|
import org.jetbrains.kotlin.cfg.hasUnknown
|
||||||
@@ -77,7 +78,7 @@ object Renderers {
|
|||||||
|
|
||||||
@JvmField val PLATFORM = Renderer<ModuleDescriptor> {
|
@JvmField val PLATFORM = Renderer<ModuleDescriptor> {
|
||||||
val platform = it.getMultiTargetPlatform()
|
val platform = it.getMultiTargetPlatform()
|
||||||
when (platform) {
|
" ${it.getCapability(ModuleInfo.Capability)?.displayedName ?: "<Unknown Name>"}" + when (platform) {
|
||||||
MultiTargetPlatform.Common -> ""
|
MultiTargetPlatform.Common -> ""
|
||||||
is MultiTargetPlatform.Specific -> " for " + platform.platform
|
is MultiTargetPlatform.Specific -> " for " + platform.platform
|
||||||
null -> ""
|
null -> ""
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ private fun ideaModelDependencies(module: Module, productionOnly: Boolean): List
|
|||||||
interface ModuleSourceInfo : IdeaModuleInfo {
|
interface ModuleSourceInfo : IdeaModuleInfo {
|
||||||
val module: Module
|
val module: Module
|
||||||
|
|
||||||
|
override val displayedName get() = module.name
|
||||||
|
|
||||||
override val moduleOrigin: ModuleOrigin
|
override val moduleOrigin: ModuleOrigin
|
||||||
get() = ModuleOrigin.MODULE
|
get() = ModuleOrigin.MODULE
|
||||||
|
|
||||||
@@ -122,6 +124,8 @@ data class ModuleProductionSourceInfo(override val module: Module) : ModuleSourc
|
|||||||
data class ModuleTestSourceInfo(override val module: Module) : ModuleSourceInfo {
|
data class ModuleTestSourceInfo(override val module: Module) : ModuleSourceInfo {
|
||||||
override val name = Name.special("<test sources for module ${module.name}>")
|
override val name = Name.special("<test sources for module ${module.name}>")
|
||||||
|
|
||||||
|
override val displayedName get() = module.name + " (test)"
|
||||||
|
|
||||||
override fun contentScope(): GlobalSearchScope = ModuleTestSourceScope(module)
|
override fun contentScope(): GlobalSearchScope = ModuleTestSourceScope(module)
|
||||||
|
|
||||||
override fun dependencies() = module.cached(CachedValueProvider {
|
override fun dependencies() = module.cached(CachedValueProvider {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module for JVM">My</error> {
|
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module jvm (test) for JVM"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module jvm for JVM">My</error></error> {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'His' has no implementation in module for JVM">His</error> {
|
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'His' has no implementation in module jvm for JVM">His</error> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module for JS"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module for JVM">My</error></error> {
|
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module js (test) for JS"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module js for JS"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module jvm (test) for JVM"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module jvm for JVM">My</error></error></error></error> {
|
||||||
|
|
||||||
}
|
}
|
||||||
Vendored
+1
-1
@@ -4,4 +4,4 @@
|
|||||||
header interface Event
|
header interface Event
|
||||||
|
|
||||||
@Suppress("SOMETHING_WRONG")
|
@Suppress("SOMETHING_WRONG")
|
||||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'Wrong' has no implementation in module for JVM">Wrong</error>
|
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'Wrong' has no implementation in module jvm (test) for JVM"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'Wrong' has no implementation in module jvm for JVM">Wrong</error></error>
|
||||||
Reference in New Issue
Block a user