public static ElementFilter getFilter() {
    return new ElementFilter() {
      @Override
      public boolean isAcceptable(Object _element, PsiElement context) {
        PsiElement element = (PsiElement)_element;
        PsiFile file = element.getContainingFile();

        return (HtmlUtil.hasHtml(file) || HtmlUtil.supportsXmlTypedHandlers(file)) &&
               isAcceptableAttributeValue(element);
      }

      @Override
      public boolean isClassAcceptable(Class hintClass) {
        return true;
      }
    };
  }
public static ElementFilter getFilter()