mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
[Markdown] Remove unused registry keys
GitOrigin-RevId: ff131fb0bfb9af753bc8389df57fa0d12e5d4cbd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
40eb6b72e6
commit
9339971a6c
@@ -69,9 +69,7 @@ open class MarkdownDefaultMarkerProcessor(
|
||||
add(ListMarkerProvider())
|
||||
add(HtmlBlockProvider())
|
||||
add(DefinitionListMarkerProvider())
|
||||
if (FrontMatterHeaderMarkerProvider.isFrontMatterSupportEnabled()) {
|
||||
add(FrontMatterHeaderMarkerProvider())
|
||||
}
|
||||
add(FrontMatterHeaderMarkerProvider())
|
||||
add(HorizontalRuleProvider())
|
||||
add(GitHubTableMarkerProvider())
|
||||
add(AtxHeaderProvider())
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.intellij.plugins.markdown.lang.parser.blocks.frontmatter
|
||||
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import org.intellij.markdown.MarkdownElementType
|
||||
import org.intellij.markdown.parser.LookaheadText
|
||||
import org.intellij.markdown.parser.MarkerProcessor
|
||||
@@ -97,10 +96,5 @@ class FrontMatterHeaderMarkerProvider: MarkerBlockProvider<MarkerProcessor.State
|
||||
internal fun isTomlDelimiters(opening: String, closing: String): Boolean {
|
||||
return isTomlDelimiterLine(opening) && isTomlDelimiterLine(closing)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isFrontMatterSupportEnabled(): Boolean {
|
||||
return Registry.`is`("markdown.experimental.frontmatter.support.enable", false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,16 +9,12 @@ import com.jetbrains.jsonSchema.extension.JsonSchemaFileProvider
|
||||
import com.jetbrains.jsonSchema.extension.JsonSchemaProviderFactory
|
||||
import com.jetbrains.jsonSchema.extension.SchemaType
|
||||
import org.intellij.plugins.markdown.frontmatter.FrontMatterBundle
|
||||
import org.intellij.plugins.markdown.lang.parser.blocks.frontmatter.FrontMatterHeaderMarkerProvider
|
||||
import org.intellij.plugins.markdown.lang.psi.impl.MarkdownFrontMatterHeader
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
internal class FrontMatterHeaderJsonSchemaFileProvider(private val project: Project): JsonSchemaFileProvider {
|
||||
override fun isAvailable(file: VirtualFile): Boolean {
|
||||
if (!FrontMatterHeaderMarkerProvider.isFrontMatterSupportEnabled()) {
|
||||
return false
|
||||
}
|
||||
return runReadAction { isInjectedFrontMatter(file) }
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,9 @@ package org.intellij.plugins.markdown.frontmatter.header
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.jetbrains.jsonSchema.extension.JsonSchemaFileProvider
|
||||
import com.jetbrains.jsonSchema.extension.JsonSchemaProviderFactory
|
||||
import org.intellij.plugins.markdown.lang.parser.blocks.frontmatter.FrontMatterHeaderMarkerProvider
|
||||
|
||||
internal class FrontMatterHeaderJsonSchemaProviderFactory: JsonSchemaProviderFactory {
|
||||
override fun getProviders(project: Project): MutableList<JsonSchemaFileProvider> {
|
||||
if (!FrontMatterHeaderMarkerProvider.isFrontMatterSupportEnabled()) {
|
||||
return mutableListOf()
|
||||
}
|
||||
return mutableListOf(FrontMatterHeaderJsonSchemaFileProvider(project))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,21 +407,12 @@
|
||||
defaultValue="false"
|
||||
description="Temporarily disable the action of the import docs from google"/>
|
||||
|
||||
<registryKey key="markdown.google.accounts.enable"
|
||||
defaultValue="false"
|
||||
description="Temporarily disabling the use of Google accounts, as the functionality is available only for internal users"/>
|
||||
|
||||
<registryKey key="markdown.experimental.boundary.precise.scroll.enable"
|
||||
defaultValue="true"
|
||||
description="Enables precise scrolling on the document boundaries (direct passing of scroll events from IDE to JCEF preview).
|
||||
Any opened Markdown editors should be manually reopened.
|
||||
Use 'ide.browser.jcef.osr.wheelRotation.factor' to adjust swing's mouse wheel event multipler."/>
|
||||
|
||||
<registryKey key="markdown.experimental.frontmatter.support.enable"
|
||||
defaultValue="true"
|
||||
description="Enables experimental front matter support"
|
||||
restartRequired="true"/>
|
||||
|
||||
<registryKey key="markdown.experimental.header.level.inference.enable"
|
||||
defaultValue="false"
|
||||
description="Enables experimental support for inferring header level"/>
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
package org.intellij.plugins.markdown.formatter
|
||||
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase
|
||||
import com.intellij.testFramework.RegistryKeyRule
|
||||
import org.intellij.plugins.markdown.formatter.MarkdownFormatterTest.Companion.performReformatting
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.JUnit4
|
||||
|
||||
@RunWith(JUnit4::class)
|
||||
class FrontMatterFormatterTest: LightPlatformCodeInsightTestCase() {
|
||||
@Rule
|
||||
@JvmField
|
||||
val rule = RegistryKeyRule("markdown.experimental.frontmatter.support.enable", true)
|
||||
|
||||
@Test
|
||||
fun `test formatter does not affect frontmatter header content`() {
|
||||
// language=Markdown
|
||||
|
||||
@@ -5,10 +5,8 @@ import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.vfs.CharsetToolkit
|
||||
import com.intellij.psi.impl.DebugUtil
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase
|
||||
import com.intellij.testFramework.RegistryKeyRule
|
||||
import junit.framework.TestCase
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.JUnit4
|
||||
@@ -16,10 +14,6 @@ import java.io.File
|
||||
|
||||
@RunWith(JUnit4::class)
|
||||
class FrontMatterParserTest: LightPlatformCodeInsightTestCase() {
|
||||
@Rule
|
||||
@JvmField
|
||||
val rule = RegistryKeyRule("markdown.experimental.frontmatter.support.enable", true)
|
||||
|
||||
@Test
|
||||
fun `test yaml header`() = doTest()
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@ package org.intellij.plugins.markdown.psi
|
||||
|
||||
import com.intellij.lang.Language
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase
|
||||
import com.intellij.testFramework.RegistryKeyRule
|
||||
import org.jetbrains.yaml.YAMLLanguage
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.JUnit4
|
||||
@@ -12,9 +10,6 @@ import org.toml.lang.TomlLanguage
|
||||
|
||||
@RunWith(JUnit4::class)
|
||||
class FrontMatterInjectionTest: LightPlatformCodeInsightTestCase() {
|
||||
@get:Rule
|
||||
val rule = RegistryKeyRule("markdown.experimental.frontmatter.support.enable", true)
|
||||
|
||||
@Test
|
||||
fun `test yaml gets injected`() {
|
||||
val content = """
|
||||
|
||||
@@ -4,18 +4,12 @@ import com.intellij.openapi.application.runWriteActionAndWait
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import com.intellij.psi.ElementManipulators
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase
|
||||
import com.intellij.testFramework.RegistryKeyRule
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.JUnit4
|
||||
|
||||
@RunWith(JUnit4::class)
|
||||
class MarkdownFrontMatterManipulatorSanityTest: LightPlatformCodeInsightTestCase() {
|
||||
@Rule
|
||||
@JvmField
|
||||
val rule = RegistryKeyRule("markdown.experimental.frontmatter.support.enable", true)
|
||||
|
||||
@Test
|
||||
fun `test replace`() {
|
||||
// language=Markdown
|
||||
|
||||
Reference in New Issue
Block a user