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

com.jetbrains.pluginverifier.dependencies.resolution.PluginVersionSelector.kt Maven / Gradle / Ivy

Go to download

JetBrains Plugin Verifier Classes for IntelliJ Platform integration with API usage detection and reporting.

There is a newer version: 1.381
Show newest version
/*
 * Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 */

package com.jetbrains.pluginverifier.dependencies.resolution

import com.jetbrains.pluginverifier.repository.PluginInfo
import com.jetbrains.pluginverifier.repository.PluginRepository

/**
 * Selects a specific plugin version of the plugin among all versions available in the [PluginRepository].
 */
interface PluginVersionSelector {

  fun selectPluginVersion(pluginId: String, pluginRepository: PluginRepository): Result

  fun selectPluginByModuleId(moduleId: String, pluginRepository: PluginRepository): Result

  sealed class Result {
    /**
     * Successfully selected one version of the plugin - [pluginInfo].
     */
    data class Selected(val pluginInfo: PluginInfo) : Result()

    /**
     * Plugin is not found in the plugin repository.
     */
    data class NotFound(val reason: String) : Result()
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy