All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jetbrains.plugin.structure.ide.DispatchingIdeManager.kt Maven / Gradle / Ivy

There is a newer version: 3.289
Show newest version
package com.jetbrains.plugin.structure.ide

import com.jetbrains.plugin.structure.intellij.version.IdeVersion
import java.nio.file.Path

class DispatchingIdeManager : IdeManager() {
  private val standardIdeManager = IdeManagerImpl()

  private val productInfoBasedIdeManager = ProductInfoBasedIdeManager()

  override fun createIde(idePath: Path): Ide = createIde(idePath, version = null)

  override fun createIde(idePath: Path, version: IdeVersion?): Ide {
    val ideManager = if (productInfoBasedIdeManager.supports(idePath)) {
      productInfoBasedIdeManager
    } else {
      standardIdeManager
    }
    return ideManager.createIde(idePath, version)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy