PySmartStepIntoContext (@NotNull PyStackFrame frame) { XSourcePosition position = frame.getSourcePosition(); if (position == null) return null; Document document = FileDocumentManager.getInstance().getDocument(position.getFile()); if (document == null) return null; PySmartStepIntoHandler handler = (PySmartStepIntoHandler)myProcess.getSmartStepIntoHandler(); PsiElement expression = handler.findSmartStepIntoBaseExpression(document, position.getLine()); if (expression != null) { TextRange range = expression.getTextRange(); int startLine = document.getLineNumber(range.getStartOffset()); int endLine = document.getLineNumber(range.getEndOffset()); return new PySmartStepIntoContext(startLine + 1, endLine + 1, frame); } return null; }