mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Markdown][IDEA-284567] Add searchable options for enabling extensions
GitOrigin-RevId: 32d2459a7705a976ef01b41f5d5f9559dbfe29ed
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f9dede53f7
commit
8d24609b14
@@ -113,6 +113,7 @@ markdown.settings.download.extension.notification.title=Markdown extension downl
|
||||
markdown.settings.download.extension.notification.success.content=Extension files successfully downloaded!
|
||||
markdown.settings.download.extension.notification.failure.content=Failed to download required extension files!
|
||||
markdown.settings.extension.install.label=Install
|
||||
markdown.settings.extension.enable.searchable.option.text=Enable {0} Extension
|
||||
|
||||
markdown.extract.link.extract.duplicates.description={0} has detected {1} duplicate {1,choice,1#link|2#links} that can be replaced with a reference link. Review and replace {1,choice,1#it|2#them}?
|
||||
markdown.extract.link.extract.duplicates.warning=Some duplicate links have different titles. They will be erased during replacement.
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package org.intellij.plugins.markdown.extensions
|
||||
|
||||
import com.intellij.ide.ui.search.SearchableOptionContributor
|
||||
import com.intellij.ide.ui.search.SearchableOptionProcessor
|
||||
import org.intellij.plugins.markdown.MarkdownBundle
|
||||
import org.intellij.plugins.markdown.settings.MarkdownSettingsConfigurable
|
||||
import org.jetbrains.annotations.Nls
|
||||
|
||||
internal class ExtensionSearchableOptionContributor: SearchableOptionContributor() {
|
||||
override fun processOptions(processor: SearchableOptionProcessor) {
|
||||
val extensions = MarkdownExtensionsUtil.collectConfigurableExtensions(enabledOnly = false)
|
||||
for (extension in extensions) {
|
||||
processor.addExtensionOption(extension.displayName)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private fun SearchableOptionProcessor.addExtensionOption(extensionDisplayName: @Nls String) {
|
||||
addOptions(
|
||||
extensionDisplayName,
|
||||
null,
|
||||
MarkdownBundle.message("markdown.settings.extension.enable.searchable.option.text", extensionDisplayName),
|
||||
MarkdownSettingsConfigurable.ID,
|
||||
MarkdownBundle.message("markdown.settings.name"),
|
||||
false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -160,6 +160,7 @@ Includes the following features:</p>
|
||||
|
||||
<applicationService serviceInterface="org.intellij.plugins.markdown.extensions.ExtensionsExternalFilesPathManager"
|
||||
serviceImplementation="org.intellij.plugins.markdown.extensions.ExtensionsExternalFilesPathManager$Impl"/>
|
||||
<search.optionContributor implementation="org.intellij.plugins.markdown.extensions.ExtensionSearchableOptionContributor"/>
|
||||
|
||||
<applicationService serviceInterface="org.intellij.plugins.markdown.ui.preview.accessor.MarkdownLinkOpener"
|
||||
serviceImplementation="org.intellij.plugins.markdown.ui.preview.accessor.impl.MarkdownLinkOpenerImpl"/>
|
||||
|
||||
Reference in New Issue
Block a user