mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[registry] IJPL-162599 Cloud Registry module
(cherry picked from commit 1ee095a80648cab61f459be424aa53c5968ce26d) (cherry picked from commit 3ce94793672e9d676b0bab99023e911193f4efff) IJ-MR-154004 GitOrigin-RevId: 5a69e858a1c20003a85d730668feef0363f5c94b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a4a89601fc
commit
4cc0f4c18e
@@ -19,8 +19,14 @@
|
||||
<module name="intellij.idea.customization.base"/>
|
||||
<module name="intellij.platform.tips"/>
|
||||
</content>
|
||||
|
||||
<xi:include href="/META-INF/common-ide-modules.xml"/>
|
||||
|
||||
<!--suppress XmlPathReference -->
|
||||
<xi:include href="/META-INF/community-extensions.xml">
|
||||
<xi:fallback/>
|
||||
</xi:include>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<applicationService serviceInterface="com.intellij.openapi.updateSettings.UpdateStrategyCustomization"
|
||||
serviceImplementation="com.intellij.openapi.updateSettings.base.ShowWhatIsNewPageAfterUpdateCustomization"
|
||||
|
||||
@@ -526,10 +526,15 @@ private val excludedPaths = java.util.Set.of(
|
||||
"/META-INF/codeWithMeFrontend.xml",
|
||||
)
|
||||
|
||||
private val COMMUNITY_IMPL_EXTENSIONS = setOf(
|
||||
"/META-INF/community-extensions.xml"
|
||||
)
|
||||
|
||||
fun createXIncludePathResolver(includedPlatformModulesPartialList: List<String>, context: BuildContext): XIncludePathResolver {
|
||||
return object : XIncludePathResolver {
|
||||
override fun resolvePath(relativePath: String, base: Path?, isOptional: Boolean, isDynamic: Boolean): Path? {
|
||||
if (isOptional || isDynamic || excludedPaths.contains(relativePath)) {
|
||||
if ((isOptional || isDynamic || excludedPaths.contains(relativePath))
|
||||
&& !COMMUNITY_IMPL_EXTENSIONS.contains(relativePath)) {
|
||||
// It isn't safe to resolve includes at build time if they're optional.
|
||||
// This could lead to issues when running another product using this distribution.
|
||||
// E.g., if the corresponding module is somehow being excluded on runtime.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<extensionPoint name="applicationActivity" interface="com.intellij.ide.ApplicationActivity" dynamic="false"/>
|
||||
<extensionPoint name="registryKey" beanClass="com.intellij.openapi.util.registry.RegistryKeyBean" dynamic="true"/>
|
||||
<extensionPoint name="notificationGroup" beanClass="com.intellij.notification.impl.NotificationGroupEP" dynamic="true"/>
|
||||
<extensionPoint name="registry.managed" interface="com.intellij.openapi.util.registry.ManagedRegistry" dynamic="false"/>
|
||||
</extensionPoints>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<activityTracker implementation="com.intellij.util.MergingUpdateQueueActivityTracker"/>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// 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.util.registry
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointName
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
/**
|
||||
* Marker interface for implementation of provisioner that controls registry keys for teams.
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
interface ManagedRegistry
|
||||
|
||||
private val EP_NAME = ExtensionPointName.create<ManagedRegistry>("com.intellij.registry.managed")
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun getManagedRegistry(): ManagedRegistry? {
|
||||
return EP_NAME.extensionList.firstOrNull()
|
||||
}
|
||||
@@ -24,6 +24,18 @@ c:com.intellij.openapi.util.UserDataHolderBase
|
||||
f:com.intellij.openapi.util.io.NioFiles
|
||||
- *s:copyRecursively(java.nio.file.Path,java.nio.file.Path):V
|
||||
- *s:copyRecursively(java.nio.file.Path,java.nio.file.Path,java.util.function.Consumer):V
|
||||
c:com.intellij.openapi.util.registry.RegistryValue
|
||||
- *f:getSource():com.intellij.openapi.util.registry.RegistryValueSource
|
||||
- *f:setSelectedOption(java.lang.String,com.intellij.openapi.util.registry.RegistryValueSource):V
|
||||
- *:setValue(java.lang.String,com.intellij.openapi.util.registry.RegistryValueSource):V
|
||||
*e:com.intellij.openapi.util.registry.RegistryValueSource
|
||||
- java.lang.Enum
|
||||
- sf:MANAGER:com.intellij.openapi.util.registry.RegistryValueSource
|
||||
- sf:SYSTEM:com.intellij.openapi.util.registry.RegistryValueSource
|
||||
- sf:USER:com.intellij.openapi.util.registry.RegistryValueSource
|
||||
- s:getEntries():kotlin.enums.EnumEntries
|
||||
- s:valueOf(java.lang.String):com.intellij.openapi.util.registry.RegistryValueSource
|
||||
- s:values():com.intellij.openapi.util.registry.RegistryValueSource[]
|
||||
f:com.intellij.openapi.util.text.HtmlChunkUtilKt
|
||||
- *sf:buildChildren(com.intellij.openapi.util.text.HtmlChunk$Element,kotlin.jvm.functions.Function1):com.intellij.openapi.util.text.HtmlChunk$Element
|
||||
- *sf:buildHtml(kotlin.jvm.functions.Function1):java.lang.String
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.intellij.ui.ColorHexUtil
|
||||
import com.intellij.util.containers.ContainerUtil
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Job
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
@@ -34,6 +35,7 @@ open class RegistryValue @Internal constructor(
|
||||
private var doubleCachedValue = Double.NaN
|
||||
private var booleanCachedValue: Boolean? = null
|
||||
|
||||
@ApiStatus.Experimental
|
||||
fun getSource(): RegistryValueSource? {
|
||||
return registry.getStoredProperties().get(key)?.source
|
||||
}
|
||||
@@ -104,6 +106,7 @@ open class RegistryValue @Internal constructor(
|
||||
setSelectedOption(selected, RegistryValueSource.SYSTEM)
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
fun setSelectedOption(selected: String?, source: RegistryValueSource) {
|
||||
val options = asOptions().toMutableList()
|
||||
for ((i, option) in options.withIndex()) {
|
||||
@@ -229,10 +232,11 @@ open class RegistryValue @Internal constructor(
|
||||
setValue(value.toString())
|
||||
}
|
||||
|
||||
fun setValue(value: String) {
|
||||
open fun setValue(value: String) {
|
||||
setValue(value, RegistryValueSource.SYSTEM)
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
open fun setValue(value: String, source: RegistryValueSource) {
|
||||
val globalValueChangeListener = registry.valueChangeListener
|
||||
globalValueChangeListener.beforeValueChanged(this)
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.intellij.openapi.util.registry
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
@ApiStatus.Experimental
|
||||
enum class RegistryValueSource {
|
||||
/**
|
||||
* Values set by user via Registry UI.
|
||||
|
||||
@@ -264,6 +264,7 @@ public class RegistryTest {
|
||||
Element entryElement = new Element("entry");
|
||||
entryElement.setAttribute("key", entry.getKey());
|
||||
entryElement.setAttribute("value", entry.getValue());
|
||||
entryElement.setAttribute("source", "SYSTEM");
|
||||
registryElement.addContent(entryElement);
|
||||
}
|
||||
return registryElement;
|
||||
|
||||
@@ -27,7 +27,7 @@ open class PyCharmCommunityProperties(protected val communityHome: Path) : PyCha
|
||||
productLayout.productImplementationModules = listOf(
|
||||
"intellij.platform.starter",
|
||||
"intellij.pycharm.community",
|
||||
"intellij.platform.whatsNew",
|
||||
"intellij.platform.whatsNew"
|
||||
)
|
||||
productLayout.bundledPluginModules +=
|
||||
sequenceOf(
|
||||
|
||||
@@ -9,8 +9,14 @@
|
||||
<module name="intellij.settingsSync.core"/>
|
||||
<module name="intellij.platform.tips"/>
|
||||
</content>
|
||||
|
||||
<xi:include href="/META-INF/common-ide-modules.xml"/>
|
||||
|
||||
<!--suppress XmlPathReference -->
|
||||
<xi:include href="/META-INF/community-extensions.xml">
|
||||
<xi:fallback/>
|
||||
</xi:include>
|
||||
|
||||
<xi:include href="/META-INF/pycharm-core.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
|
||||
Reference in New Issue
Block a user