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

com.jetbrains.pluginverifier.usages.util.Extensions.kt Maven / Gradle / Ivy

Go to download

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

The newest version!
package com.jetbrains.pluginverifier.usages.util

import com.jetbrains.plugin.structure.classes.resolvers.findOriginOfType
import com.jetbrains.plugin.structure.intellij.classes.locator.PluginFileOrigin
import com.jetbrains.pluginverifier.verifiers.PluginVerificationContext
import com.jetbrains.pluginverifier.verifiers.VerificationContext
import com.jetbrains.pluginverifier.verifiers.resolution.ClassFileMember

fun VerificationContext.isFromVerifiedPlugin(fileMember: ClassFileMember): Boolean {
  val pluginFileOrigin = fileMember.containingClassFile.classFileOrigin.findOriginOfType()
  return this is PluginVerificationContext && idePlugin == pluginFileOrigin?.idePlugin
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy