diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index d485f0e2045c..b444c7e80c7f 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -248,7 +248,7 @@ action.Diff.PreviousConflict.description=Move to the previous unresolved conflic action.GotoChangedFile.text=Go To Changed File... action.GotoChangedFile.description=Quickly navigate to changed file by name action.Refresh.text=R_efresh -action.CheckinProject.text=Comm_it +action.CheckinProject.text=Comm_it... action.CheckinFiles.text=Comm_it File action.CheckinFiles.description=Commit selected files or directories action.UpdateFiles.text=_Update diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.kt index ef5909016d9a..bdfc26d3b0be 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.kt @@ -33,7 +33,7 @@ abstract class AbstractCommonCheckinAction : AbstractVcsAction(), UpdateInBackgr presentation.isEnabled = false } else { - presentation.text = "${getActionName(vcsContext)}..." + getActionName(vcsContext)?.let { presentation.text = "$it..." } presentation.isEnabled = !ProjectLevelVcsManager.getInstance(project).isBackgroundVcsOperationRunning presentation.isVisible = true } @@ -41,13 +41,13 @@ abstract class AbstractCommonCheckinAction : AbstractVcsAction(), UpdateInBackgr protected abstract fun approximatelyHasRoots(dataContext: VcsContext): Boolean - protected abstract fun getActionName(dataContext: VcsContext): String? + protected open fun getActionName(dataContext: VcsContext): String? = null public override fun actionPerformed(context: VcsContext) { LOG.debug("actionPerformed. ") val project = context.project!! - val actionName = getActionName(context)?.let { removeMnemonic(it) } + val actionName = getActionName(context)?.let { removeMnemonic(it) } ?: templatePresentation.text val isFreezedDialogTitle = actionName?.let { "Can not $it now" } if (ChangeListManager.getInstance(project).isFreezedWithNotification(isFreezedDialogTitle)) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/CommonCheckinProjectAction.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/CommonCheckinProjectAction.kt index e9f42fb6f422..3f4f58f663a2 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/CommonCheckinProjectAction.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/CommonCheckinProjectAction.kt @@ -1,7 +1,6 @@ // Copyright 2000-2019 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.openapi.vcs.actions -import com.intellij.idea.ActionsBundle import com.intellij.openapi.vcs.FilePath import com.intellij.openapi.vcs.ProjectLevelVcsManager import com.intellij.vcsUtil.VcsUtil.getFilePath @@ -14,6 +13,4 @@ open class CommonCheckinProjectAction : AbstractCommonCheckinAction() { .toTypedArray() override fun approximatelyHasRoots(dataContext: VcsContext): Boolean = true - - override fun getActionName(dataContext: VcsContext): String = ActionsBundle.message("action.CheckinProject.text") } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/CreatePatchAction.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/CreatePatchAction.kt index 4192455d5676..6d0852a8e33d 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/CreatePatchAction.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/CreatePatchAction.kt @@ -3,13 +3,9 @@ package com.intellij.openapi.vcs.changes.actions import com.intellij.openapi.project.Project -import com.intellij.openapi.vcs.VcsBundle -import com.intellij.openapi.vcs.actions.VcsContext import com.intellij.openapi.vcs.changes.CommitExecutor import com.intellij.openapi.vcs.changes.patch.CreatePatchCommitExecutor class CreatePatchAction : AbstractCommitChangesAction() { - override fun getActionName(dataContext: VcsContext): String = VcsBundle.message("create.patch.commit.action.title") - override fun getExecutor(project: Project): CommitExecutor? = CreatePatchCommitExecutor.getInstance(project) } \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesAction.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesAction.kt index 852c8d6ba6be..b3cbc9cf39a3 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesAction.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesAction.kt @@ -3,13 +3,9 @@ package com.intellij.openapi.vcs.changes.shelf import com.intellij.openapi.project.Project -import com.intellij.openapi.vcs.VcsBundle -import com.intellij.openapi.vcs.actions.VcsContext import com.intellij.openapi.vcs.changes.CommitExecutor import com.intellij.openapi.vcs.changes.actions.AbstractCommitChangesAction class ShelveChangesAction : AbstractCommitChangesAction() { - override fun getActionName(dataContext: VcsContext): String = VcsBundle.message("shelve.changes.action") - override fun getExecutor(project: Project): CommitExecutor = ShelveChangesCommitExecutor(project) } \ No newline at end of file