mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CWM-1649 add an extension point to hide refactorings section in Code Editing settings page, use it in CWM guest
GitOrigin-RevId: da57142738bc72ef7cf3d2a6915ad6f9b730ea6a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
557b268ab4
commit
d06b9eb6cb
+14
@@ -0,0 +1,14 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.application.options.editor
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointName
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
interface EditorOptionsPageCustomizer {
|
||||
fun shouldHideRefactoringsSection(): Boolean
|
||||
|
||||
companion object {
|
||||
val EP_NAME = ExtensionPointName<EditorOptionsPageCustomizer>("com.intellij.generalEditorOptionsCustomizer")
|
||||
}
|
||||
}
|
||||
+11
-9
@@ -301,18 +301,20 @@ class EditorCodeEditingConfigurable : BoundCompositeConfigurable<ErrorOptionsPro
|
||||
row { checkBox(highlightScope) }
|
||||
row { checkBox(highlightIdentifierUnderCaret) }
|
||||
}
|
||||
titledRow(message("group.refactorings")) {
|
||||
row {
|
||||
buttonGroup(editorSettings::isVariableInplaceRenameEnabled,
|
||||
editorSettings::setVariableInplaceRenameEnabled) {
|
||||
checkBoxGroup(message("radiogroup.rename.local.variables")) {
|
||||
row { radioButton(message("radiobutton.rename.local.variables.inplace"), value = true) }
|
||||
row { radioButton(message("radiobutton.rename.local.variables.in.dialog"), value = false) }.largeGapAfter()
|
||||
if (!EditorOptionsPageCustomizer.EP_NAME.extensions().anyMatch { it.shouldHideRefactoringsSection() }) {
|
||||
titledRow(message("group.refactorings")) {
|
||||
row {
|
||||
buttonGroup(editorSettings::isVariableInplaceRenameEnabled,
|
||||
editorSettings::setVariableInplaceRenameEnabled) {
|
||||
checkBoxGroup(message("radiogroup.rename.local.variables")) {
|
||||
row { radioButton(message("radiobutton.rename.local.variables.inplace"), value = true) }
|
||||
row { radioButton(message("radiobutton.rename.local.variables.in.dialog"), value = false) }.largeGapAfter()
|
||||
}
|
||||
}
|
||||
}
|
||||
row { checkBox(preselectCheckBox) }
|
||||
row { checkBox(showInlineDialogForCheckBox) }
|
||||
}
|
||||
row { checkBox(preselectCheckBox) }
|
||||
row { checkBox(showInlineDialogForCheckBox) }
|
||||
}
|
||||
titledRow(message("group.error.highlighting")) {
|
||||
row {
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
<with attribute="instance" implements="com.intellij.openapi.options.UnnamedConfigurable" />
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint dynamic="true" name="generalEditorOptionsCustomizer" interface="com.intellij.application.options.editor.EditorOptionsPageCustomizer"/>
|
||||
|
||||
<!--quote handlers-->
|
||||
<extensionPoint name="quoteHandler" beanClass="com.intellij.codeInsight.editorActions.QuoteHandlerEP" dynamic="true">
|
||||
<with attribute="className" implements="com.intellij.codeInsight.editorActions.QuoteHandler"/>
|
||||
|
||||
Reference in New Issue
Block a user