ModCommand (@NotNull ActionContext context) { TrackingRunner.CauseItem item = myCauseWithDepth.myCauseItem; Segment range = item.getTargetSegment(); if (range == null) return ModCommand.nop(); PsiFile targetFile = item.getFile(); if (targetFile == null) return ModCommand.nop(); VirtualFile virtualFile = targetFile.getVirtualFile(); return new ModNavigate(virtualFile, range.getStartOffset(), range.getStartOffset(), range.getStartOffset()) .andThen(ModCommand.info(StringUtil.capitalize(item.toString()))); }