mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
experimental ij void
GitOrigin-RevId: c980a4927fabeedda2284695f234ee41652b6db5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
956b017e55
commit
9f566cc5fb
@@ -18,6 +18,7 @@
|
|||||||
<module name="intellij.kotlin.onboarding-promoter"/>
|
<module name="intellij.kotlin.onboarding-promoter"/>
|
||||||
<module name="intellij.platform.experiment"/>
|
<module name="intellij.platform.experiment"/>
|
||||||
<module name="intellij.idea.customization.base"/>
|
<module name="intellij.idea.customization.base"/>
|
||||||
|
<module name="intellij.platform.tips"/>
|
||||||
</content>
|
</content>
|
||||||
<xi:include href="/META-INF/common-ide-modules.xml"/>
|
<xi:include href="/META-INF/common-ide-modules.xml"/>
|
||||||
|
|
||||||
|
|||||||
@@ -176,16 +176,6 @@ abstract class BaseIdeaProperties : JetBrainsProductProperties() {
|
|||||||
productLayout.compatiblePluginsToIgnore = persistentListOf(
|
productLayout.compatiblePluginsToIgnore = persistentListOf(
|
||||||
JavaPluginLayout.MAIN_MODULE_NAME,
|
JavaPluginLayout.MAIN_MODULE_NAME,
|
||||||
)
|
)
|
||||||
additionalModulesToCompile = persistentListOf("intellij.tools.jps.build.standalone")
|
|
||||||
modulesToCompileTests = persistentListOf("intellij.platform.jps.build.tests")
|
modulesToCompileTests = persistentListOf("intellij.platform.jps.build.tests")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 🌲
|
|
||||||
* see KTIJ-30761
|
|
||||||
* @see org.jetbrains.intellij.build.sharedIndexes.PreSharedIndexesGenerator
|
|
||||||
*/
|
|
||||||
protected fun enableKotlinPluginK2ByDefault() {
|
|
||||||
additionalVmOptions += "-Didea.kotlin.plugin.use.k2=true"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.jetbrains.plugin.structure.base.plugin.PluginCreationSuccess
|
|||||||
import com.jetbrains.plugin.structure.base.problems.InvalidDescriptorProblem
|
import com.jetbrains.plugin.structure.base.problems.InvalidDescriptorProblem
|
||||||
import com.jetbrains.plugin.structure.base.problems.PluginProblem
|
import com.jetbrains.plugin.structure.base.problems.PluginProblem
|
||||||
import com.jetbrains.plugin.structure.intellij.plugin.IdePlugin
|
import com.jetbrains.plugin.structure.intellij.plugin.IdePlugin
|
||||||
|
import kotlinx.collections.immutable.plus
|
||||||
import org.jetbrains.intellij.build.SoftwareBillOfMaterials.Companion.Suppliers
|
import org.jetbrains.intellij.build.SoftwareBillOfMaterials.Companion.Suppliers
|
||||||
import org.jetbrains.intellij.build.impl.PlatformJarNames.PLATFORM_CORE_NIO_FS
|
import org.jetbrains.intellij.build.impl.PlatformJarNames.PLATFORM_CORE_NIO_FS
|
||||||
import org.jetbrains.jps.model.module.JpsModule
|
import org.jetbrains.jps.model.module.JpsModule
|
||||||
@@ -39,31 +40,38 @@ abstract class JetBrainsProductProperties : ProductProperties() {
|
|||||||
override suspend fun copyAdditionalFiles(context: BuildContext, targetDir: Path) {
|
override suspend fun copyAdditionalFiles(context: BuildContext, targetDir: Path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun validatePlugin(pluginId: String?, result: PluginCreationResult<IdePlugin>, context: BuildContext): List<PluginProblem> {
|
final override fun validatePlugin(pluginId: String?, result: PluginCreationResult<IdePlugin>, context: BuildContext): List<PluginProblem> {
|
||||||
return buildList {
|
val problems = super.validatePlugin(pluginId, result, context).filterNot {
|
||||||
val problems = super.validatePlugin(pluginId, result, context).filterNot {
|
(
|
||||||
(
|
// FIXME IDEA-356970
|
||||||
// FIXME IDEA-356970
|
pluginId == "com.intellij.plugins.projectFragments" ||
|
||||||
pluginId == "com.intellij.plugins.projectFragments" ||
|
// FIXME IJPL-159498
|
||||||
// FIXME IJPL-159498
|
pluginId == "org.jetbrains.plugins.docker.gateway" || pluginId == "com.intellij.java" || pluginId == "com.intellij.java.ide"
|
||||||
pluginId == "org.jetbrains.plugins.docker.gateway"
|
) && it.message.contains("Service preloading is deprecated") ||
|
||||||
) && it.message.contains("Service preloading is deprecated") ||
|
(
|
||||||
(
|
// FIXME PY-74322
|
||||||
// FIXME PY-74322
|
pluginId == "com.intellij.python.frontend" ||
|
||||||
pluginId == "com.intellij.python.frontend" ||
|
// FIXME AE-121
|
||||||
// FIXME AE-121
|
pluginId == "com.jetbrains.personalization"
|
||||||
pluginId == "com.jetbrains.personalization"
|
) && it.message.contains("Plugin has no dependencies")
|
||||||
) && it.message.contains("Plugin has no dependencies")
|
}
|
||||||
}
|
if (result is PluginCreationSuccess && result.plugin.vendor?.contains("JetBrains") != true) {
|
||||||
addAll(problems)
|
return problems + object : InvalidDescriptorProblem(
|
||||||
if (result is PluginCreationSuccess && result.plugin.vendor?.contains("JetBrains") != true) {
|
descriptorPath = "",
|
||||||
add(object : InvalidDescriptorProblem(
|
detailedMessage = "${result.plugin.pluginId} is published not by JetBrains: ${result.plugin.vendor}"
|
||||||
descriptorPath = "",
|
) {
|
||||||
detailedMessage = "${result.plugin.pluginId} is published not by JetBrains: ${result.plugin.vendor}"
|
override val level = Level.ERROR
|
||||||
) {
|
|
||||||
override val level = Level.ERROR
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return problems
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 🌲
|
||||||
|
* see KTIJ-30761
|
||||||
|
* @see org.jetbrains.intellij.build.sharedIndexes.PreSharedIndexesGenerator
|
||||||
|
*/
|
||||||
|
protected fun enableKotlinPluginK2ByDefault() {
|
||||||
|
additionalVmOptions += "-Didea.kotlin.plugin.use.k2=true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,12 +300,6 @@ abstract class ProductProperties {
|
|||||||
*/
|
*/
|
||||||
val mavenArtifacts: MavenArtifactsProperties = MavenArtifactsProperties()
|
val mavenArtifacts: MavenArtifactsProperties = MavenArtifactsProperties()
|
||||||
|
|
||||||
/**
|
|
||||||
* Specified additional modules (not included into the product layout) which need to be compiled when product is built.
|
|
||||||
* todo get rid of this
|
|
||||||
*/
|
|
||||||
var additionalModulesToCompile: PersistentList<String> = persistentListOf()
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specified modules which tests need to be compiled when product is built.
|
* Specified modules which tests need to be compiled when product is built.
|
||||||
* todo get rid of this
|
* todo get rid of this
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ internal suspend fun buildProduct(request: BuildRequest, createProductProperties
|
|||||||
|
|
||||||
val classifier = computeAdditionalModulesFingerprint(request.additionalModules)
|
val classifier = computeAdditionalModulesFingerprint(request.additionalModules)
|
||||||
val productDirNameWithoutClassifier = if (request.platformPrefix == "Idea") "idea-community" else request.platformPrefix
|
val productDirNameWithoutClassifier = if (request.platformPrefix == "Idea") "idea-community" else request.platformPrefix
|
||||||
val productDirName = (productDirNameWithoutClassifier + classifier).takeLast(255)
|
val productDirName = (productDirNameWithoutClassifier + (if (System.getProperty("intellij.build.minimal").toBoolean()) "-ij-void" else "") + classifier).takeLast(255)
|
||||||
|
|
||||||
val buildDir = withContext(Dispatchers.IO.limitedParallelism(4)) {
|
val buildDir = withContext(Dispatchers.IO.limitedParallelism(4)) {
|
||||||
val buildDir = rootDir.resolve(productDirName)
|
val buildDir = rootDir.resolve(productDirName)
|
||||||
@@ -302,7 +302,6 @@ private suspend fun collectModulesToCompileForDistribution(context: BuildContext
|
|||||||
if (context.isEmbeddedJetBrainsClientEnabled) {
|
if (context.isEmbeddedJetBrainsClientEnabled) {
|
||||||
result.add(context.productProperties.embeddedJetBrainsClientMainModule!!)
|
result.add(context.productProperties.embeddedJetBrainsClientMainModule!!)
|
||||||
}
|
}
|
||||||
result.addAll(context.productProperties.additionalModulesToCompile)
|
|
||||||
result.add("intellij.idea.community.build.tasks")
|
result.add("intellij.idea.community.build.tasks")
|
||||||
result.add("intellij.platform.images.build")
|
result.add("intellij.platform.images.build")
|
||||||
result.removeAll(productLayout.excludedModuleNames)
|
result.removeAll(productLayout.excludedModuleNames)
|
||||||
@@ -548,7 +547,13 @@ internal suspend fun createProductProperties(productConfiguration: ProductConfig
|
|||||||
|
|
||||||
return spanBuilder("create product properties").use {
|
return spanBuilder("create product properties").use {
|
||||||
val productPropertiesClass = try {
|
val productPropertiesClass = try {
|
||||||
classLoader.loadClass(productConfiguration.className)
|
val className = if (System.getProperty("intellij.build.minimal").toBoolean()) {
|
||||||
|
"org.jetbrains.intellij.build.IjVoidProperties"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
productConfiguration.className
|
||||||
|
}
|
||||||
|
classLoader.loadClass(className)
|
||||||
}
|
}
|
||||||
catch (_: ClassNotFoundException) {
|
catch (_: ClassNotFoundException) {
|
||||||
val classPathString = classPathFiles.joinToString(separator = "\n") { file ->
|
val classPathString = classPathFiles.joinToString(separator = "\n") { file ->
|
||||||
|
|||||||
@@ -531,7 +531,6 @@ private suspend fun checkProductProperties(context: BuildContext) {
|
|||||||
checkPaths2(properties.brandingResourcePaths, "productProperties.brandingResourcePaths")
|
checkPaths2(properties.brandingResourcePaths, "productProperties.brandingResourcePaths")
|
||||||
checkPaths2(properties.additionalIDEPropertiesFilePaths, "productProperties.additionalIDEPropertiesFilePaths")
|
checkPaths2(properties.additionalIDEPropertiesFilePaths, "productProperties.additionalIDEPropertiesFilePaths")
|
||||||
checkPaths2(properties.additionalDirectoriesWithLicenses, "productProperties.additionalDirectoriesWithLicenses")
|
checkPaths2(properties.additionalDirectoriesWithLicenses, "productProperties.additionalDirectoriesWithLicenses")
|
||||||
checkModules(properties.additionalModulesToCompile, "productProperties.additionalModulesToCompile", context)
|
|
||||||
checkModule(properties.applicationInfoModule, "productProperties.applicationInfoModule", context)
|
checkModule(properties.applicationInfoModule, "productProperties.applicationInfoModule", context)
|
||||||
properties.embeddedJetBrainsClientMainModule?.let { embeddedJetBrainsClientMainModule ->
|
properties.embeddedJetBrainsClientMainModule?.let { embeddedJetBrainsClientMainModule ->
|
||||||
checkModule(embeddedJetBrainsClientMainModule, "productProperties.embeddedJetBrainsClientMainModule", context)
|
checkModule(embeddedJetBrainsClientMainModule, "productProperties.embeddedJetBrainsClientMainModule", context)
|
||||||
|
|||||||
@@ -478,28 +478,28 @@ private suspend fun validatePlugins(context: BuildContext, pluginSpecs: Collecti
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
launch {
|
launch {
|
||||||
validatePlugin(path = path, context = context, span = span)
|
validatePlugin(file = path, context = context, span = span)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun validatePlugin(path: Path, context: BuildContext, span: Span) {
|
private fun validatePlugin(file: Path, context: BuildContext, span: Span) {
|
||||||
val pluginManager = IdePluginManager.createManager()
|
val pluginManager = IdePluginManager.createManager()
|
||||||
val result = pluginManager.createPlugin(path, validateDescriptor = true)
|
val result = pluginManager.createPlugin(pluginFile = file, validateDescriptor = true)
|
||||||
// todo fix AddStatisticsEventLogListenerTemporary
|
// todo fix AddStatisticsEventLogListenerTemporary
|
||||||
val id = when (result) {
|
val id = when (result) {
|
||||||
is PluginCreationSuccess -> result.plugin.pluginId
|
is PluginCreationSuccess -> result.plugin.pluginId
|
||||||
is PluginCreationFail -> (pluginManager.createPlugin(path, validateDescriptor = false) as? PluginCreationSuccess)?.plugin?.pluginId
|
is PluginCreationFail -> (pluginManager.createPlugin(pluginFile = file, validateDescriptor = false) as? PluginCreationSuccess)?.plugin?.pluginId
|
||||||
}
|
}
|
||||||
val problems = context.productProperties.validatePlugin(id, result, context)
|
val problems = context.productProperties.validatePlugin(id, result, context)
|
||||||
if (problems.isNotEmpty()) {
|
if (problems.isNotEmpty()) {
|
||||||
span.addEvent("failed", Attributes.of(AttributeKey.stringKey("path"), "$path"))
|
span.addEvent("failed", Attributes.of(AttributeKey.stringKey("path"), "$file"))
|
||||||
context.messages.reportBuildProblem(
|
context.messages.reportBuildProblem(
|
||||||
problems.joinToString(
|
problems.joinToString(
|
||||||
prefix = "${id ?: path}: ",
|
prefix = "${id ?: file}: ",
|
||||||
separator = ". ",
|
separator = ". ",
|
||||||
), identity = "${id ?: path}"
|
), identity = "${id ?: file}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.openapi.application.impl;
|
package com.intellij.openapi.application.impl;
|
||||||
|
|
||||||
import com.intellij.ReviseWhenPortedToJDK;
|
import com.intellij.ReviseWhenPortedToJDK;
|
||||||
@@ -54,9 +54,9 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
private String myCopyrightStart = "2000";
|
private String myCopyrightStart = "2000";
|
||||||
private String myShortCompanyName;
|
private String myShortCompanyName;
|
||||||
private String myCompanyUrl = "https://www.jetbrains.com/";
|
private String myCompanyUrl = "https://www.jetbrains.com/";
|
||||||
private String mySplashImageUrl;
|
private @Nullable String splashImageUrl;
|
||||||
private String myEapSplashImageUrl;
|
private @Nullable String eapSplashImageUrl;
|
||||||
private String mySvgIconUrl;
|
private String svgIconUrl;
|
||||||
private String mySvgEapIconUrl;
|
private String mySvgEapIconUrl;
|
||||||
private String mySmallSvgIconUrl;
|
private String mySmallSvgIconUrl;
|
||||||
private String mySmallSvgEapIconUrl;
|
private String mySmallSvgEapIconUrl;
|
||||||
@@ -79,7 +79,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
private boolean myShowWhatsNewOnUpdate;
|
private boolean myShowWhatsNewOnUpdate;
|
||||||
private String myWinKeymapUrl;
|
private String myWinKeymapUrl;
|
||||||
private String myMacKeymapUrl;
|
private String myMacKeymapUrl;
|
||||||
private boolean myEAP;
|
private boolean isEap;
|
||||||
private boolean myHasHelp = true;
|
private boolean myHasHelp = true;
|
||||||
private boolean myHasContextHelp = true;
|
private boolean myHasContextHelp = true;
|
||||||
private String myWebHelpUrl = "https://www.jetbrains.com/idea/webhelp/";
|
private String myWebHelpUrl = "https://www.jetbrains.com/idea/webhelp/";
|
||||||
@@ -114,8 +114,8 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
myPatchVersion = child.getAttributeValue("patch");
|
myPatchVersion = child.getAttributeValue("patch");
|
||||||
myFullVersionFormat = child.getAttributeValue("full");
|
myFullVersionFormat = child.getAttributeValue("full");
|
||||||
myCodeName = child.getAttributeValue("codename");
|
myCodeName = child.getAttributeValue("codename");
|
||||||
myEAP = Boolean.parseBoolean(child.getAttributeValue("eap"));
|
isEap = Boolean.parseBoolean(child.getAttributeValue("eap"));
|
||||||
myVersionSuffix = child.getAttributeValue("suffix", myEAP ? "EAP" : null);
|
myVersionSuffix = child.getAttributeValue("suffix", isEap ? "EAP" : null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -133,17 +133,17 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "logo": {
|
case "logo": {
|
||||||
mySplashImageUrl = getAttributeValue(child, "url");
|
splashImageUrl = getAttributeValue(child, "url");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "logo-eap": {
|
case "logo-eap": {
|
||||||
myEapSplashImageUrl = getAttributeValue(child, "url");
|
eapSplashImageUrl = getAttributeValue(child, "url");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "icon": {
|
case "icon": {
|
||||||
mySvgIconUrl = child.getAttributeValue("svg");
|
svgIconUrl = child.getAttributeValue("svg");
|
||||||
mySmallSvgIconUrl = child.getAttributeValue("svg-small");
|
mySmallSvgIconUrl = child.getAttributeValue("svg-small");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -271,7 +271,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
readPluginInfo(null);
|
readPluginInfo(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Objects.requireNonNull(mySvgIconUrl, "Missing attribute: //icon@svg");
|
Objects.requireNonNull(svgIconUrl, "Missing attribute: //icon@svg");
|
||||||
Objects.requireNonNull(mySmallSvgIconUrl, "Missing attribute: //icon@svg-small");
|
Objects.requireNonNull(mySmallSvgIconUrl, "Missing attribute: //icon@svg-small");
|
||||||
|
|
||||||
overrideFromProperties();
|
overrideFromProperties();
|
||||||
@@ -408,7 +408,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
@Override
|
@Override
|
||||||
public String getVersionName() {
|
public String getVersionName() {
|
||||||
String fullName = ApplicationNamesInfo.getInstance().getFullProductName();
|
String fullName = ApplicationNamesInfo.getInstance().getFullProductName();
|
||||||
if (myEAP && myCodeName != null && !myCodeName.isEmpty()) {
|
if (isEap && myCodeName != null && !myCodeName.isEmpty()) {
|
||||||
fullName += " (" + myCodeName + ")";
|
fullName += " (" + myCodeName + ")";
|
||||||
}
|
}
|
||||||
return fullName;
|
return fullName;
|
||||||
@@ -430,8 +430,8 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSplashImageUrl() {
|
public @Nullable String getSplashImageUrl() {
|
||||||
return isEAP() && myEapSplashImageUrl != null ? myEapSplashImageUrl : mySplashImageUrl;
|
return isEap && eapSplashImageUrl != null ? eapSplashImageUrl : splashImageUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -441,7 +441,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
|
|
||||||
@ApiStatus.Internal
|
@ApiStatus.Internal
|
||||||
public @NotNull String getApplicationSvgIconUrl(boolean isEap) {
|
public @NotNull String getApplicationSvgIconUrl(boolean isEap) {
|
||||||
return isEap && mySvgEapIconUrl != null ? mySvgEapIconUrl : mySvgIconUrl;
|
return isEap && mySvgEapIconUrl != null ? mySvgEapIconUrl : svgIconUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -461,17 +461,17 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEAP() {
|
public boolean isEAP() {
|
||||||
return myEAP;
|
return isEap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isMajorEAP() {
|
public boolean isMajorEAP() {
|
||||||
return myEAP && (myMinorVersion == null || myMinorVersion.indexOf('.') < 0);
|
return isEap && (myMinorVersion == null || myMinorVersion.indexOf('.') < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPreview() {
|
public boolean isPreview() {
|
||||||
return !myEAP && myVersionSuffix != null && ("Preview".equalsIgnoreCase(myVersionSuffix) || myVersionSuffix.startsWith("RC"));
|
return !isEap && myVersionSuffix != null && ("Preview".equalsIgnoreCase(myVersionSuffix) || myVersionSuffix.startsWith("RC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2022 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.ide.util
|
package com.intellij.ide.util
|
||||||
|
|
||||||
import com.intellij.openapi.components.service
|
import com.intellij.openapi.components.service
|
||||||
@@ -27,8 +27,11 @@ interface TipAndTrickManager {
|
|||||||
fun canShowDialogAutomaticallyNow(project: Project): Boolean
|
fun canShowDialogAutomaticallyNow(project: Project): Boolean
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@JvmField
|
||||||
val DISABLE_TIPS_FOR_PROJECT: Key<Boolean> = Key.create("DISABLE_TIPS_FOR_PROJECT")
|
val DISABLE_TIPS_FOR_PROJECT: Key<Boolean> = Key.create("DISABLE_TIPS_FOR_PROJECT")
|
||||||
|
|
||||||
fun getInstance(): TipAndTrickManager = service()
|
fun getInstance(): TipAndTrickManager {
|
||||||
|
return service()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,4 +14,5 @@
|
|||||||
</content>
|
</content>
|
||||||
|
|
||||||
<xi:include href="/META-INF/vcs-modules.xml"/>
|
<xi:include href="/META-INF/vcs-modules.xml"/>
|
||||||
|
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
@@ -22,7 +22,5 @@
|
|||||||
<module name="intellij.platform.debugger.impl.backend"/>
|
<module name="intellij.platform.debugger.impl.backend"/>
|
||||||
|
|
||||||
<module name="intellij.platform.frontend"/>
|
<module name="intellij.platform.frontend"/>
|
||||||
|
|
||||||
<module name="intellij.platform.tips"/>
|
|
||||||
</content>
|
</content>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
@@ -4,9 +4,10 @@ package com.intellij.platform.tips
|
|||||||
import com.intellij.ide.plugins.DynamicPluginListener
|
import com.intellij.ide.plugins.DynamicPluginListener
|
||||||
import com.intellij.ide.plugins.IdeaPluginDescriptor
|
import com.intellij.ide.plugins.IdeaPluginDescriptor
|
||||||
import com.intellij.ide.util.TipAndTrickManager
|
import com.intellij.ide.util.TipAndTrickManager
|
||||||
|
import com.intellij.openapi.components.serviceIfCreated
|
||||||
|
|
||||||
internal class CloseTipDialogOnPluginUnloadingListener : DynamicPluginListener {
|
private class CloseTipDialogOnPluginUnloadingListener : DynamicPluginListener {
|
||||||
override fun beforePluginUnload(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) {
|
override fun beforePluginUnload(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) {
|
||||||
TipAndTrickManager.getInstance().closeTipDialog()
|
serviceIfCreated<TipAndTrickManager>()?.closeTipDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2022 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 training.featuresSuggester
|
package training.featuresSuggester
|
||||||
|
|
||||||
import com.intellij.openapi.Disposable
|
import com.intellij.openapi.Disposable
|
||||||
@@ -13,7 +13,7 @@ abstract class FeatureSuggesterTest : BasePlatformTestCase() {
|
|||||||
protected abstract val testingSuggesterId: String
|
protected abstract val testingSuggesterId: String
|
||||||
|
|
||||||
lateinit var expectedSuggestion: Suggestion
|
lateinit var expectedSuggestion: Suggestion
|
||||||
private lateinit var disposable: Disposable
|
private var disposable: Disposable? = null
|
||||||
|
|
||||||
override fun setUp() {
|
override fun setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
@@ -23,12 +23,12 @@ abstract class FeatureSuggesterTest : BasePlatformTestCase() {
|
|||||||
FeatureSuggester.suggesters.forEach { settings.setEnabled(it.id, true) }
|
FeatureSuggester.suggesters.forEach { settings.setEnabled(it.id, true) }
|
||||||
expectedSuggestion = NoSuggestion
|
expectedSuggestion = NoSuggestion
|
||||||
disposable = Disposer.newDisposable()
|
disposable = Disposer.newDisposable()
|
||||||
FeatureSuggesterTestUtils.subscribeToSuggestions(myFixture.project, disposable) { suggestion -> expectedSuggestion = suggestion }
|
FeatureSuggesterTestUtils.subscribeToSuggestions(myFixture.project, disposable!!) { suggestion -> expectedSuggestion = suggestion }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun tearDown() {
|
override fun tearDown() {
|
||||||
try {
|
try {
|
||||||
Disposer.dispose(disposable)
|
disposable?.let { Disposer.dispose(it) }
|
||||||
}
|
}
|
||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
addSuppressedException(e)
|
addSuppressedException(e)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
<module name="intellij.platform.ide.newUiOnboarding"/>
|
<module name="intellij.platform.ide.newUiOnboarding"/>
|
||||||
<module name="intellij.platform.ml.embeddings"/>
|
<module name="intellij.platform.ml.embeddings"/>
|
||||||
<module name="intellij.ide.startup.importSettings"/>
|
<module name="intellij.ide.startup.importSettings"/>
|
||||||
|
<module name="intellij.platform.tips"/>
|
||||||
</content>
|
</content>
|
||||||
<xi:include href="/META-INF/common-ide-modules.xml"/>
|
<xi:include href="/META-INF/common-ide-modules.xml"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user