@SuppressWarnings("unchecked")
  @Nullable
  private static WebReference lookForWebReference(Collection<? extends PsiReference> references) {
    for (PsiReference reference : references) {
      if (reference instanceof WebReference) {
        return (WebReference)reference;
      }
      else if (reference instanceof PsiDynaReference) {
        final WebReference webReference = lookForWebReference(((PsiDynaReference<?>)reference).getReferences());
        if (webReference != null) {
          return webReference;
        }
      }
    }
    return null;
  }
@SuppressWarnings("unchecked")
  @Nullable
  private static WebReference lookForWebReference(Collection<? extends PsiReference> references)