com.jetbrains.pluginverifier.usages.util.Extensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of verifier-intellij Show documentation
Show all versions of verifier-intellij Show documentation
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
}