GrParameter (Editor editor, PsiFile file) { PsiElement at = file.findElementAt(editor.getCaretModel().getOffset()); GrParameter parameter = PsiTreeUtil.getParentOfType(at, GrParameter.class); if (parameter == null) return null; return parameter; }