Search in sources :

Example 1 with BlazeConsoleView

use of com.google.idea.blaze.base.console.BlazeConsoleView in project intellij by bazelbuild.

the class IssueOutputFilter method openConsoleToHyperlink.

private Navigatable openConsoleToHyperlink(HyperlinkInfo link, int originalOffset) {
    return new Navigatable() {

        @Override
        public void navigate(boolean requestFocus) {
            BlazeConsoleView consoleView = BlazeConsoleView.getInstance(project);
            ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(BlazeConsoleToolWindowFactory.ID);
            toolWindow.activate(() -> consoleView.navigateToHyperlink(link, originalOffset), true);
        }

        @Override
        public boolean canNavigate() {
            return true;
        }

        @Override
        public boolean canNavigateToSource() {
            return true;
        }
    };
}
Also used : ToolWindow(com.intellij.openapi.wm.ToolWindow) Navigatable(com.intellij.pom.Navigatable) BlazeConsoleView(com.google.idea.blaze.base.console.BlazeConsoleView)

Aggregations

BlazeConsoleView (com.google.idea.blaze.base.console.BlazeConsoleView)1 ToolWindow (com.intellij.openapi.wm.ToolWindow)1 Navigatable (com.intellij.pom.Navigatable)1