void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); if (!hasRemotes(myProject)) { presentation.setEnabledAndVisible(false); return; } String branchPresentation = getSelectedBranchFullPresentation(myBranchName); String description = GitBundle.message("action.Git.Update.Selected.description", myBranchNameList.size(), GitVcsSettings.getInstance(myProject).getUpdateMethod().getMethodName() .toLowerCase(Locale.ROOT)); presentation.setDescription(description); if (GitFetchSupport.fetchSupport(myProject).isFetchRunning()) { presentation.setEnabled(false); presentation.setDescription(GitBundle.message("branches.update.is.already.running")); return; } boolean trackingInfosExist = isTrackingInfosExist(myBranchNameList, myRepositories); presentation.setEnabled(trackingInfosExist); if (!trackingInfosExist) { presentation.setDescription(GitBundle.message("branches.tracking.branch.doesn.t.configured.for.s", branchPresentation)); } }