LineRange (@NotNull final PsiElement elementToMove, @NotNull final PsiFile file, @NotNull final Editor editor, boolean down, int offset) { PsiElement rawElement = PyUtil.findNonWhitespaceAtOffset(file, offset); if (rawElement == null) return null; return down ? moveDownInto(editor.getDocument(), rawElement) : moveUpInto(elementToMove, editor, rawElement, false); }