override def getInstalledPluginRoot()

in ideaSupport/src/main/scala/org/jetbrains/sbtidea/download/plugin/LocalPluginRegistry.scala [79:96]


  override def getInstalledPluginRoot(ideaPlugin: IntellijPlugin): Path = ideaPlugin match {
    case IntellijPlugin.BundledFolder(name) =>
      val pluginRoot = ideaRoot / "plugins" / name
      if (pluginRoot.exists)
        pluginRoot
      else
        throw new MissingPluginRootException(ideaPlugin.toString)
    case _ =>
      val key = ideaPlugin match {
        case id: IntellijPlugin.WithKnownId => id.id
        case unsupported =>
          throw new RuntimeException(s"Unsupported plugin: $unsupported")
      }
      if (!index.contains(key))
        throw new MissingPluginRootException(ideaPlugin.toString)
      val path = index.getInstallRoot(key)
      path.get
  }