Add module name to HEADER_WITHOUT_IMPLEMENTATION message

This commit is contained in:
Mikhail Glukhikh
2017-04-18 16:46:55 +03:00
parent 6cefc0ddf3
commit 04f7ba95c5
7 changed files with 11 additions and 5 deletions
@@ -128,6 +128,7 @@ interface ModuleInfo {
val isLibrary: Boolean
get() = false
val name: Name
val displayedName: String get() = name.asString()
fun dependencies(): List<ModuleInfo>
val platform: TargetPlatform? get() = null
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.util.text.StringUtil
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.analyzer.ModuleInfo
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.cfg.WhenMissingCase
import org.jetbrains.kotlin.cfg.hasUnknown
@@ -77,7 +78,7 @@ object Renderers {
@JvmField val PLATFORM = Renderer<ModuleDescriptor> {
val platform = it.getMultiTargetPlatform()
when (platform) {
" ${it.getCapability(ModuleInfo.Capability)?.displayedName ?: "<Unknown Name>"}" + when (platform) {
MultiTargetPlatform.Common -> ""
is MultiTargetPlatform.Specific -> " for " + platform.platform
null -> ""
@@ -99,6 +99,8 @@ private fun ideaModelDependencies(module: Module, productionOnly: Boolean): List
interface ModuleSourceInfo : IdeaModuleInfo {
val module: Module
override val displayedName get() = module.name
override val moduleOrigin: ModuleOrigin
get() = ModuleOrigin.MODULE
@@ -122,6 +124,8 @@ data class ModuleProductionSourceInfo(override val module: Module) : ModuleSourc
data class ModuleTestSourceInfo(override val module: Module) : ModuleSourceInfo {
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 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> {
}
@@ -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> {
}
@@ -4,4 +4,4 @@
header interface Event
@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>