PyCharm: Get rid of includes in v2 plugins: they do not play well with v2.

Autolayout doesn't obey includes. With plain copy/paste (which is a recommended approach for now) we do not have to list all modules manually in `pluginLayout`.

It is taken from `content`.

We also refactor out PyCharm training, as it depends on plugin that may not exist

GitOrigin-RevId: c225b3565a4b3ea1121a7cdf0b072a63b9448ca4
This commit is contained in:
Ilya.Kazakevich
2024-04-15 19:25:17 +02:00
committed by intellij-monorepo-bot
parent 1fc29219d1
commit 636c384c85
17 changed files with 47 additions and 40 deletions

1
.idea/modules.xml generated
View File

@@ -1137,6 +1137,7 @@
<module fileurl="file://$PROJECT_DIR$/python/intellij.pycharm.community.customization.iml" filepath="$PROJECT_DIR$/python/intellij.pycharm.community.customization.iml" />
<module fileurl="file://$PROJECT_DIR$/python/ide/impl/intellij.pycharm.community.ide.impl.iml" filepath="$PROJECT_DIR$/python/ide/impl/intellij.pycharm.community.ide.impl.iml" />
<module fileurl="file://$PROJECT_DIR$/python/ide/impl/intellij.pycharm.community.ide.impl.promotion/intellij.pycharm.community.ide.impl.promotion.iml" filepath="$PROJECT_DIR$/python/ide/impl/intellij.pycharm.community.ide.impl.promotion/intellij.pycharm.community.ide.impl.promotion.iml" />
<module fileurl="file://$PROJECT_DIR$/python/ide/implTraining/intellij.pycharm.community.ide.implTraining/intellij.pycharm.community.ide.implTraining.iml" filepath="$PROJECT_DIR$/python/ide/implTraining/intellij.pycharm.community.ide.implTraining/intellij.pycharm.community.ide.implTraining.iml" />
<module fileurl="file://$PROJECT_DIR$/python/intellij.pycharm.community.main.iml" filepath="$PROJECT_DIR$/python/intellij.pycharm.community.main.iml" />
<module fileurl="file://$PROJECT_DIR$/python/python-ast/intellij.python.ast.iml" filepath="$PROJECT_DIR$/python/python-ast/intellij.python.ast.iml" />
<module fileurl="file://$PROJECT_DIR$/python/python-common-tests/intellij.python.commonTests.iml" filepath="$PROJECT_DIR$/python/python-common-tests/intellij.python.commonTests.iml" />

View File

@@ -5,7 +5,6 @@ import kotlinx.collections.immutable.persistentMapOf
import kotlinx.collections.immutable.persistentSetOf
import kotlinx.collections.immutable.plus
import org.jetbrains.intellij.build.*
import org.jetbrains.intellij.build.impl.PluginLayout
import org.jetbrains.intellij.build.io.copyFileToDir
import java.nio.file.Files
import java.nio.file.Path
@@ -30,20 +29,15 @@ class PyCharmCommunityProperties(private val communityHome: Path) : PyCharmPrope
"intellij.platform.main",
"intellij.pycharm.community",
)
productLayout.bundledPluginModules.add("intellij.python.community.plugin")
productLayout.bundledPluginModules.add("intellij.pycharm.community.customization")
productLayout.bundledPluginModules.add("intellij.vcs.github.community")
productLayout.bundledPluginModules.addAll(Files.readAllLines(communityHome.resolve("python/build/plugin-list.txt")))
productLayout.bundledPluginModules.addAll(
listOf(
"intellij.python.community.plugin", // Python language
"intellij.pycharm.community.customization", // Convert Intellij to PyCharm
"intellij.vcs.github.community") +
Files.readAllLines(communityHome.resolve("python/build/plugin-list.txt"))
)
productLayout.pluginLayouts = CommunityRepositoryModules.COMMUNITY_REPOSITORY_PLUGINS.addAll(listOf(
PluginLayout.plugin(listOf(
"intellij.pycharm.community.customization",
"intellij.pycharm.community.ide.impl",
"intellij.pycharm.community.ide.impl.promotion",
"intellij.jupyter.viewOnly",
"intellij.jupyter.core"
)
),
CommunityRepositoryModules.githubPlugin("intellij.vcs.github.community")
)
)

View File

