boolean (PsiElement place) { if (!isContentsLoaded()) return true; // 1. We actually should never get GrTypeDefinition as a parent, because it is a PsiClass, // and PsiClasses prevent to go up in a tree any further // 2. If place is under a variable then @BaseScript or @Field may be changed, // which actually is a change in Java Structure return !isScript() || PsiTreeUtil.getParentOfType(place, GrTypeDefinition.class, GrVariableDeclaration.class) != null; }