From 496a09fd92c0e8c8a5fc20c5fa457f637f0ba90e Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 1 May 2024 08:35:44 +0200 Subject: [PATCH] IJPL-149087 %createJavaFile and %createKotlinFile commands fail due to 'NoClassDefFoundError: com/intellij/openapi/vcs/ex/ProjectLevelVcsManagerEx' GitOrigin-RevId: ff13594a93fbe0f9f60461f4351430996a5a5ed3 --- .idea/modules.xml | 1 + .../intellij.java.performancePlugin.iml | 1 + .../java/performancePlugin/CreateJavaFileCommand.kt | 8 +++----- .../intellij/build/CommunityRepositoryModules.kt | 11 ++--------- .../intellij/build/impl/PlatformModules.kt | 1 - .../kotlin.performanceExtendedPlugin.iml | 1 + .../commands/CreateKotlinFileCommand.kt | 4 ++-- .../core/intellij.performanceTesting.iml | 13 +++++-------- .../core/resources/META-INF/plugin.xml | 1 + .../vcs/intellij.performanceTesting.vcs.iml | 13 +++++++++++++ .../intellij/performanceTesting/vcs}/VcsTestUtil.kt | 5 +---- .../vcs/src/intellij.performanceTesting.vcs.xml | 6 ++++++ 12 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 plugins/performanceTesting/vcs/intellij.performanceTesting.vcs.iml rename plugins/performanceTesting/{core/src/com/jetbrains/performancePlugin/utils => vcs/src/com/intellij/performanceTesting/vcs}/VcsTestUtil.kt (94%) create mode 100644 plugins/performanceTesting/vcs/src/intellij.performanceTesting.vcs.xml diff --git a/.idea/modules.xml b/.idea/modules.xml index 822c87f15079..e40efc7a049c 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -903,6 +903,7 @@ + diff --git a/java/performancePlugin/intellij.java.performancePlugin.iml b/java/performancePlugin/intellij.java.performancePlugin.iml index 757493a03a95..77243d5cf06b 100644 --- a/java/performancePlugin/intellij.java.performancePlugin.iml +++ b/java/performancePlugin/intellij.java.performancePlugin.iml @@ -19,5 +19,6 @@ + \ No newline at end of file diff --git a/java/performancePlugin/src/com/intellij/java/performancePlugin/CreateJavaFileCommand.kt b/java/performancePlugin/src/com/intellij/java/performancePlugin/CreateJavaFileCommand.kt index cea387fbb67b..76c779a5dfa6 100644 --- a/java/performancePlugin/src/com/intellij/java/performancePlugin/CreateJavaFileCommand.kt +++ b/java/performancePlugin/src/com/intellij/java/performancePlugin/CreateJavaFileCommand.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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.java.performancePlugin import com.intellij.core.JavaPsiBundle.message @@ -11,7 +11,7 @@ import com.intellij.psi.JavaDirectoryService import com.intellij.psi.impl.file.PsiJavaDirectoryFactory import com.jetbrains.performancePlugin.PerformanceTestSpan import com.jetbrains.performancePlugin.commands.PerformanceCommandCoroutineAdapter -import com.jetbrains.performancePlugin.utils.VcsTestUtil +import com.intellij.performanceTesting.vcs.VcsTestUtil import io.opentelemetry.context.Context import org.jetbrains.annotations.Nls @@ -19,8 +19,7 @@ import org.jetbrains.annotations.Nls * Command to add Java file to project * Example: %createJavaFile fileName,dstDir,fileType - class, enum, annotation, record, interface */ -class CreateJavaFileCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) { - +internal class CreateJavaFileCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) { companion object { const val NAME: String = "createJavaFile" const val PREFIX: String = CMD_PREFIX + NAME @@ -58,5 +57,4 @@ class CreateJavaFileCommand(text: String, line: Int) : PerformanceCommandCorouti } override fun getName(): String = NAME - } \ No newline at end of file diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt index d58deafd1dde..649972919b68 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt @@ -221,15 +221,8 @@ object CommunityRepositoryModules { spec.withModuleLibrary("intellij.remoterobot.robot.server.core", spec.mainModule, "") spec.withProjectLibrary("okhttp") }, - pluginAuto( - listOf( - "intellij.performanceTesting", - "intellij.performanceTesting.remoteDriver", - "intellij.driver.model", - "intellij.driver.impl", - "intellij.driver.client" - ) - )) + pluginAuto(listOf("intellij.performanceTesting", "intellij.driver.model", "intellij.driver.impl", "intellij.driver.client")) + ) val CONTRIB_REPOSITORY_PLUGINS: List = java.util.List.of( pluginAuto("intellij.errorProne") { spec -> 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 6595e94265ae..fac870b0c4c6 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 @@ -41,7 +41,6 @@ private val PLATFORM_API_MODULES = java.util.List.of( "intellij.platform.remoteServers", "intellij.platform.usageView", "intellij.platform.execution", - "intellij.xml.analysis", "intellij.xml", "intellij.xml.psi", "intellij.xml.structureView", diff --git a/plugins/kotlin/kotlin.performanceExtendedPlugin/kotlin.performanceExtendedPlugin.iml b/plugins/kotlin/kotlin.performanceExtendedPlugin/kotlin.performanceExtendedPlugin.iml index ce91f2c48452..22d8501c78bf 100644 --- a/plugins/kotlin/kotlin.performanceExtendedPlugin/kotlin.performanceExtendedPlugin.iml +++ b/plugins/kotlin/kotlin.performanceExtendedPlugin/kotlin.performanceExtendedPlugin.iml @@ -31,5 +31,6 @@ + \ No newline at end of file diff --git a/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/CreateKotlinFileCommand.kt b/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/CreateKotlinFileCommand.kt index 95b6f0726a86..553daa51cadf 100644 --- a/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/CreateKotlinFileCommand.kt +++ b/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/CreateKotlinFileCommand.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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.performance.performancePlugin.commands import com.intellij.ide.fileTemplates.FileTemplateManager @@ -13,7 +13,7 @@ import com.intellij.psi.impl.PsiManagerImpl import com.intellij.psi.impl.file.PsiDirectoryImpl import com.jetbrains.performancePlugin.PerformanceTestSpan import com.jetbrains.performancePlugin.commands.PerformanceCommandCoroutineAdapter -import com.jetbrains.performancePlugin.utils.VcsTestUtil +import com.intellij.performanceTesting.vcs.VcsTestUtil import io.opentelemetry.context.Context import org.jetbrains.kotlin.idea.actions.createKotlinFileFromTemplate diff --git a/plugins/performanceTesting/core/intellij.performanceTesting.iml b/plugins/performanceTesting/core/intellij.performanceTesting.iml index b698e09cb343..063e30821289 100644 --- a/plugins/performanceTesting/core/intellij.performanceTesting.iml +++ b/plugins/performanceTesting/core/intellij.performanceTesting.iml @@ -23,10 +23,10 @@ - + - - 423ef4cd72207b73a9197bd5c3514c3b336a706e44f2dfbd1e9da14f75135dce + + 706b5582246d534f427a57141d9fe4a9a7ac1aae37aac857769ec9abacf0de82 @@ -36,11 +36,11 @@ - + - + @@ -48,9 +48,6 @@ - - - diff --git a/plugins/performanceTesting/core/resources/META-INF/plugin.xml b/plugins/performanceTesting/core/resources/META-INF/plugin.xml index fb26a6bf0d28..97bf58f4e22f 100644 --- a/plugins/performanceTesting/core/resources/META-INF/plugin.xml +++ b/plugins/performanceTesting/core/resources/META-INF/plugin.xml @@ -12,6 +12,7 @@ + diff --git a/plugins/performanceTesting/vcs/intellij.performanceTesting.vcs.iml b/plugins/performanceTesting/vcs/intellij.performanceTesting.vcs.iml new file mode 100644 index 000000000000..0aca12c85369 --- /dev/null +++ b/plugins/performanceTesting/vcs/intellij.performanceTesting.vcs.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/utils/VcsTestUtil.kt b/plugins/performanceTesting/vcs/src/com/intellij/performanceTesting/vcs/VcsTestUtil.kt similarity index 94% rename from plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/utils/VcsTestUtil.kt rename to plugins/performanceTesting/vcs/src/com/intellij/performanceTesting/vcs/VcsTestUtil.kt index 94cb1ad0128e..94f26e68ee0b 100644 --- a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/utils/VcsTestUtil.kt +++ b/plugins/performanceTesting/vcs/src/com/intellij/performanceTesting/vcs/VcsTestUtil.kt @@ -1,4 +1,4 @@ -package com.jetbrains.performancePlugin.utils +package com.intellij.performanceTesting.vcs import com.intellij.openapi.project.Project import com.intellij.openapi.vcs.VcsConfiguration @@ -6,11 +6,9 @@ import com.intellij.openapi.vcs.VcsShowConfirmationOption import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx object VcsTestUtil { - /** * This function modifies 'Preferences->Version Control->Confirmation->When files are created' option */ - @JvmStatic fun provisionVcsAddFileConfirmation(project: Project, fileConfirmation: VcsAddFileConfirmation) { val addFileConfirmationSetting = ProjectLevelVcsManagerEx .getInstanceEx(project) @@ -28,5 +26,4 @@ object VcsTestUtil { DO_NOTHING, DO_SILENTLY } - } \ No newline at end of file diff --git a/plugins/performanceTesting/vcs/src/intellij.performanceTesting.vcs.xml b/plugins/performanceTesting/vcs/src/intellij.performanceTesting.vcs.xml new file mode 100644 index 000000000000..7e59c01f0f7a --- /dev/null +++ b/plugins/performanceTesting/vcs/src/intellij.performanceTesting.vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file