void (@NotNull final Project project, @Nullable RelativePoint hyperlinkLocationPoint) { Editor originalEditor; if (hyperlinkLocationPoint != null) { DataManager dataManager = DataManager.getInstance(); DataContext dataContext = dataManager.getDataContext(hyperlinkLocationPoint.getOriginalComponent()); originalEditor = CommonDataKeys.EDITOR.getData(dataContext); } else { originalEditor = null; } JFrame frame = WindowManager.getInstance().getFrame(project); int width = frame != null ? frame.getSize().width : 200; GotoFileCellRenderer renderer = new GotoFileCellRenderer(width); new PsiTargetNavigator<>(() -> getFiles(project)) .title(ExecutionBundle.message("popup.title.choose.target.file")) .presentationProvider(element -> renderer.computePresentation(element)) .navigate(hyperlinkLocationPoint, ExecutionBundle.message("popup.title.choose.target.file"), project, file -> { open(file.getVirtualFile(), originalEditor); return true; }); }