Search in sources :

Example 1 with CompareRevisionsFromHistoryAction

use of com.intellij.vcs.log.ui.actions.history.CompareRevisionsFromHistoryAction in project intellij-community by JetBrains.

the class VcsLogActionPromoter method promote.

@Override
public List<AnAction> promote(@NotNull List<AnAction> actions, @NotNull DataContext context) {
    List<AnAction> promoted = ContainerUtil.newArrayList();
    VcsLogUi ui = VcsLogDataKeys.VCS_LOG_UI.getData(context);
    if (ui != null && ui instanceof FileHistoryUi) {
        CompareRevisionsFromHistoryAction compareAction = ContainerUtil.findInstance(actions, CompareRevisionsFromHistoryAction.class);
        if (compareAction != null)
            promoted.add(compareAction);
    }
    return promoted;
}
Also used : VcsLogUi(com.intellij.vcs.log.VcsLogUi) FileHistoryUi(com.intellij.vcs.log.history.FileHistoryUi) CompareRevisionsFromHistoryAction(com.intellij.vcs.log.ui.actions.history.CompareRevisionsFromHistoryAction) AnAction(com.intellij.openapi.actionSystem.AnAction)

Aggregations

AnAction (com.intellij.openapi.actionSystem.AnAction)1 VcsLogUi (com.intellij.vcs.log.VcsLogUi)1 FileHistoryUi (com.intellij.vcs.log.history.FileHistoryUi)1 CompareRevisionsFromHistoryAction (com.intellij.vcs.log.ui.actions.history.CompareRevisionsFromHistoryAction)1