public static void qualifyWithPrefix(final String namespacePrefix, final PsiElement element) {
    final PsiElement tag = element.getParent();
    if (tag instanceof XmlTag) {
      final String prefix = ((XmlTag)tag).getNamespacePrefix();
      if (!prefix.equals(namespacePrefix) && StringUtil.isNotEmpty(namespacePrefix)) {
        String toInsert = namespacePrefix + ":";
        Document document = element.getContainingFile().getViewProvider().getDocument();
        assert document != null;

        ASTNode startTagName = XmlChildRole.START_TAG_NAME_FINDER.findChild(tag.getNode());
        ASTNode endTagName = XmlChildRole.CLOSING_TAG_NAME_FINDER.findChild(tag.getNode());
        if (endTagName != null) {
          document.insertString(endTagName.getStartOffset(), toInsert);
        }
        if (startTagName != null) {
          document.insertString(startTagName.getStartOffset(), toInsert);
        }
      }
    }
  }
public static void qualifyWithPrefix(final String namespacePrefix, final PsiElement element)