in ideaSupport/src/main/scala/org/jetbrains/sbtidea/download/plugin/LocalPluginRegistry.scala [53:77]
override def isPluginInstalled(ideaPlugin: IntellijPlugin): Boolean = {
val existsInIndex = ideaPlugin match {
case IntellijPlugin.Id(id, _, _, _) =>
index.contains(id)
case IntellijPlugin.IdWithDownloadUrl(id, _) =>
index.contains(id)
case IntellijPlugin.BundledFolder(name) => getDescriptorFromPluginFolder(name) match {
case Right(descriptor) =>
if (!index.contains(descriptor.id)) {
log.warn(s"Bundled plugin folder - '$name(${descriptor.id})' exists but not in index: corrupt index file?")
}
true
case Left(_) =>
false
}
}
if (existsInIndex) {
val path = getInstalledPluginRoot(ideaPlugin)
if (!path.exists) {
log.warn(s"Plugin was registered in index but plugin installation directory does not exist: $path")
}
path.exists
}
else false
}