@@ -25,5 +25,6 @@
<orderEntry type="module" module-name="intellij.python.featuresTrainer" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
<orderEntry type="library" name="http-client" level="project" />
<orderEntry type="module" module-name="intellij.pycharm.community.ide.impl.promotion" scope="RUNTIME" />
</component>
</module>

View File

@@ -1,12 +0,0 @@
<!-- Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<idea-plugin>
<!-- Included both: in PyCharm Pro and Community customization plugins -->
<resource-bundle>messages.PyBundle</resource-bundle>
<content>
<module name="intellij.pycharm.community.ide.impl"/>
<module name="intellij.pycharm.community.ide.impl/training"/>
</content>
</idea-plugin>

View File

@@ -1,9 +0,0 @@
<idea-plugin package="com.intellij.pycharm.community.ide.impl.training">
<dependencies>
<plugin id="training"/>
<module name="intellij.python.featuresTrainer"/>
</dependencies>
<extensions defaultExtensionNs="com.intellij">
<startPagePromoter id="PyOnboardingTourPromoter" implementation="com.intellij.pycharm.community.ide.impl.training.PyOnboardingTourPromoter"/>
</extensions>
</idea-plugin>

View File

@@ -78,9 +78,7 @@
<defaultToolWindowLayout implementation="com.intellij.pycharm.community.ide.impl.PyToolWindowLayoutProvider" order="last"/>
<newUIConfigurable implementation="com.intellij.pycharm.community.ide.impl.configuration.PyExperimentalUIConfigurable"/>
<applicationService serviceInterface="com.intellij.openapi.ui.OnboardingBackgroundImageProvider"
serviceImplementation="com.intellij.pycharm.community.ide.impl.PyCharmOnboardingBackgroundImageProvider"
overrides="true"/>
</extensions>
<extensions defaultExtensionNs="Pythonid">

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.util.ui" />
<orderEntry type="module" module-name="intellij.platform.core" />
<orderEntry type="module" module-name="intellij.python.featuresTrainer" />
<orderEntry type="module" module-name="intellij.featuresTrainer" />
<orderEntry type="module" module-name="intellij.platform.ide" />
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
</component>
</module>

View File

@@ -0,0 +1,13 @@
<idea-plugin package="com.intellij.pycharm.community.ide.implTraining">
<dependencies>
<plugin id="training"/>
<module name="intellij.python.featuresTrainer"/>
</dependencies>
<extensions defaultExtensionNs="com.intellij">
<startPagePromoter id="PyOnboardingTourPromoter"
implementation="com.intellij.pycharm.community.ide.implTraining.PyOnboardingTourPromoter"/>
<applicationService serviceInterface="com.intellij.openapi.ui.OnboardingBackgroundImageProvider"
serviceImplementation="com.intellij.pycharm.community.ide.implTraining.PyCharmOnboardingBackgroundImageProvider"
overrides="true"/>
</extensions>
</idea-plugin>

View File

@@ -1,5 +1,5 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.pycharm.community.ide.impl
package com.intellij.pycharm.community.ide.implTraining
import com.intellij.openapi.wm.impl.OnboardingBackgroundImageProviderBase
import java.net.URL

View File

@@ -1,5 +1,5 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.pycharm.community.ide.impl.training
package com.intellij.pycharm.community.ide.implTraining
import com.intellij.openapi.util.IconLoader
import com.intellij.util.PlatformUtils

View File

@@ -10,9 +10,10 @@
<plugin id="com.intellij.modules.python"/>
</dependencies>
<xi:include href="/META-INF/pycharm-v2-customization-plugin-include.xml"/>
<xi:include href="/META-INF/tips-pycharm-community.xml"/>
<content>
<module name="intellij.pycharm.community.ide.impl"/>
<module name="intellij.pycharm.community.ide.implTraining"/>
<module name="intellij.jupyter.core"/> <!-- Lang for notebooks preview -->
<module name="intellij.jupyter.viewOnly"/> <!-- notebooks preview itself-->

View File

@@ -11,5 +11,6 @@
<orderEntry type="library" name="tips-pycharm-community" level="project" />
<orderEntry type="module" module-name="intellij.jupyter.viewOnly" />
<orderEntry type="module" module-name="intellij.pycharm.community.ide.impl.promotion" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.pycharm.community.ide.implTraining" scope="RUNTIME" />
</component>
</module>