Search in sources :

Example 1 with MainFrame

use of com.intellij.vcs.log.ui.frame.MainFrame in project intellij-community by JetBrains.

the class FocusTextFilterAction method actionPerformed.

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
    VcsLogUtil.triggerUsage(e);
    Project project = e.getRequiredData(CommonDataKeys.PROJECT);
    MainFrame mainFrame = ((VcsLogUiImpl) e.getRequiredData(VcsLogDataKeys.VCS_LOG_UI)).getMainFrame();
    if (mainFrame.getTextFilter().getTextEditor().hasFocus()) {
        IdeFocusManager.getInstance(project).requestFocus(mainFrame.getGraphTable(), true);
    } else {
        IdeFocusManager.getInstance(project).requestFocus(mainFrame.getTextFilter(), true);
    }
}
Also used : Project(com.intellij.openapi.project.Project) VcsLogUiImpl(com.intellij.vcs.log.ui.VcsLogUiImpl) MainFrame(com.intellij.vcs.log.ui.frame.MainFrame)

Aggregations

Project (com.intellij.openapi.project.Project)1 VcsLogUiImpl (com.intellij.vcs.log.ui.VcsLogUiImpl)1 MainFrame (com.intellij.vcs.log.ui.frame.MainFrame)1