boolean (ASTNode node) { PsiElement element = node.getPsi(); PsiElement parent = element.getParent(); if (parent instanceof GroovyFile) { PsiElement firstChild = parent.getFirstChild(); if (firstChild instanceof PsiWhiteSpace) { firstChild = firstChild.getNextSibling(); } return element.equals(firstChild); } return false; }