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

com.jetbrains.plugin.structure.intellij.resources.CompositeResourceResolver.kt Maven / Gradle / Ivy

Go to download

Library for parsing JetBrains IDE plugins. Can be used to verify that plugin complies with the JetBrains Marketplace requirements.

There is a newer version: 3.290
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.plugin.structure.intellij.resources

import java.net.URL
import java.nio.file.Path

class CompositeResourceResolver(private val resolvers: List) : ResourceResolver {
  override fun resolveResource(relativePath: String, basePath: Path): ResourceResolver.Result {
    for (resolver in resolvers) {
      val resourceResult = resolver.resolveResource(relativePath, basePath)
      if (resourceResult !is ResourceResolver.Result.NotFound) {
        return resourceResult
      }
    }
    return ResourceResolver.Result.NotFound
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy