mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] better refresh action description
This commit is contained in:
@@ -19,6 +19,7 @@ import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.actions.RefreshAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.vcs.log.VcsLogDataKeys;
|
||||
import com.intellij.vcs.log.VcsLogUi;
|
||||
import com.intellij.vcs.log.data.VcsLogFilterer;
|
||||
import com.intellij.vcs.log.impl.VcsLogManager;
|
||||
@@ -30,7 +31,7 @@ public class RefreshLogAction extends RefreshAction {
|
||||
private static final Logger LOG = Logger.getInstance(RefreshLogAction.class);
|
||||
|
||||
public RefreshLogAction() {
|
||||
super("Refresh", "Re-read Commits From Disk for All VCS Roots and Rebuild Log", AllIcons.Actions.Refresh);
|
||||
super("Refresh", "Check for new commits and refresh Log if necessary", AllIcons.Actions.Refresh);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,7 +41,7 @@ public class RefreshLogAction extends RefreshAction {
|
||||
VcsLogManager logManager = e.getRequiredData(VcsLogInternalDataKeys.LOG_MANAGER);
|
||||
|
||||
// diagnostic for possible refresh problems
|
||||
VcsLogUi ui = e.getRequiredData(com.intellij.vcs.log.VcsLogDataKeys.VCS_LOG_UI);
|
||||
VcsLogUi ui = e.getRequiredData(VcsLogDataKeys.VCS_LOG_UI);
|
||||
if (ui instanceof VcsLogUiImpl) {
|
||||
VcsLogFilterer filterer = ((VcsLogUiImpl)ui).getFilterer();
|
||||
if (!filterer.isValid()) {
|
||||
@@ -60,6 +61,6 @@ public class RefreshLogAction extends RefreshAction {
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
VcsLogManager logManager = e.getData(VcsLogInternalDataKeys.LOG_MANAGER);
|
||||
e.getPresentation().setEnabledAndVisible(logManager != null && e.getData(com.intellij.vcs.log.VcsLogDataKeys.VCS_LOG_UI) != null);
|
||||
e.getPresentation().setEnabledAndVisible(logManager != null && e.getData(VcsLogDataKeys.VCS_LOG_UI) != null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user