From c037841853b5ff0102fc4a0335f8f61fa4d8f6ee Mon Sep 17 00:00:00 2001 From: Nikolay Chashnikov Date: Tue, 3 Jun 2025 09:07:37 +0200 Subject: [PATCH] [spellchecker] convert intellij.spellchecker to a content module (IJPL-189900) This is needed to have an explicit dependency on the backend in it (IJPL-188916), and also to convert XML modules it depend on in content modules as well. The new module is registered in common-ide-modules.xml to include it in all IntelliJ-based IDEs as before. A plugin alias 'com.intellij.modules.spellchecker' is introduced to allow adding dependency on the new module without using a v2 'dependencies' tag. Existing plugins which depend on intellij.spellchecker are updated to have an explicit dependency. The change shouldn't affect external plugins which use classes from 'intellij.spellchecker' because the new module will be automatically added to their dependencies. 'lucene' and 'ai.grazie.spell.gec.engine.local' libraries which were included in the main classloader of the core plugin before due to this module are temporary included in distribution of intellij.ml.llm, intellij.grazie and intellij.searchEverywhereMl plugins. This will be fixed by converting these libraries to content module in next commits. GitOrigin-RevId: aa746fea2f6fd044cf0eaabd6589fce89133eee9 --- .../resources/META-INF/JavaIdePlugin.xml | 3 --- java/plugin/resources/META-INF/plugin.xml | 1 + .../resources/intellij.json.backend.xml | 1 + .../intellij/build/impl/PlatformModules.kt | 1 - .../ide/plugins/ModulesWithDependencies.kt | 1 + .../src/META-INF/PlatformLangXmlPlugin.xml | 3 --- .../src/META-INF/common-ide-modules.xml | 1 + .../sdk/settings/SpellCheckerSettings.kt | 5 +++- .../resources/intellij.devkit.core.xml | 1 + .../intellij.editorconfig.backend.xml | 1 + plugins/grazie/plugin-content.yaml | 27 ++++++++++++++----- plugins/grazie/resources/META-INF/plugin.xml | 1 + plugins/groovy/resources/META-INF/plugin.xml | 1 + plugins/javaFX/resources/intellij.javaFX.xml | 1 + .../jsonpath/resources/META-INF/plugin.xml | 1 + .../intellij.markdown.spellchecker.xml | 1 + .../resources/intellij.properties.backend.xml | 1 + .../search-everywhere-ml/plugin-content.yaml | 17 +++++++++--- plugins/sh/resources/META-INF/plugin.xml | 1 + .../textmate/resources/META-INF/plugin.xml | 1 + .../ui-designer/resources/META-INF/plugin.xml | 1 + .../resources/intellij.yaml.backend.xml | 1 + .../intellij.python.community.impl.xml | 1 + ...erPlugin.xml => intellij.spellchecker.xml} | 1 + .../resources/intellij.spellchecker.xml.xml | 1 + 25 files changed, 57 insertions(+), 18 deletions(-) rename spellchecker/resources/{META-INF/SpellCheckerPlugin.xml => intellij.spellchecker.xml} (98%) diff --git a/java/ide-resources/resources/META-INF/JavaIdePlugin.xml b/java/ide-resources/resources/META-INF/JavaIdePlugin.xml index cdcea16737d5..d0f1f7fad5b7 100644 --- a/java/ide-resources/resources/META-INF/JavaIdePlugin.xml +++ b/java/ide-resources/resources/META-INF/JavaIdePlugin.xml @@ -29,9 +29,6 @@ - - - diff --git a/java/plugin/resources/META-INF/plugin.xml b/java/plugin/resources/META-INF/plugin.xml index 91e609361883..fe61f3ad6798 100644 --- a/java/plugin/resources/META-INF/plugin.xml +++ b/java/plugin/resources/META-INF/plugin.xml @@ -16,6 +16,7 @@ + diff --git a/json/backend/resources/intellij.json.backend.xml b/json/backend/resources/intellij.json.backend.xml index b49d097c78f5..3908a221b33d 100644 --- a/json/backend/resources/intellij.json.backend.xml +++ b/json/backend/resources/intellij.json.backend.xml @@ -1,6 +1,7 @@ + diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt index 3e7d2e7ebb46..d14ae6a5b89f 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt @@ -82,7 +82,6 @@ private val PLATFORM_IMPLEMENTATION_MODULES = java.util.List.of( "intellij.platform.runtime.product", "intellij.platform.bootstrap", - "intellij.spellchecker", "intellij.platform.polySymbols", "intellij.platform.vcs.log", diff --git a/platform/core-impl/src/com/intellij/ide/plugins/ModulesWithDependencies.kt b/platform/core-impl/src/com/intellij/ide/plugins/ModulesWithDependencies.kt index 6710243c6024..fa69a04b5fe7 100644 --- a/platform/core-impl/src/com/intellij/ide/plugins/ModulesWithDependencies.kt +++ b/platform/core-impl/src/com/intellij/ide/plugins/ModulesWithDependencies.kt @@ -182,6 +182,7 @@ private val contentModulesExtractedInCorePluginWhichCanBeUsedFromExternalPlugins "intellij.platform.tasks.impl", "intellij.spellchecker.xml", "intellij.relaxng", + "intellij.spellchecker", ) private fun collectDirectDependenciesInOldFormat(rootDescriptor: IdeaPluginDescriptorImpl, diff --git a/platform/platform-resources/src/META-INF/PlatformLangXmlPlugin.xml b/platform/platform-resources/src/META-INF/PlatformLangXmlPlugin.xml index 1215bc3733a4..8e3e09ff5b89 100644 --- a/platform/platform-resources/src/META-INF/PlatformLangXmlPlugin.xml +++ b/platform/platform-resources/src/META-INF/PlatformLangXmlPlugin.xml @@ -4,9 +4,6 @@ - - - diff --git a/platform/platform-resources/src/META-INF/common-ide-modules.xml b/platform/platform-resources/src/META-INF/common-ide-modules.xml index cefea77458db..2c8c91fffcaa 100644 --- a/platform/platform-resources/src/META-INF/common-ide-modules.xml +++ b/platform/platform-resources/src/META-INF/common-ide-modules.xml @@ -26,6 +26,7 @@ + diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/settings/SpellCheckerSettings.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/settings/SpellCheckerSettings.kt index 9fc8cbeeb4e1..008da939c47d 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/settings/SpellCheckerSettings.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/settings/SpellCheckerSettings.kt @@ -6,7 +6,10 @@ import com.intellij.driver.sdk.Project fun Driver.getSpellCheckerSettingsInstance(project: Project) = utility(SpellCheckerSettings::class).getInstance(project) -@Remote("com.intellij.spellchecker.settings.SpellCheckerSettings") +@Remote( + value = "com.intellij.spellchecker.settings.SpellCheckerSettings", + plugin = "com.intellij/intellij.spellchecker", +) interface SpellCheckerSettings { fun getInstance(project: Project): SpellCheckerSettings fun getDictionaryToSave(): String? diff --git a/plugins/devkit/devkit-core/resources/intellij.devkit.core.xml b/plugins/devkit/devkit-core/resources/intellij.devkit.core.xml index b267d2432967..0a64fa91aa98 100644 --- a/plugins/devkit/devkit-core/resources/intellij.devkit.core.xml +++ b/plugins/devkit/devkit-core/resources/intellij.devkit.core.xml @@ -2,6 +2,7 @@ + diff --git a/plugins/editorconfig/backend/resources/intellij.editorconfig.backend.xml b/plugins/editorconfig/backend/resources/intellij.editorconfig.backend.xml index 74a49c328789..a11fd056a817 100644 --- a/plugins/editorconfig/backend/resources/intellij.editorconfig.backend.xml +++ b/plugins/editorconfig/backend/resources/intellij.editorconfig.backend.xml @@ -2,6 +2,7 @@ + diff --git a/plugins/grazie/plugin-content.yaml b/plugins/grazie/plugin-content.yaml index 412b28b5386e..e45c53828b2c 100644 --- a/plugins/grazie/plugin-content.yaml +++ b/plugins/grazie/plugin-content.yaml @@ -3,17 +3,20 @@ module: intellij.grazie.core files: - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-detect-jvm/0/nlp-detect-jvm-0.jar +- name: lib/ai.grazie.spell.gec.engine.local.jar + library: ai.grazie.spell.gec.engine.local + files: + - name: $MAVEN_REPOSITORY$/ai/grazie/spell/gec-spell-engine-local-jvm/0/gec-spell-engine-local-jvm-0.jar - name: $MAVEN_REPOSITORY$/ai/grazie/utils/utils-common-jvm/0/utils-common-jvm-0.jar - - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-common-jvm/0/nlp-common-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/model/model-gec-jvm/0/model-gec-jvm-0.jar - name: $MAVEN_REPOSITORY$/ai/grazie/model/model-text-jvm/0/model-text-jvm-0.jar - name: $MAVEN_REPOSITORY$/ai/grazie/model/model-common-jvm/0/model-common-jvm-0.jar - - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-patterns-jvm/0/nlp-patterns-jvm-0.jar - - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-tokenizer-jvm/0/nlp-tokenizer-jvm-0.jar - - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-similarity-jvm/0/nlp-similarity-jvm-0.jar -- name: lib/ai.grazie.nlp.langs.jar - library: ai.grazie.nlp.langs - files: - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-langs-jvm/0/nlp-langs-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-common-jvm/0/nlp-common-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-patterns-jvm/0/nlp-patterns-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-similarity-jvm/0/nlp-similarity-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-phonetics-jvm/0/nlp-phonetics-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-tokenizer-jvm/0/nlp-tokenizer-jvm-0.jar reason: <- intellij.grazie.core - name: lib/ai.grazie.utils.lucene.lt.compatibility.jar library: ai.grazie.utils.lucene.lt.compatibility @@ -79,6 +82,16 @@ module: intellij.grazie.core files: - name: $MAVEN_REPOSITORY$/javax/measure/unit-api/1/unit-api-1.jar +- name: lib/lucene-analysis-common.jar + library: lucene-analysis-common + files: + - name: $MAVEN_REPOSITORY$/org/apache/lucene/lucene-analysis-common/9/lucene-analysis-common-9.jar + reason: <- intellij.grazie.core +- name: lib/lucene-core.jar + library: lucene-core + files: + - name: $MAVEN_REPOSITORY$/org/apache/lucene/lucene-core/9/lucene-core-9.jar + reason: <- intellij.grazie.core - name: lib/net.loomchild-segment.jar library: net.loomchild:segment:2.0.1 module: intellij.grazie.core diff --git a/plugins/grazie/resources/META-INF/plugin.xml b/plugins/grazie/resources/META-INF/plugin.xml index bcced99e5610..93b16b9d17f6 100644 --- a/plugins/grazie/resources/META-INF/plugin.xml +++ b/plugins/grazie/resources/META-INF/plugin.xml @@ -23,6 +23,7 @@ ]]> + diff --git a/plugins/groovy/resources/META-INF/plugin.xml b/plugins/groovy/resources/META-INF/plugin.xml index 1c7a67a1645b..0b6c339e88d5 100644 --- a/plugins/groovy/resources/META-INF/plugin.xml +++ b/plugins/groovy/resources/META-INF/plugin.xml @@ -21,6 +21,7 @@ + diff --git a/plugins/javaFX/resources/intellij.javaFX.xml b/plugins/javaFX/resources/intellij.javaFX.xml index edc09653b4c2..68c7529f6a66 100644 --- a/plugins/javaFX/resources/intellij.javaFX.xml +++ b/plugins/javaFX/resources/intellij.javaFX.xml @@ -1,5 +1,6 @@ + diff --git a/plugins/jsonpath/resources/META-INF/plugin.xml b/plugins/jsonpath/resources/META-INF/plugin.xml index f97bc2eb8801..e593030b3bce 100644 --- a/plugins/jsonpath/resources/META-INF/plugin.xml +++ b/plugins/jsonpath/resources/META-INF/plugin.xml @@ -10,6 +10,7 @@ + messages.JsonPathBundle diff --git a/plugins/markdown/spellchecker/src/main/resources/intellij.markdown.spellchecker.xml b/plugins/markdown/spellchecker/src/main/resources/intellij.markdown.spellchecker.xml index 6f2fd57173cc..25870c0371dd 100644 --- a/plugins/markdown/spellchecker/src/main/resources/intellij.markdown.spellchecker.xml +++ b/plugins/markdown/spellchecker/src/main/resources/intellij.markdown.spellchecker.xml @@ -1,6 +1,7 @@ + + diff --git a/plugins/search-everywhere-ml/plugin-content.yaml b/plugins/search-everywhere-ml/plugin-content.yaml index ffc8219702bd..fb9a1f5562fe 100644 --- a/plugins/search-everywhere-ml/plugin-content.yaml +++ b/plugins/search-everywhere-ml/plugin-content.yaml @@ -29,9 +29,20 @@ - name: lib/modules/intellij.searchEverywhereMl.typos.jar contentModules: - name: intellij.searchEverywhereMl.typos - libraries: - ai.grazie.spell.gec.engine.local.jvm: - - name: $MAVEN_REPOSITORY$/ai/grazie/spell/gec-spell-engine-local-jvm/0/gec-spell-engine-local-jvm-0.jar + library: ai.grazie.spell.gec.engine.local + files: + - name: $MAVEN_REPOSITORY$/ai/grazie/spell/gec-spell-engine-local-jvm/0/gec-spell-engine-local-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/utils/utils-common-jvm/0/utils-common-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/model/model-gec-jvm/0/model-gec-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/model/model-text-jvm/0/model-text-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/model/model-common-jvm/0/model-common-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-langs-jvm/0/nlp-langs-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-common-jvm/0/nlp-common-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-patterns-jvm/0/nlp-patterns-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-similarity-jvm/0/nlp-similarity-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-phonetics-jvm/0/nlp-phonetics-jvm-0.jar + - name: $MAVEN_REPOSITORY$/ai/grazie/nlp/nlp-tokenizer-jvm/0/nlp-tokenizer-jvm-0.jar + reason: <- intellij.searchEverywhereMl.typos - name: lib/searchEverywhereMl.jar modules: - name: intellij.searchEverywhereMl diff --git a/plugins/sh/resources/META-INF/plugin.xml b/plugins/sh/resources/META-INF/plugin.xml index b2624da14837..eb5d71cd8f44 100644 --- a/plugins/sh/resources/META-INF/plugin.xml +++ b/plugins/sh/resources/META-INF/plugin.xml @@ -13,6 +13,7 @@ + com.intellij.modules.lang + com.intellij.modules.spellchecker Allows to design Swing UI graphically, supports code generation/instrumentation, preview, widgets library and UI-related code inspections messages.UIDesignerBundle com.intellij.java-i18n + com.intellij.modules.spellchecker com.intellij.properties diff --git a/plugins/yaml/backend/resources/intellij.yaml.backend.xml b/plugins/yaml/backend/resources/intellij.yaml.backend.xml index 52fd2a47ddfc..4614cdc29200 100644 --- a/plugins/yaml/backend/resources/intellij.yaml.backend.xml +++ b/plugins/yaml/backend/resources/intellij.yaml.backend.xml @@ -5,6 +5,7 @@ + diff --git a/python/pluginResources/intellij.python.community.impl.xml b/python/pluginResources/intellij.python.community.impl.xml index 69593301a731..7a05c8259745 100644 --- a/python/pluginResources/intellij.python.community.impl.xml +++ b/python/pluginResources/intellij.python.community.impl.xml @@ -1,5 +1,6 @@ + diff --git a/spellchecker/resources/META-INF/SpellCheckerPlugin.xml b/spellchecker/resources/intellij.spellchecker.xml similarity index 98% rename from spellchecker/resources/META-INF/SpellCheckerPlugin.xml rename to spellchecker/resources/intellij.spellchecker.xml index f4af69d183d9..b50590c8bd95 100644 --- a/spellchecker/resources/META-INF/SpellCheckerPlugin.xml +++ b/spellchecker/resources/intellij.spellchecker.xml @@ -1,4 +1,5 @@ + diff --git a/spellchecker/xml/resources/intellij.spellchecker.xml.xml b/spellchecker/xml/resources/intellij.spellchecker.xml.xml index 21148d6244bf..65acccae1d06 100644 --- a/spellchecker/xml/resources/intellij.spellchecker.xml.xml +++ b/spellchecker/xml/resources/intellij.spellchecker.xml.xml @@ -1,6 +1,7 @@ +