use of com.intellij.vcs.log.visible.VisiblePackRefresher in project intellij-community by JetBrains.
the class RefreshLogAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
VcsLogUtil.triggerUsage(e);
VcsLogManager logManager = e.getRequiredData(VcsLogInternalDataKeys.LOG_MANAGER);
// diagnostic for possible refresh problems
VcsLogUi ui = e.getRequiredData(VcsLogDataKeys.VCS_LOG_UI);
if (ui instanceof AbstractVcsLogUi) {
VisiblePackRefresher refresher = ((AbstractVcsLogUi) ui).getRefresher();
if (!refresher.isValid()) {
String message = "Trying to refresh invalid log tab.";
if (!logManager.getDataManager().getProgress().isRunning()) {
LOG.error(message);
} else {
LOG.warn(message);
}
refresher.setValid(true);
}
}
logManager.getDataManager().refreshSoftly(VcsLogUtil.getVisibleRoots(ui));
}
Aggregations