private static boolean isResourceVariable(final PsiElement[] scopeElements) {
    return scopeElements.length == 2 &&
           scopeElements[0] instanceof PsiResourceList &&
           scopeElements[1] instanceof PsiCodeBlock;
  }
private static boolean isResourceVariable(final PsiElement[] scopeElements)