Navigatable (@NotNull Location<?> location, @NotNull String stacktrace) { if (myCustomFilter.isEmpty()) { return null; } // iterate stacktrace lines find first navigatable line using // stacktrace filters final int stacktraceLength = stacktrace.length(); final String[] lines = StringUtil.splitByLines(stacktrace); for (String line : lines) { Filter.Result result; try { result = myCustomFilter.applyFilter(line, stacktraceLength); } catch (Throwable t) { throw new RuntimeException("Error while applying " + myCustomFilter + " to '" + line + "'", t); } final HyperlinkInfo info = result != null ? result.getFirstHyperlinkInfo() : null; if (info != null) { // covers 99% use existing cases if (info instanceof FileHyperlinkInfo) { return new FileHyperlinkNavigatable((FileHyperlinkInfo)info); } // otherwise Project project = location.getProject(); return new Navigatable() { @Override public void navigate(boolean requestFocus) { info.navigate(project); } @Override public boolean canNavigate() { return true; } @Override public boolean canNavigateToSource() { return true; } }; } } return null; }