Consumer<MouseEvent> () { return e -> { PsiFile file = getCurrentFile(); if (file != null) { if (!DaemonCodeAnalyzer.getInstance(file.getProject()).isHighlightingAvailable(file)) { return; } HectorComponent component = getProject().getService(HectorComponentFactory.class).create(file); component.showComponent(e.getComponent(), d -> new Point(-d.width, -d.height)); } }; }