From 37aec65948fd0fac775927a02f0d329c8cdb7e11 Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Mon, 22 Dec 2025 11:34:52 +0100 Subject: [PATCH] [platform] IJPL-224518 Cleanup private modifier usages with extensions/services in intellij.platform.diff.impl GitOrigin-RevId: 2a06052b967e8d6e74bba1828e5a98f589bc14eb --- .../com/intellij/diff/actions/ShowBlankDiffWindowAction.kt | 2 +- .../src/com/intellij/diff/applications/DiffApplication.kt | 2 +- .../intellij/diff/editor/DefaultDiffFileEditorCustomizer.kt | 6 +++--- .../com/intellij/diff/editor/DiffEditorTabTitleProvider.kt | 2 +- .../src/com/intellij/diff/editor/DiffFileEditorProvider.kt | 2 +- .../src/com/intellij/diff/editor/DiffFileIconProvider.kt | 2 +- .../diff/merge/MergeThreesideLineStatusMarkerRenderer.kt | 2 +- .../com/intellij/diff/tools/combined/CombinedDiffBlocks.kt | 4 ++-- .../com/intellij/diff/tools/combined/CombinedDiffMainUI.kt | 4 ++-- .../com/intellij/diff/tools/combined/CombinedDiffTool.kt | 2 +- .../intellij/openapi/vcs/changes/EditorTabDiffPreview.kt | 2 +- .../intellij/openapi/vcs/ex/LineStatusMarkerPopupService.kt | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/platform/diff-impl/src/com/intellij/diff/actions/ShowBlankDiffWindowAction.kt b/platform/diff-impl/src/com/intellij/diff/actions/ShowBlankDiffWindowAction.kt index bf4c3e54416c..77c9789174df 100644 --- a/platform/diff-impl/src/com/intellij/diff/actions/ShowBlankDiffWindowAction.kt +++ b/platform/diff-impl/src/com/intellij/diff/actions/ShowBlankDiffWindowAction.kt @@ -138,7 +138,7 @@ internal class SwitchToRecentEditorActionGroup : ActionGroup(), DumbAware { return ActionUpdateThread.EDT } - private class MySwitchAction(val content: RecentBlankContent) : BlankSwitchContentActionBase() { + internal class MySwitchAction(val content: RecentBlankContent) : BlankSwitchContentActionBase() { init { templatePresentation.setTextWithMnemonic { val text = content.text diff --git a/platform/diff-impl/src/com/intellij/diff/applications/DiffApplication.kt b/platform/diff-impl/src/com/intellij/diff/applications/DiffApplication.kt index c62483a6864f..9dc4805c0fb1 100644 --- a/platform/diff-impl/src/com/intellij/diff/applications/DiffApplication.kt +++ b/platform/diff-impl/src/com/intellij/diff/applications/DiffApplication.kt @@ -34,7 +34,7 @@ import kotlinx.coroutines.withContext import java.awt.event.WindowAdapter import java.awt.event.WindowEvent -private class DiffApplication : ApplicationStarterBase(/* ...possibleArgumentsCount = */ 0, 2, 3) { +internal class DiffApplication : ApplicationStarterBase(/* ...possibleArgumentsCount = */ 0, 2, 3) { override val commandName: String get() = "diff" override val usageMessage: String get() { diff --git a/platform/diff-impl/src/com/intellij/diff/editor/DefaultDiffFileEditorCustomizer.kt b/platform/diff-impl/src/com/intellij/diff/editor/DefaultDiffFileEditorCustomizer.kt index 60dc7866b140..c1277e718961 100644 --- a/platform/diff-impl/src/com/intellij/diff/editor/DefaultDiffFileEditorCustomizer.kt +++ b/platform/diff-impl/src/com/intellij/diff/editor/DefaultDiffFileEditorCustomizer.kt @@ -18,7 +18,7 @@ internal val IS_DIFF_FILE_EDITOR: Key = Key.create("IS_DEFAULT_DIFF_EDI @ApiStatus.Internal val CUSTOM_DIFF_ESCAPE_HANDLER: Key = Key.create("CUSTOM_DIFF_ESCAPE_HANDLER") -private class DefaultDiffFileEditorCustomizer : DiffRequestProcessorEditorCustomizer { +internal class DefaultDiffFileEditorCustomizer : DiffRequestProcessorEditorCustomizer { override fun customize(file: VirtualFile, editor: FileEditor, context: DiffContext) { registerEscapeAction(editor) @@ -44,9 +44,9 @@ private class DefaultDiffFileEditorCustomizer : DiffRequestProcessorEditorCustom } } -private class DiffEditorEscapeDelegatingAction(delegate: AnAction) : AnActionWrapper(delegate), DiffEditorEscapeAction +internal class DiffEditorEscapeDelegatingAction(delegate: AnAction) : AnActionWrapper(delegate), DiffEditorEscapeAction -private class CloseDiffEditorAction : DumbAwareAction(), DiffEditorEscapeAction, ActionRemoteBehaviorSpecification.Frontend { +internal class CloseDiffEditorAction : DumbAwareAction(), DiffEditorEscapeAction, ActionRemoteBehaviorSpecification.Frontend { override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT override fun update(e: AnActionEvent) { diff --git a/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorTabTitleProvider.kt b/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorTabTitleProvider.kt index 65bb5376d6bd..930c47184a5a 100644 --- a/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorTabTitleProvider.kt +++ b/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorTabTitleProvider.kt @@ -13,7 +13,7 @@ import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vfs.VirtualFile import org.jetbrains.annotations.CalledInAny -private class DiffEditorTabTitleProvider : EditorTabTitleProvider, DumbAware { +internal class DiffEditorTabTitleProvider : EditorTabTitleProvider, DumbAware { override fun getEditorTabTitle(project: Project, file: VirtualFile): @NlsContexts.TabTitle String? { val title = getEditorTabName(project, file) ?: return null return shortenTitleIfNeeded(project, file, title) diff --git a/platform/diff-impl/src/com/intellij/diff/editor/DiffFileEditorProvider.kt b/platform/diff-impl/src/com/intellij/diff/editor/DiffFileEditorProvider.kt index 991788ca1754..1e84d3cc9781 100644 --- a/platform/diff-impl/src/com/intellij/diff/editor/DiffFileEditorProvider.kt +++ b/platform/diff-impl/src/com/intellij/diff/editor/DiffFileEditorProvider.kt @@ -16,7 +16,7 @@ import org.jetbrains.annotations.NonNls @NonNls private const val DIFF_EDITOR_PROVIDER_ID = "DiffEditor" -private class DiffFileEditorProvider : DefaultPlatformFileEditorProvider, StructureViewFileEditorProvider, DumbAware { +internal class DiffFileEditorProvider : DefaultPlatformFileEditorProvider, StructureViewFileEditorProvider, DumbAware { override fun accept(project: Project, file: VirtualFile): Boolean = file is DiffViewerVirtualFile override fun acceptRequiresReadAction() = false diff --git a/platform/diff-impl/src/com/intellij/diff/editor/DiffFileIconProvider.kt b/platform/diff-impl/src/com/intellij/diff/editor/DiffFileIconProvider.kt index 44b5a4e3f60d..c6de96ff92e8 100644 --- a/platform/diff-impl/src/com/intellij/diff/editor/DiffFileIconProvider.kt +++ b/platform/diff-impl/src/com/intellij/diff/editor/DiffFileIconProvider.kt @@ -7,7 +7,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile import javax.swing.Icon -private class DiffFileIconProvider : FileIconProvider { +internal class DiffFileIconProvider : FileIconProvider { override fun getIcon(file: VirtualFile, flags: Int, project: Project?): Icon? { if (file is DiffVirtualFileBase) { return AllIcons.Actions.Diff diff --git a/platform/diff-impl/src/com/intellij/diff/merge/MergeThreesideLineStatusMarkerRenderer.kt b/platform/diff-impl/src/com/intellij/diff/merge/MergeThreesideLineStatusMarkerRenderer.kt index fb0ffabae095..7e407bd2ac35 100644 --- a/platform/diff-impl/src/com/intellij/diff/merge/MergeThreesideLineStatusMarkerRenderer.kt +++ b/platform/diff-impl/src/com/intellij/diff/merge/MergeThreesideLineStatusMarkerRenderer.kt @@ -64,7 +64,7 @@ internal class MergeThreesideLineStatusMarkerRenderer(private val tracker: LineS } } -private class RollbackLineStatusRangeAction(editor: Editor, private val tracker: LineStatusTrackerBase<*>, range: Range) : +internal class RollbackLineStatusRangeAction(editor: Editor, private val tracker: LineStatusTrackerBase<*>, range: Range) : LineStatusMarkerPopupActions.RangeMarkerAction(editor, tracker, range, IdeActions.SELECTED_CHANGES_ROLLBACK) { override fun isEnabled(editor: Editor, range: Range): Boolean { return true diff --git a/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffBlocks.kt b/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffBlocks.kt index 4124d9286574..daddb87352fa 100644 --- a/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffBlocks.kt +++ b/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffBlocks.kt @@ -137,8 +137,8 @@ private class CombinedSimpleDiffHeader(project: Project, override fun getSelectionBackground(state: State): Color = CombinedDiffUI.BLOCK_HEADER_BACKGROUND override fun changeBackgroundOnHover(state: State): Boolean = true - private class SelectableFilePathLabel(private val project: Project, - private val path: FilePath) : DumbAwareAction(), CustomComponentAction { + internal class SelectableFilePathLabel(private val project: Project, + private val path: FilePath) : DumbAwareAction(), CustomComponentAction { private val checkBox = CheckBox("").apply { background = UIUtil.getListBackground() } diff --git a/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffMainUI.kt b/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffMainUI.kt index c7709cd9d6ce..b60b9be96a7a 100644 --- a/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffMainUI.kt +++ b/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffMainUI.kt @@ -187,7 +187,7 @@ class CombinedDiffMainUI(private val model: CombinedDiffModel, private val goToC } } - private class MyDiffToolChooser( + internal class MyDiffToolChooser( val context: DiffContext, val model: CombinedDiffModel, val settings: DiffSettings, @@ -291,7 +291,7 @@ class CombinedDiffMainUI(private val model: CombinedDiffModel, private val goToC } } -private class ShowActionGroupPopupAction( +internal class ShowActionGroupPopupAction( private val parentComponent: JComponent, private val popupActionGroup: DefaultActionGroup ) : DumbAwareAction() { diff --git a/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffTool.kt b/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffTool.kt index f9d1f0157c05..4a131b4a0c97 100644 --- a/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffTool.kt +++ b/platform/diff-impl/src/com/intellij/diff/tools/combined/CombinedDiffTool.kt @@ -14,7 +14,7 @@ internal interface CombinedDiffTool : DiffTool * This tool intended only for persistence purpose. * Combined diff viewer will be created by the corresponding [CombinedDiffComponentProcessor]. */ -private class CombinedSideBySideDiffTool : CombinedDiffTool { +internal class CombinedSideBySideDiffTool : CombinedDiffTool { override fun canShow(context: DiffContext, request: DiffRequest): Boolean = false override fun getName(): String = DiffBundle.message("combined.side.by.side.viewer") diff --git a/platform/diff-impl/src/com/intellij/openapi/vcs/changes/EditorTabDiffPreview.kt b/platform/diff-impl/src/com/intellij/openapi/vcs/changes/EditorTabDiffPreview.kt index 14c8bb506031..c6e2c58e9b8b 100644 --- a/platform/diff-impl/src/com/intellij/openapi/vcs/changes/EditorTabDiffPreview.kt +++ b/platform/diff-impl/src/com/intellij/openapi/vcs/changes/EditorTabDiffPreview.kt @@ -120,7 +120,7 @@ abstract class EditorTabDiffPreview(val project: Project) : CheckedDisposable, D } } - private class DiffEditorPreviewEscapeAction(preview: EditorTabDiffPreview) : DumbAwareAction(), DiffEditorEscapeAction { + internal class DiffEditorPreviewEscapeAction(preview: EditorTabDiffPreview) : DumbAwareAction(), DiffEditorEscapeAction { private val previewRef: WeakReference = WeakReference(preview) override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT diff --git a/platform/diff-impl/src/com/intellij/openapi/vcs/ex/LineStatusMarkerPopupService.kt b/platform/diff-impl/src/com/intellij/openapi/vcs/ex/LineStatusMarkerPopupService.kt index b9aa75657b22..cb9bb539beee 100644 --- a/platform/diff-impl/src/com/intellij/openapi/vcs/ex/LineStatusMarkerPopupService.kt +++ b/platform/diff-impl/src/com/intellij/openapi/vcs/ex/LineStatusMarkerPopupService.kt @@ -237,7 +237,7 @@ private fun closeActivePopup() { LineStatusMarkerPopupService.instance.closeActivePopup() } -private class LineStatusMakerEscEditorHandler(private val delegate: EditorActionHandler) : EditorActionHandler() { +internal class LineStatusMakerEscEditorHandler(private val delegate: EditorActionHandler) : EditorActionHandler() { override fun isEnabledForCaret(editor: Editor, caret: Caret, dataContext: DataContext?): Boolean { return delegate.isEnabled(editor, caret, dataContext) }