Skip to content

Commit

Permalink
Do not verify that com.intellij.languageBundle EP is internal and m…
Browse files Browse the repository at this point in the history
…ust be used by JetBrains only (#1162)
  • Loading branch information
novotnyr authored Sep 24, 2024
1 parent 1e01d56 commit 7a73323
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import com.jetbrains.plugin.structure.intellij.extractor.PluginBeanExtractor
import com.jetbrains.plugin.structure.intellij.problems.*
import com.jetbrains.plugin.structure.intellij.resources.ResourceResolver
import com.jetbrains.plugin.structure.intellij.verifiers.K2IdeModeCompatibilityVerifier
import com.jetbrains.plugin.structure.intellij.verifiers.LanguageBundleExtensionPointVerifier
import com.jetbrains.plugin.structure.intellij.verifiers.PluginIdVerifier
import com.jetbrains.plugin.structure.intellij.verifiers.PluginUntilBuildVerifier
import com.jetbrains.plugin.structure.intellij.verifiers.ProductReleaseVersionVerifier
Expand Down Expand Up @@ -687,7 +686,6 @@ internal class PluginCreator private constructor(

ServiceExtensionPointPreloadVerifier().verify(plugin, ::registerProblem)
StatusBarWidgetFactoryExtensionPointVerifier().verify(plugin, ::registerProblem)
LanguageBundleExtensionPointVerifier().verify(plugin, ::registerProblem)
K2IdeModeCompatibilityVerifier().verify(plugin, ::registerProblem, descriptorPath)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ class StatusBarWidgetFactoryExtensionPointIdMissing(private val implementationCl
"value returned from the getId() method of the $implementationClassFqn implementation."
}

class LanguageBundleExtensionPointIsInternal : PluginProblem() {
private val extensionPointName = "com.intellij.languageBundle"

override val level
get() = Level.UNACCEPTABLE_WARNING

override val message
get() = "The extension point in the <${extensionPointName}> element is marked with @ApiStatus.Internal " +
"and must be used by JetBrains only."
}


class NoDependencies(descriptorPath: String) : InvalidDescriptorProblem(
descriptorPath = descriptorPath,
detailedMessage = "Plugin has no dependencies. Please check the documentation: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import com.jetbrains.plugin.structure.intellij.plugin.IdePluginContentDescriptor
import com.jetbrains.plugin.structure.intellij.plugin.IdePluginContentDescriptor.ServiceDescriptor
import com.jetbrains.plugin.structure.intellij.plugin.KotlinPluginMode
import com.jetbrains.plugin.structure.intellij.plugin.KotlinPluginMode.Implicit
import com.jetbrains.plugin.structure.intellij.plugin.PluginVendors.isDevelopedByJetBrains
import com.jetbrains.plugin.structure.intellij.problems.InvalidKotlinPluginMode
import com.jetbrains.plugin.structure.intellij.problems.LanguageBundleExtensionPointIsInternal
import com.jetbrains.plugin.structure.intellij.problems.ServiceExtensionPointPreloadNotSupported
import com.jetbrains.plugin.structure.intellij.problems.StatusBarWidgetFactoryExtensionPointIdMissing
import com.jetbrains.plugin.structure.intellij.problems.UndeclaredKotlinK2CompatibilityMode
Expand Down Expand Up @@ -56,22 +54,6 @@ class StatusBarWidgetFactoryExtensionPointVerifier {
}
}

/**
* Rule: EP `com.intellij.languageBundle` is internal and must be used by JetBrains only.
*/
class LanguageBundleExtensionPointVerifier {
private val extensionPointName = "com.intellij.languageBundle"

fun verify(plugin: IdePlugin, problemRegistrar: ProblemRegistrar) {
if (!isDevelopedByJetBrains(plugin)) {
val languageBundles = plugin.extensions[extensionPointName] ?: emptyList()
if (languageBundles.isNotEmpty()) {
problemRegistrar.registerProblem(LanguageBundleExtensionPointIsInternal())
}
}
}
}

/**
* Rule: When depending on the Kotlin plugin, an EP
* `org.jetbrains.kotlin.supportsKotlinPluginMode` must be declared with corresponding compatibility attributes.
Expand Down

This file was deleted.

0 comments on commit 7a73323

Please sign in to comment.