mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: add description to update action when no tracking branch exist
GitOrigin-RevId: e499efb89b0f1ada9f5fe7d2df8253fa534790d5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1177844617
commit
810b1534bd
@@ -807,7 +807,12 @@ public class GitBranchPopupActions {
|
||||
presentation.setDescription("Update is already running");
|
||||
return;
|
||||
}
|
||||
presentation.setEnabled(isTrackingInfosExist(myBranchNameList, myRepositories));
|
||||
|
||||
boolean trackingInfosExist = isTrackingInfosExist(myBranchNameList, myRepositories);
|
||||
presentation.setEnabled(trackingInfosExist);
|
||||
if (!trackingInfosExist) {
|
||||
presentation.setDescription(String.format("Tracking branch doesn't configured for %s", branchPresentation));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -139,7 +139,11 @@ internal object BranchesDashboardActions {
|
||||
val pluralizedBranchName = StringUtil.pluralize("branch", branchNames.size)
|
||||
presentation.description =
|
||||
"Fetch remote tracking $pluralizedBranchName and fast-forward selected local $pluralizedBranchName (like `git fetch branch:branch`)"
|
||||
presentation.isEnabled = isTrackingInfosExist(branchNames, repositories)
|
||||
val trackingInfosExist = isTrackingInfosExist(branchNames, repositories)
|
||||
presentation.isEnabled = trackingInfosExist
|
||||
if (!trackingInfosExist) {
|
||||
presentation.description = "Tracking branch doesn't configured for selected $pluralizedBranchName"
|
||||
}
|
||||
}
|
||||
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
|
||||
Reference in New Issue
Block a user