void (String classText, List<Trinity<String, Integer, Integer>> traceAndPositions) { PsiFile file = myFixture.configureByText("SomeClass.java", classText); Editor editor = myFixture.getEditor(); assertEquals(classText, editor.getDocument().getText()); ExceptionFilter filter = new ExceptionFilter(myFixture.getFile().getResolveScope()); ExceptionLineRefiner previousRefiner = null; for (Trinity<String, Integer, Integer> line : traceAndPositions) { String stackLine = line.getFirst(); filter.applyFilter(stackLine, stackLine.length()); ExceptionLineRefiner refiner = filter.getLocationRefiner(); ExceptionWorker.ParsedLine parsedLine = ExceptionWorker.parseExceptionLine(stackLine); if (parsedLine == null) { previousRefiner = refiner; continue; } Document document = FileDocumentManager.getInstance().getDocument(file.getVirtualFile()); int lineStart = document.getLineStartOffset(parsedLine.lineNumber - 1); int lineEnd = document.getLineEndOffset(parsedLine.lineNumber - 1); String className = parsedLine.classFqnRange.substring(stackLine); String methodName = parsedLine.methodNameRange.substring(stackLine); FindDivergedExceptionLineHandler handler = FindDivergedExceptionLineHandler.getFindMethodHandler(file, className, methodName, previousRefiner, lineStart, lineEnd, editor); previousRefiner = refiner; Integer row = line.getSecond(); Integer column = line.getThird(); if (column != null && row != null) { if (column == 0) { assertNull(handler); continue; } assertNotNull(handler); Collection<PsiElement> elements = handler.collector().get(); if (elements.iterator().next() instanceof Navigatable navigatable) { navigatable.navigate(true); LogicalPosition actualPos = editor.getCaretModel().getLogicalPosition(); assertEquals(new LogicalPosition(row - 1, column - 1), actualPos); } else { fail(); } } } }