GrVariable () { if (myVarMarker == null) return null; int offset = myVarMarker.getStartOffset(); PsiElement at = myFile.findElementAt(offset); GrVariable var = PsiTreeUtil.getParentOfType(at, GrVariable.class); return var; }